a263cb814e
- Stating better the guile dependencies (native/host) for guile to build - Fixing cross-linking, through --rpath-link (ld(1) explains well about it - Made gcc call the linker and the assembler through the gcc wrapper instead of directly. I thought this was the source of missing -rpath's, but the source of the problem ended up being the lack of --rpath-link. But I think the native gcc calls the wrapped ld and as, so let's do the same cross compiling. - Removed the binutilsCross from the glibc expressions. Now they are built using the gcc-cross-wrapper, and they were built with the direct gcc and binutils before this change. - I think patchelf and strip don't break the cross-compiled binaries, so I reallow them on cross compilation. - I disable the checkPhase on cross compilation. This made gmp and libtool fail when cross compiled, iirc. svn path=/nixpkgs/branches/stdenv-updates/; revision=18498
32 lines
695 B
Bash
32 lines
695 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"
|
|
# Disabling the tests when cross compiling, as usually the tests are meant for
|
|
# native compilations.
|
|
doCheck=""
|