a5fee3325a
linking path), and with this achieved bash being cross-compilable. I fixed the few expressions involved in bash building, so they have well stated native and non-native inputs. I also tried to cross-build guile, and with this I found a problem in the actual cross-gcc: it calls the binutils ld, instead of the ld wrapper. This way, the programs/shared_libraries don't get the proper -rpath. svn path=/nixpkgs/branches/stdenv-updates/; revision=18497
30 lines
609 B
Bash
30 lines
609 B
Bash
addCVars () {
|
|
if test -d $1/include; then
|
|
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$1/include"
|
|
fi
|
|
|
|
if test -d $1/lib; then
|
|
export NIX_LDFLAGS="$NIX_LDFLAGS -L$1/lib"
|
|
fi
|
|
}
|
|
|
|
crossEnvHooks=(${crossEnvHooks[@]} addCVars)
|
|
|
|
# Note: these come *after* $out in the PATH (see setup.sh).
|
|
|
|
if test -n "@gcc@"; then
|
|
PATH=$PATH:@gcc@/bin
|
|
fi
|
|
|
|
if test -n "@binutils@"; then
|
|
PATH=$PATH:@binutils@/bin
|
|
fi
|
|
|
|
if test -n "@libc@"; then
|
|
PATH=$PATH:@libc@/bin
|
|
addCVars @libc@
|
|
fi
|
|
|
|
configureFlags="$configureFlags --build=$system --host=$crossConfig"
|
|
dontPatchELF=1
|
|
dontStrip=1
|