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.
···2223# Note: these come *after* $out in the PATH (see setup.sh).
2425-if [ -n "@cc@" ]; then
26- addToSearchPath PATH @cc@/bin
27fi
2829-if [ -n "@binutils@" ]; then
30- addToSearchPath PATH @binutils@/bin
31fi
3233if [ -n "@libc@" ]; then
34- addToSearchPath PATH @libc@/bin
35fi
3637if [ -n "@coreutils@" ]; then
38- addToSearchPath PATH @coreutils@/bin
39fi
4041if [ -z "$crossConfig" ]; then
···2223# Note: these come *after* $out in the PATH (see setup.sh).
2425+if [ -n "@binutils@" ]; then
26+ addToSearchPath _PATH @binutils@/bin
27fi
2829+if [ -n "@cc@" ]; then
30+ addToSearchPath _PATH @cc@/bin
31fi
3233if [ -n "@libc@" ]; then
34+ addToSearchPath _PATH @libc@/bin
35fi
3637if [ -n "@coreutils@" ]; then
38+ addToSearchPath _PATH @coreutils@/bin
39fi
4041if [ -z "$crossConfig" ]; then
+4-12
pkgs/stdenv/generic/setup.sh
···214for i in $initialPath; do
215 if [ "$i" = / ]; then i=; fi
216 addToSearchPath PATH $i/bin
217- addToSearchPath PATH $i/sbin
218done
219220if [ "$NIX_DEBUG" = 1 ]; then
···262 source "$pkg"
263 fi
2640000265 if [ -f "$pkg/nix-support/setup-hook" ]; then
266 source "$pkg/nix-support/setup-hook"
267 fi
···289_addToNativeEnv() {
290 local pkg=$1
291292- 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}
···303304_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
313314 # Run the package-specific hooks set by the setup-hook scripts.
315 runHook crossEnvHook "$pkg"
···214for i in $initialPath; do
215 if [ "$i" = / ]; then i=; fi
216 addToSearchPath PATH $i/bin
0217done
218219if [ "$NIX_DEBUG" = 1 ]; then
···261 source "$pkg"
262 fi
263264+ 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
2940000295 # Run the package-specific hooks set by the setup-hook scripts.
296 runHook envHook "$pkg"
297}
···302303_addToCrossEnv() {
304 local pkg=$1
0000000305306 # Run the package-specific hooks set by the setup-hook scripts.
307 runHook crossEnvHook "$pkg"