cc-wrapper: pass correct -B prefix

This commit is contained in:
Alba Mendez
2025-03-31 22:06:21 +02:00
committed by Alyssa Ross
parent 7b52c6fa13
commit 371a9fa6eb
2 changed files with 2 additions and 1 deletions

View File

@@ -30,7 +30,7 @@ done
# Arocc does not support "-B"
if [[ -z "@isArocc@" ]]; then
# `-B@bintools@/bin' forces cc to use ld-wrapper.sh when calling ld.
NIX_CFLAGS_COMPILE_@suffixSalt@="-B@bintools@/bin/ $NIX_CFLAGS_COMPILE_@suffixSalt@"
NIX_CFLAGS_COMPILE_@suffixSalt@="-B@bintools@/bin/@bintools_targetPrefix@ $NIX_CFLAGS_COMPILE_@suffixSalt@"
fi
# Export and assign separately in order that a failing $(..) will fail

View File

@@ -872,6 +872,7 @@ stdenvNoCC.mkDerivation {
cc = optionalString (!nativeTools) cc;
wrapperName = "CC_WRAPPER";
inherit suffixSalt coreutils_bin bintools;
bintools_targetPrefix = bintools.targetPrefix;
inherit libc_bin libc_dev libc_lib;
inherit darwinPlatformForCC;
default_hardening_flags_str = builtins.toString defaultHardeningFlags;