Skip to content

Commit

Permalink
cc-wrapper: fix guessing mainProgram
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
NickCao committed Jun 30, 2024
1 parent 0ac90f1 commit a58ad45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkgs/build-support/cc-wrapper/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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}";
};
}

0 comments on commit a58ad45

Please sign in to comment.