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.
This commit is contained in:
Nick Cao
2024-06-30 11:17:25 -04:00
parent 0ac90f11dd
commit a58ad4550c
+1 -1
View File
@@ -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}";
};
}