nixpkgs/pkgs/build-support/bintools-wrapper
Rouven Czerwinski eee562ffb5 bintools-wrapper: fix inverted link32 check
The new skip for the dynamic linker introduced in
ccfd26ef14 ("bintools-wrapper: skip dynamic linker for static
binaries") includes a change in behaviour, previously the $link32
variable was checked using an arithmetic expression via (( )). This
returns zero if the output of the arithmetic expression is nonzero, i.e.
link32=1 would return zero and the if condition would be executed.
The code refactored this to use "$link32" = "0" which is incorrect in
this case, since we want this if conditional to run if $link32 is 1.

Small shell excerpt for clarity:

$ export link32=1
$ export cookie=1
$ if [[ "$cookie" = "1" ]] && (( "$link32" )); then echo "do some stuff"; fi;
do some stuff
$ if [[ "$cookie" = "1" && "$link32" = "0" ]]; then echo "do some stuff"; fi;
$

Change it to check for $link32 = "1", as the previous code did.
2020-12-20 17:27:16 +01:00
..
add-flags.sh bintools-wrapper: skip dynamic linker for static binaries 2020-12-14 15:42:54 +00:00
add-hardening.sh *-wrapper; Switch from infixSalt to suffixSalt 2020-05-12 00:44:44 -04:00
default.nix bintools-wrapper: skip dynamic linker for static binaries 2020-12-14 15:42:54 +00:00
ld-solaris-wrapper.sh bintools-wrapper: Init 2017-12-13 16:08:18 -05:00
ld-wrapper.sh bintools-wrapper: fix inverted link32 check 2020-12-20 17:27:16 +01:00
macos-sierra-reexport-hack.bash cc-wrapper: Utilize patched cctools ld for more robust macOS Sierra hack 2018-04-13 13:17:03 -04:00
setup-hook.sh *-wrapper; Switch from infixSalt to suffixSalt 2020-05-12 00:44:44 -04:00