From e0ad264f4383d6cb67d17b102d47e33b2310994d Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 28 Mar 2007 12:29:36 +0000 Subject: [PATCH] * Get GCC 3.3 to build on x86_64/powerpc-linux. Not tested. svn path=/nixpkgs/trunk/; revision=8439 --- pkgs/development/compilers/gcc-3.3/builder.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/pkgs/development/compilers/gcc-3.3/builder.sh b/pkgs/development/compilers/gcc-3.3/builder.sh index 0ae93168924..56a38fced58 100644 --- a/pkgs/development/compilers/gcc-3.3/builder.sh +++ b/pkgs/development/compilers/gcc-3.3/builder.sh @@ -46,13 +46,10 @@ postConfigure() { # Patch some of the makefiles to force linking against our own # glibc. if test -e $NIX_GCC/nix-support/orig-libc; then - glibc=$(cat $NIX_GCC/nix-support/orig-libc) - # Ugh. Copied from gcc-wrapper/builder.sh. We can't just - # source in $NIX_GCC/nix-support/add-flags, since that - # would cause *this* GCC to be linked against the - # *previous* GCC. Need some more modularity there. - extraFlags="-Wl,-s -B$glibc/lib -isystem $glibc/include \ - -L$glibc/lib -Wl,-dynamic-linker -Wl,$glibc/lib/ld-linux.so.2" + + # Figure out what extra flags to pass to the gcc compilers + # being generated to make sure that they use our glibc. + extraFlags="$(cat $NIX_GCC/nix-support/libc-cflags) $(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)" # Use *real* header files, otherwise a limits.h is generated # that does not include Glibc's limits.h (notably missing