cc-wrapper: Clean up dynamic linking with x86 multilib
It's better layering to do everything in ld-wrapper.
This commit is contained in:
parent
0cdbd2d662
commit
94c0267fc1
@ -57,10 +57,6 @@ while (( "$n" < "$nParams" )); do
|
||||
cppInclude=0
|
||||
elif [ "${p:0:1}" != - ]; then
|
||||
nonFlagArgs=1
|
||||
elif [ "$p" = -m32 ]; then
|
||||
if [ -e @out@/nix-support/dynamic-linker-m32 ]; then
|
||||
NIX_@infixSalt@_LDFLAGS+=" -dynamic-linker $(< @out@/nix-support/dynamic-linker-m32)"
|
||||
fi
|
||||
fi
|
||||
n+=1
|
||||
done
|
||||
|
@ -63,6 +63,21 @@ fi
|
||||
|
||||
extraAfter+=($NIX_@infixSalt@_LDFLAGS_AFTER)
|
||||
|
||||
# Choose 32-bit dynamic linker if needed
|
||||
if [ -e @out@/nix-support/dynamic-linker-m32 ]; then
|
||||
prev=
|
||||
for p in ${params+"${params[@]}"}; do
|
||||
if [[ "$prev" = "-m" && "$p" = "elf_i386" ]]; then
|
||||
extraAfter+=(
|
||||
'-dynamic-linker'
|
||||
"$(< @out@/nix-support/dynamic-linker-m32)"
|
||||
)
|
||||
break
|
||||
fi
|
||||
prev="$p"
|
||||
done
|
||||
fi
|
||||
|
||||
declare -a libDirs
|
||||
declare -A libs
|
||||
relocatable=
|
||||
|
Loading…
Reference in New Issue
Block a user