diff options
author | Jörg Thalheim <joerg@thalheim.io> | 2020-07-01 21:55:06 +0100 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2020-07-23 08:39:46 +0100 |
commit | 96092dc93640b8ad6520a8bae6f78d62eaba0ec2 (patch) | |
tree | da92599db20e876969400bb19fd7220e1d4f06f1 /pkgs/development | |
parent | 434a0111f6a7618a7024b637c5496ea261b23016 (diff) |
stdenv: make -nostdinc work as intended
Right now we add glibc to search path also -nostdinc was provided, which breaks projects providing their own gcc.
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/compilers/gcc/builder.sh | 2 | ||||
-rw-r--r-- | pkgs/development/libraries/gcc/libstdc++/5.nix | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/development/compilers/gcc/builder.sh b/pkgs/development/compilers/gcc/builder.sh index 4b14cdb94cdd8..4558702084481 100644 --- a/pkgs/development/compilers/gcc/builder.sh +++ b/pkgs/development/compilers/gcc/builder.sh @@ -61,7 +61,7 @@ if test "$noSysDirs" = "1"; then if [[ -e "${!curCC}/nix-support/orig-libc" ]]; then # Figure out what extra compiling flags to pass to the gcc compilers # being generated to make sure that they use our libc. - extraFlags=($(< "${!curCC}/nix-support/libc-cflags")) + extraFlags=($(< "${!curCC}/nix-support/libc-crt1-cflags") $(< "${!curCC}/nix-support/libc-cflags")) # The path to the Libc headers libc_devdir="$(< "${!curCC}/nix-support/orig-libc-dev")" diff --git a/pkgs/development/libraries/gcc/libstdc++/5.nix b/pkgs/development/libraries/gcc/libstdc++/5.nix index 2a11d835a6b53..486a24defd1b5 100644 --- a/pkgs/development/libraries/gcc/libstdc++/5.nix +++ b/pkgs/development/libraries/gcc/libstdc++/5.nix @@ -62,7 +62,7 @@ stdenv.mkDerivation rec { # Figure out what extra flags to pass to the gcc compilers # being generated to make sure that they use our glibc. - EXTRA_FLAGS="-I$NIX_FIXINC_DUMMY $(cat $NIX_CC/nix-support/libc-cflags) -O2" + EXTRA_FLAGS="-I$NIX_FIXINC_DUMMY $(cat $NIX_CC/nix-support/libc-crt1-cflags) $(cat $NIX_CC/nix-support/libc-cflags) -O2" extraLDFlags="-L$glibc_libdir -rpath $glibc_libdir $(cat $NIX_BINTOOLS/nix-support/libc-ldflags) $(cat $NIX_BINTOOLS/nix-support/libc-ldflags-before)" for i in $extraLDFlags; do |