Making the gcc 4.4 expression more friendly. Nevertheless it still cannot be

used to cross-compile, because of some bug in 4.4.2 I think. This bug does not
allow building a cross-compiler without libc:
http://archives.free.net.ph/message/20091119.140407.040d3c5b.en.html

Maybe we should wait for 4.4.3 or stay with 4.4.1 cross compiling. By now I
will keep 4.3.4 on cross compilation.


svn path=/nixpkgs/branches/stdenv-updates/; revision=18730
This commit is contained in:
Lluís Batlle i Rossell 2009-12-01 10:29:22 +00:00
parent f4720cd5f9
commit 03fc55deeb
2 changed files with 19 additions and 8 deletions

View File

@ -40,16 +40,19 @@ if test "$noSysDirs" = "1"; then
export NIX_FIXINC_DUMMY=/usr/include
fi
# Setting $CPATH makes sure both `gcc' and `xgcc' find the C
# library headers, regarless of the language being compiled.
export CPATH="$NIX_FIXINC_DUMMY${CPATH:+:}$CPATH"
# We should not allow gcc find the headers of the native glibc
# (Here I only think of c,c++ compilers)
if test -z "$targetConfig"; then
# Setting $CPATH makes sure both `gcc' and `xgcc' find the C
# library headers, regarless of the language being compiled.
export CPATH="$NIX_FIXINC_DUMMY${CPATH:+:}$CPATH"
# Likewise, to help it find `crti.o' and similar files.
export LIBRARY_PATH="$glibc_libdir${LIBRARY_PATH:+:}$LIBRARY_PATH"
echo "setting \$CPATH to \`$CPATH'"
echo "setting \$LIBRARY_PATH to \`$LIBRARY_PATH'"
# Likewise, to help it find `crti.o' and similar files.
export LIBRARY_PATH="$glibc_libdir${LIBRARY_PATH:+:}$LIBRARY_PATH"
echo "setting \$CPATH to \`$CPATH'"
echo "setting \$LIBRARY_PATH to \`$LIBRARY_PATH'"
fi
extraCFlags="-g0 $extraCFlags"
extraLDFlags="--strip-debug $extraLDFlags"
@ -110,6 +113,13 @@ if test -n "$targetConfig"; then
fi
preConfigure() {
if test -n "$newlibSrc"; then
tar xvf "$newlibSrc" -C ..
ln -s ../newlib-*/newlib newlib
# Patch to get armvt5el working:
sed -i -e 's/ arm)/ arm*)/' newlib/configure.host
fi
# Perform the build in a different directory.
mkdir ../build
cd ../build

View File

@ -100,6 +100,7 @@ stdenv.mkDerivation ({
++ (optional (boehmgc != null) boehmgc)
++ (optionals langJava [zip unzip])
++ (optionals javaAwtGtk [gtk pkgconfig libart_lgpl] ++ xlibs)
++ (optionals (cross != null) [binutilsCross])
;
configureFlags = "