2005-11-29 02:40:33 +01:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
Attention, people who care on the builders for native builds. In the stdenv
derivation, the "buildInputs" in every stdenv mkDerivation don't map now
directly to the environment
variable "buildInputs" in the builder, but "buildNativeInputs". So, the inputs
build by the native compiler.
When cross compiling, they will map to the environment variable "buildInputs"
(yes, now the same name), which means does to be built with the cross compiler.
I think I improved the naming of variables a bit. There was a big mess,
specially in the stdenv adapter for cross building, and also in the default
builder script.
I also tried to add proper manager of propagatedInputBuilds, these being
propagated considering the host or build origin of that input build (so, at the
end, being those propagatedInputBuilds being propagated properly to the native
or the cross compiler.
svn path=/nixpkgs/branches/stdenv-updates/; revision=18477
2009-11-20 00:05:11 +01:00
|
|
|
crossEnvHooks=(${crossEnvHooks[@]} addCVars)
|
2005-11-29 02:40:33 +01:00
|
|
|
|
|
|
|
# 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
|
|
|
|
|
2009-11-20 23:56:58 +01:00
|
|
|
if test -n "@libc@"; then
|
|
|
|
PATH=$PATH:@libc@/bin
|
|
|
|
addCVars @libc@
|
2005-11-29 02:40:33 +01:00
|
|
|
fi
|
2009-11-17 22:14:57 +01:00
|
|
|
|
|
|
|
configureFlags="$configureFlags --build=$system --host=$crossConfig"
|
2009-11-21 03:42:52 +01:00
|
|
|
# Disabling the tests when cross compiling, as usually the tests are meant for
|
|
|
|
# native compilations.
|
|
|
|
doCheck=""
|