From 63393ce1748a002840826222e59dd8da9a4a7840 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sun, 5 Jul 2009 14:15:44 +0000 Subject: [PATCH] GCC 4.4.0: Fix compilation (for C and C++, at least). svn path=/nixpkgs/trunk/; revision=16177 --- pkgs/development/compilers/gcc-4.4/builder.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/development/compilers/gcc-4.4/builder.sh b/pkgs/development/compilers/gcc-4.4/builder.sh index 2bc011e3e6e..d40b9de2f7d 100644 --- a/pkgs/development/compilers/gcc-4.4/builder.sh +++ b/pkgs/development/compilers/gcc-4.4/builder.sh @@ -23,14 +23,24 @@ if test "$noSysDirs" = "1"; then # that does not include Glibc's limits.h (notably missing # SSIZE_MAX, which breaks the build). export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include + + # The path to the Glibc binaries such as `crti.o'. + glibc_libdir="$(cat $NIX_GCC/nix-support/orig-libc)/lib" else # Hack: support impure environments. extraCFlags="-isystem /usr/include" extraLDFlags="-L/usr/lib64 -L/usr/lib" + glibc_libdir="/usr/lib" export NIX_FIXINC_DUMMY=/usr/include fi + # Setting $C_INCLUDE_PATH helps `xgcc' find the C library headers. + export C_INCLUDE_PATH="$NIX_FIXINC_DUMMY" + + # Likewise, to help it find `crti.o' and similar files. + export LIBRARY_PATH="$glibc_libdir" + extraCFlags="-g0 -I$gmp/include -I$mpfr/include $extraCFlags" extraLDFlags="--strip-debug $extraLDFlags"