mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 21:33:03 +03:00
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.
This commit is contained in:
parent
559ecc9212
commit
2040a9ac57
@ -22,20 +22,20 @@ envHooks+=(addCVars)
|
|||||||
|
|
||||||
# Note: these come *after* $out in the PATH (see setup.sh).
|
# Note: these come *after* $out in the PATH (see setup.sh).
|
||||||
|
|
||||||
if [ -n "@cc@" ]; then
|
if [ -n "@binutils@" ]; then
|
||||||
addToSearchPath PATH @cc@/bin
|
addToSearchPath _PATH @binutils@/bin
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "@binutils@" ]; then
|
if [ -n "@cc@" ]; then
|
||||||
addToSearchPath PATH @binutils@/bin
|
addToSearchPath _PATH @cc@/bin
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "@libc@" ]; then
|
if [ -n "@libc@" ]; then
|
||||||
addToSearchPath PATH @libc@/bin
|
addToSearchPath _PATH @libc@/bin
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "@coreutils@" ]; then
|
if [ -n "@coreutils@" ]; then
|
||||||
addToSearchPath PATH @coreutils@/bin
|
addToSearchPath _PATH @coreutils@/bin
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$crossConfig" ]; then
|
if [ -z "$crossConfig" ]; then
|
||||||
|
@ -214,7 +214,6 @@ PATH=
|
|||||||
for i in $initialPath; do
|
for i in $initialPath; do
|
||||||
if [ "$i" = / ]; then i=; fi
|
if [ "$i" = / ]; then i=; fi
|
||||||
addToSearchPath PATH $i/bin
|
addToSearchPath PATH $i/bin
|
||||||
addToSearchPath PATH $i/sbin
|
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$NIX_DEBUG" = 1 ]; then
|
if [ "$NIX_DEBUG" = 1 ]; then
|
||||||
@ -262,6 +261,10 @@ findInputs() {
|
|||||||
source "$pkg"
|
source "$pkg"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -d $1/bin ]; then
|
||||||
|
addToSearchPath _PATH $1/bin
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -f "$pkg/nix-support/setup-hook" ]; then
|
if [ -f "$pkg/nix-support/setup-hook" ]; then
|
||||||
source "$pkg/nix-support/setup-hook"
|
source "$pkg/nix-support/setup-hook"
|
||||||
fi
|
fi
|
||||||
@ -289,10 +292,6 @@ done
|
|||||||
_addToNativeEnv() {
|
_addToNativeEnv() {
|
||||||
local pkg=$1
|
local pkg=$1
|
||||||
|
|
||||||
if [ -d $1/bin ]; then
|
|
||||||
addToSearchPath _PATH $1/bin
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Run the package-specific hooks set by the setup-hook scripts.
|
# Run the package-specific hooks set by the setup-hook scripts.
|
||||||
runHook envHook "$pkg"
|
runHook envHook "$pkg"
|
||||||
}
|
}
|
||||||
@ -304,13 +303,6 @@ done
|
|||||||
_addToCrossEnv() {
|
_addToCrossEnv() {
|
||||||
local pkg=$1
|
local pkg=$1
|
||||||
|
|
||||||
# Some programs put important build scripts (freetype-config and similar)
|
|
||||||
# into their crossDrv bin path. Intentionally these should go after
|
|
||||||
# the nativePkgs in PATH.
|
|
||||||
if [ -d $1/bin ]; then
|
|
||||||
addToSearchPath _PATH $1/bin
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Run the package-specific hooks set by the setup-hook scripts.
|
# Run the package-specific hooks set by the setup-hook scripts.
|
||||||
runHook crossEnvHook "$pkg"
|
runHook crossEnvHook "$pkg"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user