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.
···22222323# Note: these come *after* $out in the PATH (see setup.sh).
24242525-if [ -n "@cc@" ]; then
2626- addToSearchPath PATH @cc@/bin
2525+if [ -n "@binutils@" ]; then
2626+ addToSearchPath _PATH @binutils@/bin
2727fi
28282929-if [ -n "@binutils@" ]; then
3030- addToSearchPath PATH @binutils@/bin
2929+if [ -n "@cc@" ]; then
3030+ addToSearchPath _PATH @cc@/bin
3131fi
32323333if [ -n "@libc@" ]; then
3434- addToSearchPath PATH @libc@/bin
3434+ addToSearchPath _PATH @libc@/bin
3535fi
36363737if [ -n "@coreutils@" ]; then
3838- addToSearchPath PATH @coreutils@/bin
3838+ addToSearchPath _PATH @coreutils@/bin
3939fi
40404141if [ -z "$crossConfig" ]; then
+4-12
pkgs/stdenv/generic/setup.sh
···214214for i in $initialPath; do
215215 if [ "$i" = / ]; then i=; fi
216216 addToSearchPath PATH $i/bin
217217- addToSearchPath PATH $i/sbin
218217done
219218220219if [ "$NIX_DEBUG" = 1 ]; then
···262261 source "$pkg"
263262 fi
264263264264+ if [ -d $1/bin ]; then
265265+ addToSearchPath _PATH $1/bin
266266+ fi
267267+265268 if [ -f "$pkg/nix-support/setup-hook" ]; then
266269 source "$pkg/nix-support/setup-hook"
267270 fi
···289292_addToNativeEnv() {
290293 local pkg=$1
291294292292- if [ -d $1/bin ]; then
293293- addToSearchPath _PATH $1/bin
294294- fi
295295-296295 # Run the package-specific hooks set by the setup-hook scripts.
297296 runHook envHook "$pkg"
298297}
···303302304303_addToCrossEnv() {
305304 local pkg=$1
306306-307307- # Some programs put important build scripts (freetype-config and similar)
308308- # into their crossDrv bin path. Intentionally these should go after
309309- # the nativePkgs in PATH.
310310- if [ -d $1/bin ]; then
311311- addToSearchPath _PATH $1/bin
312312- fi
313305314306 # Run the package-specific hooks set by the setup-hook scripts.
315307 runHook crossEnvHook "$pkg"