diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2009-01-19 16:22:27 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2009-01-19 16:22:27 +0000 |
commit | 72822ebbc01c86d148889c3c34c2babd10bd36bb (patch) | |
tree | 6d4b84a56eaffc3f43a7b534ec93955a46230297 /pkgs/build-support/gcc-wrapper | |
parent | f7ad18404187e77da712a495ddefa76872ca6aac (diff) |
* Put Glibc at the very end of the GCC header search path. This
should fix previous problems with GCC 4.3 in compiling C++ code where e.g. <cassert> has to appear before <assert.h> in the search path due to the former's use of #include_next. The previous "fix" broke compilation of C code by placing the C++ include directory before the Glibc include directory (which would barf on e.g. <complex.h>, which appears in both). svn path=/nixpkgs/branches/stdenv-updates/; revision=13806
Diffstat (limited to 'pkgs/build-support/gcc-wrapper')
-rw-r--r-- | pkgs/build-support/gcc-wrapper/builder.sh | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/pkgs/build-support/gcc-wrapper/builder.sh b/pkgs/build-support/gcc-wrapper/builder.sh index 1a23294dd7437..0691b42732540 100644 --- a/pkgs/build-support/gcc-wrapper/builder.sh +++ b/pkgs/build-support/gcc-wrapper/builder.sh @@ -17,7 +17,7 @@ if test -z "$nativeLibc"; then # against the crt1.o from our own glibc, rather than the one in # /usr/lib. (This is only an issue when using an `impure' # compiler/linker, i.e., one that searches /usr/lib and so on.) - echo "-B$libc/lib/ -isystem $libc/include" > $out/nix-support/libc-cflags + echo "-B$libc/lib/ -idirafter $libc/include" > $out/nix-support/libc-cflags echo "-L$libc/lib" > $out/nix-support/libc-ldflags @@ -37,17 +37,6 @@ else gccLDFlags="$gccLDFlags -L$gcc/lib" echo "$gccLDFlags" > $out/nix-support/gcc-ldflags - # Explicitly add the libstdc++ header files to the search path. - # G++ already finds them automatically, but it adds them to the - # very end of the header search path. This means that - # #include_next constructs in the libstdc++ headers won't find the - # Glibc headers, since they appear *before* the libstdc++ headers. - # So we add them here using -isystem. Note that `add-flags' adds - # the libc flags before the gcc flags. - if test -e $gcc/include/c++/*.*; then - gccCFlags="$gccCFlags -isystem $(echo $gcc/include/c++/*.*)" - fi - # GCC shows $gcc/lib in `gcc -print-search-dirs', but not # $gcc/lib64 (even though it does actually search there...).. # This confuses libtool. So add it to the compiler tool search |