summary refs log tree commit diff
path: root/pkgs/development/compilers
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2009-07-05 14:15:44 +0000
committerLudovic Courtès <ludo@gnu.org>2009-07-05 14:15:44 +0000
commit63393ce1748a002840826222e59dd8da9a4a7840 (patch)
tree2b9847b1e3dab75f224286b179b230fde14ae4c1 /pkgs/development/compilers
parent9f3511c882195818d7e297e37c9aa4dfc0726c0d (diff)
downloadnixpkgs-63393ce1748a002840826222e59dd8da9a4a7840.tar
nixpkgs-63393ce1748a002840826222e59dd8da9a4a7840.tar.gz
nixpkgs-63393ce1748a002840826222e59dd8da9a4a7840.tar.bz2
nixpkgs-63393ce1748a002840826222e59dd8da9a4a7840.tar.lz
nixpkgs-63393ce1748a002840826222e59dd8da9a4a7840.tar.xz
nixpkgs-63393ce1748a002840826222e59dd8da9a4a7840.tar.zst
nixpkgs-63393ce1748a002840826222e59dd8da9a4a7840.zip
GCC 4.4.0: Fix compilation (for C and C++, at least).
svn path=/nixpkgs/trunk/; revision=16177
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r--pkgs/development/compilers/gcc-4.4/builder.sh10
1 files changed, 10 insertions, 0 deletions
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"