stdenv-linux: Ensure binutils comes before bootstrapTools in $PATH

Otherwise, when building glibc and other packages, the "strip" from
bootstrapTools is used, which doesn't recognise some tags produced by
the newer "ld" from binutils.

+10 -18
+6 -6
pkgs/build-support/cc-wrapper/setup-hook.sh
··· 22 23 # Note: these come *after* $out in the PATH (see setup.sh). 24 25 - if [ -n "@cc@" ]; then 26 - addToSearchPath PATH @cc@/bin 27 fi 28 29 - if [ -n "@binutils@" ]; then 30 - addToSearchPath PATH @binutils@/bin 31 fi 32 33 if [ -n "@libc@" ]; then 34 - addToSearchPath PATH @libc@/bin 35 fi 36 37 if [ -n "@coreutils@" ]; then 38 - addToSearchPath PATH @coreutils@/bin 39 fi 40 41 if [ -z "$crossConfig" ]; then
··· 22 23 # Note: these come *after* $out in the PATH (see setup.sh). 24 25 + if [ -n "@binutils@" ]; then 26 + addToSearchPath _PATH @binutils@/bin 27 fi 28 29 + if [ -n "@cc@" ]; then 30 + addToSearchPath _PATH @cc@/bin 31 fi 32 33 if [ -n "@libc@" ]; then 34 + addToSearchPath _PATH @libc@/bin 35 fi 36 37 if [ -n "@coreutils@" ]; then 38 + addToSearchPath _PATH @coreutils@/bin 39 fi 40 41 if [ -z "$crossConfig" ]; then
+4 -12
pkgs/stdenv/generic/setup.sh
··· 214 for i in $initialPath; do 215 if [ "$i" = / ]; then i=; fi 216 addToSearchPath PATH $i/bin 217 - addToSearchPath PATH $i/sbin 218 done 219 220 if [ "$NIX_DEBUG" = 1 ]; then ··· 262 source "$pkg" 263 fi 264 265 if [ -f "$pkg/nix-support/setup-hook" ]; then 266 source "$pkg/nix-support/setup-hook" 267 fi ··· 289 _addToNativeEnv() { 290 local pkg=$1 291 292 - if [ -d $1/bin ]; then 293 - addToSearchPath _PATH $1/bin 294 - fi 295 - 296 # Run the package-specific hooks set by the setup-hook scripts. 297 runHook envHook "$pkg" 298 } ··· 303 304 _addToCrossEnv() { 305 local pkg=$1 306 - 307 - # Some programs put important build scripts (freetype-config and similar) 308 - # into their crossDrv bin path. Intentionally these should go after 309 - # the nativePkgs in PATH. 310 - if [ -d $1/bin ]; then 311 - addToSearchPath _PATH $1/bin 312 - fi 313 314 # Run the package-specific hooks set by the setup-hook scripts. 315 runHook crossEnvHook "$pkg"
··· 214 for i in $initialPath; do 215 if [ "$i" = / ]; then i=; fi 216 addToSearchPath PATH $i/bin 217 done 218 219 if [ "$NIX_DEBUG" = 1 ]; then ··· 261 source "$pkg" 262 fi 263 264 + if [ -d $1/bin ]; then 265 + addToSearchPath _PATH $1/bin 266 + fi 267 + 268 if [ -f "$pkg/nix-support/setup-hook" ]; then 269 source "$pkg/nix-support/setup-hook" 270 fi ··· 292 _addToNativeEnv() { 293 local pkg=$1 294 295 # Run the package-specific hooks set by the setup-hook scripts. 296 runHook envHook "$pkg" 297 } ··· 302 303 _addToCrossEnv() { 304 local pkg=$1 305 306 # Run the package-specific hooks set by the setup-hook scripts. 307 runHook crossEnvHook "$pkg"