Unverified Commit a58ad455 authored by Nick Cao's avatar Nick Cao
Browse files

cc-wrapper: fix guessing mainProgram

ccName points to the pname of the unwrapped cc minus the targetPrefix,
thus is always incorrect for cross compilers whose wrappers are prefixed
with the target platform name.
parent 0ac90f11
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -759,6 +759,6 @@ stdenvNoCC.mkDerivation {
    (optionalAttrs (cc_ ? meta) (removeAttrs cc.meta ["priority"])) //
    { description = attrByPath ["meta" "description"] "System C compiler" cc_ + " (wrapper script)";
      priority = 10;
      mainProgram = if name != "" then name else ccName;
      mainProgram = if name != "" then name else "${targetPrefix}${ccName}";
  };
}