···184 if test "$noSysDirs" = "1"; then
185 # Figure out what extra flags to pass to the gcc compilers
186 # being generated to make sure that they use our glibc.
187- if test -e $NIX_GCC/nix-support/orig-glibc; then
188- glibc=$(cat $NIX_GCC/nix-support/orig-glibc)
189 # Ugh. Copied from gcc-wrapper/builder.sh. We can't just
190- # source in $NIX_GCC/nix-support/add-flags, since that
191 # would cause *this* GCC to be linked against the
192 # *previous* GCC. Need some more modularity there.
193 extraCFlags="-B$glibc/lib -isystem $glibc/include"
···184 if test "$noSysDirs" = "1"; then
185 # Figure out what extra flags to pass to the gcc compilers
186 # being generated to make sure that they use our glibc.
187+ if test -e $NIX_CC/nix-support/orig-glibc; then
188+ glibc=$(cat $NIX_CC/nix-support/orig-glibc)
189 # Ugh. Copied from gcc-wrapper/builder.sh. We can't just
190+ # source in $NIX_CC/nix-support/add-flags, since that
191 # would cause *this* GCC to be linked against the
192 # *previous* GCC. Need some more modularity there.
193 extraCFlags="-B$glibc/lib -isystem $glibc/include"
+1-1
maintainers/scripts/patchelf-hints.sh
···62 )
6364 if test "$names" = "glibc"; then names="stdenv.glibc"; fi
65- if echo $names | grep -c "gcc" &> /dev/null; then names="stdenv.gcc.gcc"; fi
6667 if test $lib != $libPath; then
68 interpreter="--interpreter \${$names}/lib/$lib"
···62 )
6364 if test "$names" = "glibc"; then names="stdenv.glibc"; fi
65+ if echo $names | grep -c "gcc" &> /dev/null; then names="stdenv.cc.gcc"; fi
6667 if test $lib != $libPath; then
68 interpreter="--interpreter \${$names}/lib/$lib"
···53 sed -i /ENV{PATH}/d ikiwiki.in
54 # State the gcc dependency, and make the cgi use our wrapper
55 sed -i -e 's@$0@"'$out/bin/ikiwiki'"@' \
56- -e "s@'cc'@'${stdenv.gcc}/bin/gcc'@" IkiWiki/Wrapper.pm
57 '';
5859 configurePhase = "perl Makefile.PL PREFIX=$out";
···53 sed -i /ENV{PATH}/d ikiwiki.in
54 # State the gcc dependency, and make the cgi use our wrapper
55 sed -i -e 's@$0@"'$out/bin/ikiwiki'"@' \
56+ -e "s@'cc'@'${stdenv.cc}/bin/gcc'@" IkiWiki/Wrapper.pm
57 '';
5859 configurePhase = "perl Makefile.PL PREFIX=$out";
···3stdenv.mkDerivation {
4 name = "procmail-3.22";
56- buildInputs = [ stdenv.gcc.libc ];
78 # getline is defined differently in glibc now. So rename it.
9 installPhase = "
···3stdenv.mkDerivation {
4 name = "procmail-3.22";
56+ buildInputs = [ stdenv.cc.libc ];
78 # getline is defined differently in glibc now. So rename it.
9 installPhase = "
···70 ''
71 else throw ("Architecture: "+stdenv.system+" not supported for VirtualBox guest additions")
72 }
73- patchelf --set-rpath ${stdenv.gcc.gcc}/lib:${dbus}/lib:${libX11}/lib:${libXt}/lib:${libXext}/lib:${libXmu}/lib:${libXfixes}/lib:${libXrandr}/lib:${libXcursor}/lib $i
74 done
7576 for i in lib/VBoxOGL*.so
···70 ''
71 else throw ("Architecture: "+stdenv.system+" not supported for VirtualBox guest additions")
72 }
73+ patchelf --set-rpath ${stdenv.cc.gcc}/lib:${dbus}/lib:${libX11}/lib:${libXt}/lib:${libXext}/lib:${libXmu}/lib:${libXfixes}/lib:${libXrandr}/lib:${libXcursor}/lib $i
74 done
7576 for i in lib/VBoxOGL*.so
+3-3
pkgs/build-support/builder-defs/builder-defs.nix
···100 ${stdenv.preHook}
101102 set -e
103- NIX_GCC=${stdenv.gcc}
104 export SHELL=${stdenv.shell}
105 PATH_DELIMITER=':'
106107 # Set up the initial path.
108 PATH=
109- for i in \$NIX_GCC ${toString stdenv.initialPath}; do
110 PATH=\$PATH\${PATH:+\"\${PATH_DELIMITER}\"}\$i/bin
111 done
112···138 }
139140 pkgs=\"\"
141- for i in \$NIX_GCC ${toString realBuildInputs}; do
142 findInputs \$i
143 done
144
···100 ${stdenv.preHook}
101102 set -e
103+ NIX_CC=${stdenv.cc}
104 export SHELL=${stdenv.shell}
105 PATH_DELIMITER=':'
106107 # Set up the initial path.
108 PATH=
109+ for i in \$NIX_CC ${toString stdenv.initialPath}; do
110 PATH=\$PATH\${PATH:+\"\${PATH_DELIMITER}\"}\$i/bin
111 done
112···138 }
139140 pkgs=\"\"
141+ for i in \$NIX_CC ${toString realBuildInputs}; do
142 findInputs \$i
143 done
144
···1#! @shell@ -e
23-if test -n "$NIX_GCC_WRAPPER_START_HOOK"; then
4- source "$NIX_GCC_WRAPPER_START_HOOK"
5fi
67if test -z "$NIX_CROSS_GLIBC_FLAGS_SET"; then
···107 done
108fi
109110-if test -n "$NIX_GCC_WRAPPER_EXEC_HOOK"; then
111- source "$NIX_GCC_WRAPPER_EXEC_HOOK"
112fi
113114# We want gcc to call the wrapper linker, not that of binutils.
···1#! @shell@ -e
23+if test -n "$NIX_CC_WRAPPER_START_HOOK"; then
4+ source "$NIX_CC_WRAPPER_START_HOOK"
5fi
67if test -z "$NIX_CROSS_GLIBC_FLAGS_SET"; then
···107 done
108fi
109110+if test -n "$NIX_CC_WRAPPER_EXEC_HOOK"; then
111+ source "$NIX_CC_WRAPPER_EXEC_HOOK"
112fi
113114# We want gcc to call the wrapper linker, not that of binutils.
···1#! @shell@ -e
23-if test -n "$NIX_GCC_WRAPPER_START_HOOK"; then
4- source "$NIX_GCC_WRAPPER_START_HOOK"
5fi
67-if test -z "$NIX_GCC_WRAPPER_FLAGS_SET"; then
8 source @out@/nix-support/add-flags.sh
9fi
10···130 done
131fi
132133-if test -n "$NIX_GCC_WRAPPER_EXEC_HOOK"; then
134- source "$NIX_GCC_WRAPPER_EXEC_HOOK"
135fi
136137138# Call the real `gcc'. Filter out warnings from stderr about unused
139# `-B' flags, since they confuse some programs. Deep bash magic to
140# apply grep to stderr (by swapping stdin/stderr twice).
141-if test -z "$NIX_GCC_NEEDS_GREP"; then
142 @gccProg@ ${extraBefore[@]} "${params[@]}" ${extraAfter[@]}
143else
144 (@gccProg@ ${extraBefore[@]} "${params[@]}" ${extraAfter[@]} 3>&2 2>&1 1>&3- \
···1#! @shell@ -e
23+if test -n "$NIX_CC_WRAPPER_START_HOOK"; then
4+ source "$NIX_CC_WRAPPER_START_HOOK"
5fi
67+if test -z "$NIX_CC_WRAPPER_FLAGS_SET"; then
8 source @out@/nix-support/add-flags.sh
9fi
10···130 done
131fi
132133+if test -n "$NIX_CC_WRAPPER_EXEC_HOOK"; then
134+ source "$NIX_CC_WRAPPER_EXEC_HOOK"
135fi
136137138# Call the real `gcc'. Filter out warnings from stderr about unused
139# `-B' flags, since they confuse some programs. Deep bash magic to
140# apply grep to stderr (by swapping stdin/stderr twice).
141+if test -z "$NIX_CC_NEEDS_GREP"; then
142 @gccProg@ ${extraBefore[@]} "${params[@]}" ${extraAfter[@]}
143else
144 (@gccProg@ ${extraBefore[@]} "${params[@]}" ${extraAfter[@]} 3>&2 2>&1 1>&3- \
+1-1
pkgs/build-support/gcc-wrapper-old/ld-wrapper.sh
···4 source "$NIX_LD_WRAPPER_START_HOOK"
5fi
67-if test -z "$NIX_GCC_WRAPPER_FLAGS_SET"; then
8 source @out@/nix-support/add-flags.sh
9fi
10
···4 source "$NIX_LD_WRAPPER_START_HOOK"
5fi
67+if test -z "$NIX_CC_WRAPPER_FLAGS_SET"; then
8 source @out@/nix-support/add-flags.sh
9fi
10
···78if test "$noSysDirs" = "1"; then
910- if test -e $NIX_GCC/nix-support/orig-libc; then
1112 # Figure out what extra flags to pass to the gcc compilers
13 # being generated to make sure that they use our glibc.
14- extraCFlags="$(cat $NIX_GCC/nix-support/libc-cflags)"
15- extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
1617 # Use *real* header files, otherwise a limits.h is generated
18 # that does not include Glibc's limits.h (notably missing
19 # SSIZE_MAX, which breaks the build).
20- export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include
2122 else
23 # Hack: support impure environments.
···78if test "$noSysDirs" = "1"; then
910+ if test -e $NIX_CC/nix-support/orig-libc; then
1112 # Figure out what extra flags to pass to the gcc compilers
13 # being generated to make sure that they use our glibc.
14+ extraCFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
15+ extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
1617 # Use *real* header files, otherwise a limits.h is generated
18 # that does not include Glibc's limits.h (notably missing
19 # SSIZE_MAX, which breaks the build).
20+ export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
2122 else
23 # Hack: support impure environments.
···1415 # Figure out what extra flags to pass to the gcc compilers being
16 # generated to make sure that they use our glibc.
17- if test -e $NIX_GCC/nix-support/orig-glibc; then
18- glibc=$(cat $NIX_GCC/nix-support/orig-glibc)
1920 # Ugh. Copied from gcc-wrapper/builder.sh. We can't just
21- # source in $NIX_GCC/nix-support/add-flags, since that would
22 # cause *this* GCC to be linked against the *previous* GCC.
23 # Need some more modularity there.
24 extraCFlags="-B$glibc/lib -isystem $glibc/include"
···1415 # Figure out what extra flags to pass to the gcc compilers being
16 # generated to make sure that they use our glibc.
17+ if test -e $NIX_CC/nix-support/orig-glibc; then
18+ glibc=$(cat $NIX_CC/nix-support/orig-glibc)
1920 # Ugh. Copied from gcc-wrapper/builder.sh. We can't just
21+ # source in $NIX_CC/nix-support/add-flags, since that would
22 # cause *this* GCC to be linked against the *previous* GCC.
23 # Need some more modularity there.
24 extraCFlags="-B$glibc/lib -isystem $glibc/include"
+4-4
pkgs/development/compilers/gcc/4.3/builder.sh
···1213if test "$noSysDirs" = "1"; then
1415- if test -e $NIX_GCC/nix-support/orig-libc; then
1617 # Figure out what extra flags to pass to the gcc compilers
18 # being generated to make sure that they use our glibc.
19- extraCFlags="$(cat $NIX_GCC/nix-support/libc-cflags)"
20- extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
2122 # Use *real* header files, otherwise a limits.h is generated
23 # that does not include Glibc's limits.h (notably missing
24 # SSIZE_MAX, which breaks the build).
25- export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include
2627 else
28 # Hack: support impure environments.
···1213if test "$noSysDirs" = "1"; then
1415+ if test -e $NIX_CC/nix-support/orig-libc; then
1617 # Figure out what extra flags to pass to the gcc compilers
18 # being generated to make sure that they use our glibc.
19+ extraCFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
20+ extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
2122 # Use *real* header files, otherwise a limits.h is generated
23 # that does not include Glibc's limits.h (notably missing
24 # SSIZE_MAX, which breaks the build).
25+ export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
2627 else
28 # Hack: support impure environments.
+11-11
pkgs/development/compilers/gcc/4.4/builder.sh
···1718if test "$noSysDirs" = "1"; then
1920- if test -e $NIX_GCC/nix-support/orig-libc; then
2122 # Figure out what extra flags to pass to the gcc compilers
23 # being generated to make sure that they use our glibc.
24- extraFlags="$(cat $NIX_GCC/nix-support/libc-cflags)"
25- extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
2627 # Use *real* header files, otherwise a limits.h is generated
28 # that does not include Glibc's limits.h (notably missing
29 # SSIZE_MAX, which breaks the build).
30- export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include
3132 # The path to the Glibc binaries such as `crti.o'.
33- glibc_libdir="$(cat $NIX_GCC/nix-support/orig-libc)/lib"
3435 else
36 # Hack: support impure environments.
···61 EXTRA_LDFLAGS_TARGET="-Wl,-L${libcCross}/lib"
62 fi
63 else
64- if test -z "$NIX_GCC_CROSS"; then
65 EXTRA_FLAGS_TARGET="$EXTRA_FLAGS"
66 EXTRA_LDFLAGS_TARGET="$EXTRA_LDFLAGS"
67 else
68 # This the case of cross-building the gcc.
69 # We need special flags for the target, different than those of the build
70 # Assertion:
71- test -e $NIX_GCC_CROSS/nix-support/orig-libc
7273 # Figure out what extra flags to pass to the gcc compilers
74 # being generated to make sure that they use our glibc.
75- extraFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-cflags)"
76- extraLDFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-ldflags) $(cat $NIX_GCC_CROSS/nix-support/libc-ldflags-before)"
7778 # Use *real* header files, otherwise a limits.h is generated
79 # that does not include Glibc's limits.h (notably missing
80 # SSIZE_MAX, which breaks the build).
81- NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/include
8283 # The path to the Glibc binaries such as `crti.o'.
84- glibc_libdir="$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/lib"
8586 extraFlags="-g0 -O2 -I$NIX_FIXINC_DUMMY_CROSS $extraFlags"
87 extraLDFlags="--strip-debug -L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
···1718if test "$noSysDirs" = "1"; then
1920+ if test -e $NIX_CC/nix-support/orig-libc; then
2122 # Figure out what extra flags to pass to the gcc compilers
23 # being generated to make sure that they use our glibc.
24+ extraFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
25+ extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
2627 # Use *real* header files, otherwise a limits.h is generated
28 # that does not include Glibc's limits.h (notably missing
29 # SSIZE_MAX, which breaks the build).
30+ export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
3132 # The path to the Glibc binaries such as `crti.o'.
33+ glibc_libdir="$(cat $NIX_CC/nix-support/orig-libc)/lib"
3435 else
36 # Hack: support impure environments.
···61 EXTRA_LDFLAGS_TARGET="-Wl,-L${libcCross}/lib"
62 fi
63 else
64+ if test -z "$NIX_CC_CROSS"; then
65 EXTRA_FLAGS_TARGET="$EXTRA_FLAGS"
66 EXTRA_LDFLAGS_TARGET="$EXTRA_LDFLAGS"
67 else
68 # This the case of cross-building the gcc.
69 # We need special flags for the target, different than those of the build
70 # Assertion:
71+ test -e $NIX_CC_CROSS/nix-support/orig-libc
7273 # Figure out what extra flags to pass to the gcc compilers
74 # being generated to make sure that they use our glibc.
75+ extraFlags="$(cat $NIX_CC_CROSS/nix-support/libc-cflags)"
76+ extraLDFlags="$(cat $NIX_CC_CROSS/nix-support/libc-ldflags) $(cat $NIX_CC_CROSS/nix-support/libc-ldflags-before)"
7778 # Use *real* header files, otherwise a limits.h is generated
79 # that does not include Glibc's limits.h (notably missing
80 # SSIZE_MAX, which breaks the build).
81+ NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_CC_CROSS/nix-support/orig-libc)/include
8283 # The path to the Glibc binaries such as `crti.o'.
84+ glibc_libdir="$(cat $NIX_CC_CROSS/nix-support/orig-libc)/lib"
8586 extraFlags="-g0 -O2 -I$NIX_FIXINC_DUMMY_CROSS $extraFlags"
87 extraLDFlags="--strip-debug -L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
+1-1
pkgs/development/compilers/gcc/4.4/default.nix
···188 NM_FOR_TARGET = "${stdenv.cross.config}-nm";
189 CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
190 # If we are making a cross compiler, cross != null
191- NIX_GCC_CROSS = if cross == null then "${stdenv.gccCross}" else "";
192 configureFlags = "
193 ${if enableMultilib then "" else "--disable-multilib"}
194 ${if enableShared then "" else "--disable-shared"}
···188 NM_FOR_TARGET = "${stdenv.cross.config}-nm";
189 CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
190 # If we are making a cross compiler, cross != null
191+ NIX_CC_CROSS = if cross == null then "${stdenv.ccCross}" else "";
192 configureFlags = "
193 ${if enableMultilib then "" else "--disable-multilib"}
194 ${if enableShared then "" else "--disable-shared"}
+12-12
pkgs/development/compilers/gcc/4.5/builder.sh
···2324if test "$noSysDirs" = "1"; then
2526- if test -e $NIX_GCC/nix-support/orig-libc; then
2728 # Figure out what extra flags to pass to the gcc compilers
29 # being generated to make sure that they use our glibc.
30- extraFlags="$(cat $NIX_GCC/nix-support/libc-cflags)"
31- extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
3233 # Use *real* header files, otherwise a limits.h is generated
34 # that does not include Glibc's limits.h (notably missing
35 # SSIZE_MAX, which breaks the build).
36- export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include
3738 # The path to the Glibc binaries such as `crti.o'.
39- glibc_libdir="$(cat $NIX_GCC/nix-support/orig-libc)/lib"
4041 else
42 # Hack: support impure environments.
···67 EXTRA_TARGET_LDFLAGS="-Wl,-L${libcCross}/lib"
68 fi
69 else
70- if test -z "$NIX_GCC_CROSS"; then
71 EXTRA_TARGET_CFLAGS="$EXTRA_FLAGS"
72 EXTRA_TARGET_LDFLAGS="$EXTRA_LDFLAGS"
73 else
74 # This the case of cross-building the gcc.
75 # We need special flags for the target, different than those of the build
76 # Assertion:
77- test -e $NIX_GCC_CROSS/nix-support/orig-libc
7879 # Figure out what extra flags to pass to the gcc compilers
80 # being generated to make sure that they use our glibc.
81- extraFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-cflags)"
82- extraLDFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-ldflags) $(cat $NIX_GCC_CROSS/nix-support/libc-ldflags-before)"
8384 # Use *real* header files, otherwise a limits.h is generated
85 # that does not include Glibc's limits.h (notably missing
86 # SSIZE_MAX, which breaks the build).
87- NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/include
8889 # The path to the Glibc binaries such as `crti.o'.
90- glibc_libdir="$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/lib"
9192 extraFlags="-I$NIX_FIXINC_DUMMY_CROSS $extraFlags"
93 extraLDFlags="-L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
···162 # Patch the configure script so it finds glibc headers
163 # It's important for example in order not to get libssp built, because it's
164 # functionality is in glibc already.
165- glibc_headers="$(cat $NIX_GCC/nix-support/orig-libc)/include"
166 sed -i \
167 -e s,glibc_header_dir=/usr/include,glibc_header_dir=$glibc_headers, \
168 gcc/configure
···2324if test "$noSysDirs" = "1"; then
2526+ if test -e $NIX_CC/nix-support/orig-libc; then
2728 # Figure out what extra flags to pass to the gcc compilers
29 # being generated to make sure that they use our glibc.
30+ extraFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
31+ extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
3233 # Use *real* header files, otherwise a limits.h is generated
34 # that does not include Glibc's limits.h (notably missing
35 # SSIZE_MAX, which breaks the build).
36+ export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
3738 # The path to the Glibc binaries such as `crti.o'.
39+ glibc_libdir="$(cat $NIX_CC/nix-support/orig-libc)/lib"
4041 else
42 # Hack: support impure environments.
···67 EXTRA_TARGET_LDFLAGS="-Wl,-L${libcCross}/lib"
68 fi
69 else
70+ if test -z "$NIX_CC_CROSS"; then
71 EXTRA_TARGET_CFLAGS="$EXTRA_FLAGS"
72 EXTRA_TARGET_LDFLAGS="$EXTRA_LDFLAGS"
73 else
74 # This the case of cross-building the gcc.
75 # We need special flags for the target, different than those of the build
76 # Assertion:
77+ test -e $NIX_CC_CROSS/nix-support/orig-libc
7879 # Figure out what extra flags to pass to the gcc compilers
80 # being generated to make sure that they use our glibc.
81+ extraFlags="$(cat $NIX_CC_CROSS/nix-support/libc-cflags)"
82+ extraLDFlags="$(cat $NIX_CC_CROSS/nix-support/libc-ldflags) $(cat $NIX_CC_CROSS/nix-support/libc-ldflags-before)"
8384 # Use *real* header files, otherwise a limits.h is generated
85 # that does not include Glibc's limits.h (notably missing
86 # SSIZE_MAX, which breaks the build).
87+ NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_CC_CROSS/nix-support/orig-libc)/include
8889 # The path to the Glibc binaries such as `crti.o'.
90+ glibc_libdir="$(cat $NIX_CC_CROSS/nix-support/orig-libc)/lib"
9192 extraFlags="-I$NIX_FIXINC_DUMMY_CROSS $extraFlags"
93 extraLDFlags="-L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
···162 # Patch the configure script so it finds glibc headers
163 # It's important for example in order not to get libssp built, because it's
164 # functionality is in glibc already.
165+ glibc_headers="$(cat $NIX_CC/nix-support/orig-libc)/include"
166 sed -i \
167 -e s,glibc_header_dir=/usr/include,glibc_header_dir=$glibc_headers, \
168 gcc/configure
+3-3
pkgs/development/compilers/gcc/4.5/default.nix
···185 sed -i gcc/config/t-gnu \
186 -es'|NATIVE_SYSTEM_HEADER_DIR.*$|NATIVE_SYSTEM_HEADER_DIR = ${libc}/include|g'
187 ''
188- else if cross != null || stdenv.gcc.libc != null then
189 # On NixOS, use the right path to the dynamic linker instead of
190 # `/lib/ld*.so'.
191 let
192- libc = if libcCross != null then libcCross else stdenv.gcc.libc;
193 in
194 '' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..."
195 for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
···272 NM_FOR_TARGET = "${stdenv.cross.config}-nm";
273 CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
274 # If we are making a cross compiler, cross != null
275- NIX_GCC_CROSS = if cross == null then "${stdenv.gccCross}" else "";
276 dontStrip = true;
277 configureFlags = ''
278 ${if enableMultilib then "" else "--disable-multilib"}
···185 sed -i gcc/config/t-gnu \
186 -es'|NATIVE_SYSTEM_HEADER_DIR.*$|NATIVE_SYSTEM_HEADER_DIR = ${libc}/include|g'
187 ''
188+ else if cross != null || stdenv.cc.libc != null then
189 # On NixOS, use the right path to the dynamic linker instead of
190 # `/lib/ld*.so'.
191 let
192+ libc = if libcCross != null then libcCross else stdenv.cc.libc;
193 in
194 '' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..."
195 for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
···272 NM_FOR_TARGET = "${stdenv.cross.config}-nm";
273 CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
274 # If we are making a cross compiler, cross != null
275+ NIX_CC_CROSS = if cross == null then "${stdenv.ccCross}" else "";
276 dontStrip = true;
277 configureFlags = ''
278 ${if enableMultilib then "" else "--disable-multilib"}
+13-13
pkgs/development/compilers/gcc/4.6/builder.sh
···1920if test "$noSysDirs" = "1"; then
2122- if test -e $NIX_GCC/nix-support/orig-libc; then
2324 # Figure out what extra flags to pass to the gcc compilers
25 # being generated to make sure that they use our glibc.
26- extraFlags="$(cat $NIX_GCC/nix-support/libc-cflags)"
27- extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
2829 # Use *real* header files, otherwise a limits.h is generated
30 # that does not include Glibc's limits.h (notably missing
31 # SSIZE_MAX, which breaks the build).
32- export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include
3334 # The path to the Glibc binaries such as `crti.o'.
35- glibc_libdir="$(cat $NIX_GCC/nix-support/orig-libc)/lib"
3637 else
38 # Hack: support impure environments.
···74 EXTRA_TARGET_LDFLAGS="-Wl,-L${libcCross}/lib"
75 fi
76 else
77- if test -z "$NIX_GCC_CROSS"; then
78 EXTRA_TARGET_CFLAGS="$EXTRA_FLAGS"
79 EXTRA_TARGET_LDFLAGS="$EXTRA_LDFLAGS"
80 else
81 # This the case of cross-building the gcc.
82 # We need special flags for the target, different than those of the build
83 # Assertion:
84- test -e $NIX_GCC_CROSS/nix-support/orig-libc
8586 # Figure out what extra flags to pass to the gcc compilers
87 # being generated to make sure that they use our glibc.
88- extraFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-cflags)"
89- extraLDFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-ldflags) $(cat $NIX_GCC_CROSS/nix-support/libc-ldflags-before)"
9091 # Use *real* header files, otherwise a limits.h is generated
92 # that does not include Glibc's limits.h (notably missing
93 # SSIZE_MAX, which breaks the build).
94- NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/include
9596 # The path to the Glibc binaries such as `crti.o'.
97- glibc_libdir="$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/lib"
9899 extraFlags="-I$NIX_FIXINC_DUMMY_CROSS $extraFlags"
100 extraLDFlags="-L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
···166 rm -Rf zlib
167 fi
168169- if test -f "$NIX_GCC/nix-support/orig-libc"; then
170 # Patch the configure script so it finds glibc headers. It's
171 # important for example in order not to get libssp built,
172 # because its functionality is in glibc already.
173- glibc_headers="$(cat $NIX_GCC/nix-support/orig-libc)/include"
174 sed -i \
175 -e "s,glibc_header_dir=/usr/include,glibc_header_dir=$glibc_headers", \
176 gcc/configure
···1920if test "$noSysDirs" = "1"; then
2122+ if test -e $NIX_CC/nix-support/orig-libc; then
2324 # Figure out what extra flags to pass to the gcc compilers
25 # being generated to make sure that they use our glibc.
26+ extraFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
27+ extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
2829 # Use *real* header files, otherwise a limits.h is generated
30 # that does not include Glibc's limits.h (notably missing
31 # SSIZE_MAX, which breaks the build).
32+ export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
3334 # The path to the Glibc binaries such as `crti.o'.
35+ glibc_libdir="$(cat $NIX_CC/nix-support/orig-libc)/lib"
3637 else
38 # Hack: support impure environments.
···74 EXTRA_TARGET_LDFLAGS="-Wl,-L${libcCross}/lib"
75 fi
76 else
77+ if test -z "$NIX_CC_CROSS"; then
78 EXTRA_TARGET_CFLAGS="$EXTRA_FLAGS"
79 EXTRA_TARGET_LDFLAGS="$EXTRA_LDFLAGS"
80 else
81 # This the case of cross-building the gcc.
82 # We need special flags for the target, different than those of the build
83 # Assertion:
84+ test -e $NIX_CC_CROSS/nix-support/orig-libc
8586 # Figure out what extra flags to pass to the gcc compilers
87 # being generated to make sure that they use our glibc.
88+ extraFlags="$(cat $NIX_CC_CROSS/nix-support/libc-cflags)"
89+ extraLDFlags="$(cat $NIX_CC_CROSS/nix-support/libc-ldflags) $(cat $NIX_CC_CROSS/nix-support/libc-ldflags-before)"
9091 # Use *real* header files, otherwise a limits.h is generated
92 # that does not include Glibc's limits.h (notably missing
93 # SSIZE_MAX, which breaks the build).
94+ NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_CC_CROSS/nix-support/orig-libc)/include
9596 # The path to the Glibc binaries such as `crti.o'.
97+ glibc_libdir="$(cat $NIX_CC_CROSS/nix-support/orig-libc)/lib"
9899 extraFlags="-I$NIX_FIXINC_DUMMY_CROSS $extraFlags"
100 extraLDFlags="-L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
···166 rm -Rf zlib
167 fi
168169+ if test -f "$NIX_CC/nix-support/orig-libc"; then
170 # Patch the configure script so it finds glibc headers. It's
171 # important for example in order not to get libssp built,
172 # because its functionality is in glibc already.
173+ glibc_headers="$(cat $NIX_CC/nix-support/orig-libc)/include"
174 sed -i \
175 -e "s,glibc_header_dir=/usr/include,glibc_header_dir=$glibc_headers", \
176 gcc/configure
+3-3
pkgs/development/compilers/gcc/4.6/default.nix
···229 sed -i gcc/config/t-gnu \
230 -es'|NATIVE_SYSTEM_HEADER_DIR.*$|NATIVE_SYSTEM_HEADER_DIR = ${libc}/include|g'
231 ''
232- else if cross != null || stdenv.gcc.libc != null then
233 # On NixOS, use the right path to the dynamic linker instead of
234 # `/lib/ld*.so'.
235 let
236- libc = if libcCross != null then libcCross else stdenv.gcc.libc;
237 in
238 '' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..."
239 for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
···339 NM_FOR_TARGET = "${stdenv.cross.config}-nm";
340 CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
341 # If we are making a cross compiler, cross != null
342- NIX_GCC_CROSS = if cross == null then "${stdenv.gccCross}" else "";
343 dontStrip = true;
344 configureFlags = ''
345 ${if enableMultilib then "" else "--disable-multilib"}
···229 sed -i gcc/config/t-gnu \
230 -es'|NATIVE_SYSTEM_HEADER_DIR.*$|NATIVE_SYSTEM_HEADER_DIR = ${libc}/include|g'
231 ''
232+ else if cross != null || stdenv.cc.libc != null then
233 # On NixOS, use the right path to the dynamic linker instead of
234 # `/lib/ld*.so'.
235 let
236+ libc = if libcCross != null then libcCross else stdenv.cc.libc;
237 in
238 '' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..."
239 for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
···339 NM_FOR_TARGET = "${stdenv.cross.config}-nm";
340 CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
341 # If we are making a cross compiler, cross != null
342+ NIX_CC_CROSS = if cross == null then "${stdenv.ccCross}" else "";
343 dontStrip = true;
344 configureFlags = ''
345 ${if enableMultilib then "" else "--disable-multilib"}
+13-13
pkgs/development/compilers/gcc/4.8/builder.sh
···1920if test "$noSysDirs" = "1"; then
2122- if test -e $NIX_GCC/nix-support/orig-libc; then
2324 # Figure out what extra flags to pass to the gcc compilers
25 # being generated to make sure that they use our glibc.
26- extraFlags="$(cat $NIX_GCC/nix-support/libc-cflags)"
27- extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
2829 # Use *real* header files, otherwise a limits.h is generated
30 # that does not include Glibc's limits.h (notably missing
31 # SSIZE_MAX, which breaks the build).
32- export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include
3334 # The path to the Glibc binaries such as `crti.o'.
35- glibc_libdir="$(cat $NIX_GCC/nix-support/orig-libc)/lib"
3637 else
38 # Hack: support impure environments.
···74 EXTRA_TARGET_LDFLAGS="-Wl,-L${libcCross}/lib -Wl,-rpath,${libcCross}/lib -Wl,-rpath-link,${libcCross}/lib"
75 fi
76 else
77- if test -z "$NIX_GCC_CROSS"; then
78 EXTRA_TARGET_CFLAGS="$EXTRA_FLAGS"
79 EXTRA_TARGET_CXXFLAGS="$EXTRA_FLAGS"
80 EXTRA_TARGET_LDFLAGS="$EXTRA_LDFLAGS"
···82 # This the case of cross-building the gcc.
83 # We need special flags for the target, different than those of the build
84 # Assertion:
85- test -e $NIX_GCC_CROSS/nix-support/orig-libc
8687 # Figure out what extra flags to pass to the gcc compilers
88 # being generated to make sure that they use our glibc.
89- extraFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-cflags)"
90- extraLDFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-ldflags) $(cat $NIX_GCC_CROSS/nix-support/libc-ldflags-before)"
9192 # Use *real* header files, otherwise a limits.h is generated
93 # that does not include Glibc's limits.h (notably missing
94 # SSIZE_MAX, which breaks the build).
95- NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/include
9697 # The path to the Glibc binaries such as `crti.o'.
98- glibc_dir="$(cat $NIX_GCC_CROSS/nix-support/orig-libc)"
99 glibc_libdir="$glibc_dir/lib"
100 configureFlags="$configureFlags --with-native-system-header-dir=$glibc_dir/include"
101···167 rm -Rf zlib
168 fi
169170- if test -f "$NIX_GCC/nix-support/orig-libc"; then
171 # Patch the configure script so it finds glibc headers. It's
172 # important for example in order not to get libssp built,
173 # because its functionality is in glibc already.
174- glibc_headers="$(cat $NIX_GCC/nix-support/orig-libc)/include"
175 sed -i \
176 -e "s,glibc_header_dir=/usr/include,glibc_header_dir=$glibc_headers", \
177 gcc/configure
···1920if test "$noSysDirs" = "1"; then
2122+ if test -e $NIX_CC/nix-support/orig-libc; then
2324 # Figure out what extra flags to pass to the gcc compilers
25 # being generated to make sure that they use our glibc.
26+ extraFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
27+ extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
2829 # Use *real* header files, otherwise a limits.h is generated
30 # that does not include Glibc's limits.h (notably missing
31 # SSIZE_MAX, which breaks the build).
32+ export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
3334 # The path to the Glibc binaries such as `crti.o'.
35+ glibc_libdir="$(cat $NIX_CC/nix-support/orig-libc)/lib"
3637 else
38 # Hack: support impure environments.
···74 EXTRA_TARGET_LDFLAGS="-Wl,-L${libcCross}/lib -Wl,-rpath,${libcCross}/lib -Wl,-rpath-link,${libcCross}/lib"
75 fi
76 else
77+ if test -z "$NIX_CC_CROSS"; then
78 EXTRA_TARGET_CFLAGS="$EXTRA_FLAGS"
79 EXTRA_TARGET_CXXFLAGS="$EXTRA_FLAGS"
80 EXTRA_TARGET_LDFLAGS="$EXTRA_LDFLAGS"
···82 # This the case of cross-building the gcc.
83 # We need special flags for the target, different than those of the build
84 # Assertion:
85+ test -e $NIX_CC_CROSS/nix-support/orig-libc
8687 # Figure out what extra flags to pass to the gcc compilers
88 # being generated to make sure that they use our glibc.
89+ extraFlags="$(cat $NIX_CC_CROSS/nix-support/libc-cflags)"
90+ extraLDFlags="$(cat $NIX_CC_CROSS/nix-support/libc-ldflags) $(cat $NIX_CC_CROSS/nix-support/libc-ldflags-before)"
9192 # Use *real* header files, otherwise a limits.h is generated
93 # that does not include Glibc's limits.h (notably missing
94 # SSIZE_MAX, which breaks the build).
95+ NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_CC_CROSS/nix-support/orig-libc)/include
9697 # The path to the Glibc binaries such as `crti.o'.
98+ glibc_dir="$(cat $NIX_CC_CROSS/nix-support/orig-libc)"
99 glibc_libdir="$glibc_dir/lib"
100 configureFlags="$configureFlags --with-native-system-header-dir=$glibc_dir/include"
101···167 rm -Rf zlib
168 fi
169170+ if test -f "$NIX_CC/nix-support/orig-libc"; then
171 # Patch the configure script so it finds glibc headers. It's
172 # important for example in order not to get libssp built,
173 # because its functionality is in glibc already.
174+ glibc_headers="$(cat $NIX_CC/nix-support/orig-libc)/include"
175 sed -i \
176 -e "s,glibc_header_dir=/usr/include,glibc_header_dir=$glibc_headers", \
177 gcc/configure
+3-3
pkgs/development/compilers/gcc/4.8/default.nix
···251 sed -i "${gnu_h}" \
252 -es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc}/include"|g'
253 ''
254- else if cross != null || stdenv.gcc.libc != null then
255 # On NixOS, use the right path to the dynamic linker instead of
256 # `/lib/ld*.so'.
257 let
258- libc = if libcCross != null then libcCross else stdenv.gcc.libc;
259 in
260 '' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..."
261 for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
···397 NM_FOR_TARGET = "${stdenv.cross.config}-nm";
398 CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
399 # If we are making a cross compiler, cross != null
400- NIX_GCC_CROSS = if cross == null then "${stdenv.gccCross}" else "";
401 dontStrip = true;
402 configureFlags = ''
403 ${if enableMultilib then "" else "--disable-multilib"}
···251 sed -i "${gnu_h}" \
252 -es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc}/include"|g'
253 ''
254+ else if cross != null || stdenv.cc.libc != null then
255 # On NixOS, use the right path to the dynamic linker instead of
256 # `/lib/ld*.so'.
257 let
258+ libc = if libcCross != null then libcCross else stdenv.cc.libc;
259 in
260 '' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..."
261 for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
···397 NM_FOR_TARGET = "${stdenv.cross.config}-nm";
398 CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
399 # If we are making a cross compiler, cross != null
400+ NIX_CC_CROSS = if cross == null then "${stdenv.ccCross}" else "";
401 dontStrip = true;
402 configureFlags = ''
403 ${if enableMultilib then "" else "--disable-multilib"}
+13-13
pkgs/development/compilers/gcc/4.9/builder.sh
···1920if test "$noSysDirs" = "1"; then
2122- if test -e $NIX_GCC/nix-support/orig-libc; then
2324 # Figure out what extra flags to pass to the gcc compilers
25 # being generated to make sure that they use our glibc.
26- extraFlags="$(cat $NIX_GCC/nix-support/libc-cflags)"
27- extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
2829 # Use *real* header files, otherwise a limits.h is generated
30 # that does not include Glibc's limits.h (notably missing
31 # SSIZE_MAX, which breaks the build).
32- export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include
3334 # The path to the Glibc binaries such as `crti.o'.
35- glibc_libdir="$(cat $NIX_GCC/nix-support/orig-libc)/lib"
3637 else
38 # Hack: support impure environments.
···74 EXTRA_TARGET_LDFLAGS="-Wl,-L${libcCross}/lib -Wl,-rpath,${libcCross}/lib -Wl,-rpath-link,${libcCross}/lib"
75 fi
76 else
77- if test -z "$NIX_GCC_CROSS"; then
78 EXTRA_TARGET_CFLAGS="$EXTRA_FLAGS"
79 EXTRA_TARGET_CXXFLAGS="$EXTRA_FLAGS"
80 EXTRA_TARGET_LDFLAGS="$EXTRA_LDFLAGS"
···82 # This the case of cross-building the gcc.
83 # We need special flags for the target, different than those of the build
84 # Assertion:
85- test -e $NIX_GCC_CROSS/nix-support/orig-libc
8687 # Figure out what extra flags to pass to the gcc compilers
88 # being generated to make sure that they use our glibc.
89- extraFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-cflags)"
90- extraLDFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-ldflags) $(cat $NIX_GCC_CROSS/nix-support/libc-ldflags-before)"
9192 # Use *real* header files, otherwise a limits.h is generated
93 # that does not include Glibc's limits.h (notably missing
94 # SSIZE_MAX, which breaks the build).
95- NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/include
9697 # The path to the Glibc binaries such as `crti.o'.
98- glibc_dir="$(cat $NIX_GCC_CROSS/nix-support/orig-libc)"
99 glibc_libdir="$glibc_dir/lib"
100 configureFlags="$configureFlags --with-native-system-header-dir=$glibc_dir/include"
101···171 rm -Rf zlib
172 fi
173174- if test -f "$NIX_GCC/nix-support/orig-libc"; then
175 # Patch the configure script so it finds glibc headers. It's
176 # important for example in order not to get libssp built,
177 # because its functionality is in glibc already.
178- glibc_headers="$(cat $NIX_GCC/nix-support/orig-libc)/include"
179 sed -i \
180 -e "s,glibc_header_dir=/usr/include,glibc_header_dir=$glibc_headers", \
181 gcc/configure
···1920if test "$noSysDirs" = "1"; then
2122+ if test -e $NIX_CC/nix-support/orig-libc; then
2324 # Figure out what extra flags to pass to the gcc compilers
25 # being generated to make sure that they use our glibc.
26+ extraFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
27+ extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
2829 # Use *real* header files, otherwise a limits.h is generated
30 # that does not include Glibc's limits.h (notably missing
31 # SSIZE_MAX, which breaks the build).
32+ export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
3334 # The path to the Glibc binaries such as `crti.o'.
35+ glibc_libdir="$(cat $NIX_CC/nix-support/orig-libc)/lib"
3637 else
38 # Hack: support impure environments.
···74 EXTRA_TARGET_LDFLAGS="-Wl,-L${libcCross}/lib -Wl,-rpath,${libcCross}/lib -Wl,-rpath-link,${libcCross}/lib"
75 fi
76 else
77+ if test -z "$NIX_CC_CROSS"; then
78 EXTRA_TARGET_CFLAGS="$EXTRA_FLAGS"
79 EXTRA_TARGET_CXXFLAGS="$EXTRA_FLAGS"
80 EXTRA_TARGET_LDFLAGS="$EXTRA_LDFLAGS"
···82 # This the case of cross-building the gcc.
83 # We need special flags for the target, different than those of the build
84 # Assertion:
85+ test -e $NIX_CC_CROSS/nix-support/orig-libc
8687 # Figure out what extra flags to pass to the gcc compilers
88 # being generated to make sure that they use our glibc.
89+ extraFlags="$(cat $NIX_CC_CROSS/nix-support/libc-cflags)"
90+ extraLDFlags="$(cat $NIX_CC_CROSS/nix-support/libc-ldflags) $(cat $NIX_CC_CROSS/nix-support/libc-ldflags-before)"
9192 # Use *real* header files, otherwise a limits.h is generated
93 # that does not include Glibc's limits.h (notably missing
94 # SSIZE_MAX, which breaks the build).
95+ NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_CC_CROSS/nix-support/orig-libc)/include
9697 # The path to the Glibc binaries such as `crti.o'.
98+ glibc_dir="$(cat $NIX_CC_CROSS/nix-support/orig-libc)"
99 glibc_libdir="$glibc_dir/lib"
100 configureFlags="$configureFlags --with-native-system-header-dir=$glibc_dir/include"
101···171 rm -Rf zlib
172 fi
173174+ if test -f "$NIX_CC/nix-support/orig-libc"; then
175 # Patch the configure script so it finds glibc headers. It's
176 # important for example in order not to get libssp built,
177 # because its functionality is in glibc already.
178+ glibc_headers="$(cat $NIX_CC/nix-support/orig-libc)/include"
179 sed -i \
180 -e "s,glibc_header_dir=/usr/include,glibc_header_dir=$glibc_headers", \
181 gcc/configure
+3-3
pkgs/development/compilers/gcc/4.9/default.nix
···247 sed -i "${gnu_h}" \
248 -es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc}/include"|g'
249 ''
250- else if cross != null || stdenv.gcc.libc != null then
251 # On NixOS, use the right path to the dynamic linker instead of
252 # `/lib/ld*.so'.
253 let
254- libc = if libcCross != null then libcCross else stdenv.gcc.libc;
255 in
256 '' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..."
257 for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
···385 NM_FOR_TARGET = "${stdenv.cross.config}-nm";
386 CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
387 # If we are making a cross compiler, cross != null
388- NIX_GCC_CROSS = if cross == null then "${stdenv.gccCross}" else "";
389 dontStrip = true;
390 configureFlags = ''
391 ${if enableMultilib then "" else "--disable-multilib"}
···247 sed -i "${gnu_h}" \
248 -es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc}/include"|g'
249 ''
250+ else if cross != null || stdenv.cc.libc != null then
251 # On NixOS, use the right path to the dynamic linker instead of
252 # `/lib/ld*.so'.
253 let
254+ libc = if libcCross != null then libcCross else stdenv.cc.libc;
255 in
256 '' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..."
257 for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
···385 NM_FOR_TARGET = "${stdenv.cross.config}-nm";
386 CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
387 # If we are making a cross compiler, cross != null
388+ NIX_CC_CROSS = if cross == null then "${stdenv.ccCross}" else "";
389 dontStrip = true;
390 configureFlags = ''
391 ${if enableMultilib then "" else "--disable-multilib"}
···22 '';
2324 configureFlags=[
25- "--with-gcc=${stdenv.gcc}/bin/gcc"
26 ];
2728 # required, because otherwise all symbols from HSffi.o are stripped, and
···22 '';
2324 configureFlags=[
25+ "--with-gcc=${stdenv.cc}/bin/gcc"
26 ];
2728 # required, because otherwise all symbols from HSffi.o are stripped, and
+1-1
pkgs/development/compilers/ghc/6.12.2.nix
···22 '';
2324 configureFlags=[
25- "--with-gcc=${stdenv.gcc}/bin/gcc"
26 ];
2728 # required, because otherwise all symbols from HSffi.o are stripped, and
···22 '';
2324 configureFlags=[
25+ "--with-gcc=${stdenv.cc}/bin/gcc"
26 ];
2728 # required, because otherwise all symbols from HSffi.o are stripped, and
···22 '';
2324 configureFlags=[
25- "--with-gcc=${stdenv.gcc}/bin/gcc"
26 ];
2728 # required, because otherwise all symbols from HSffi.o are stripped, and
···22 '';
2324 configureFlags=[
25+ "--with-gcc=${stdenv.cc}/bin/gcc"
26 ];
2728 # required, because otherwise all symbols from HSffi.o are stripped, and
+1-1
pkgs/development/compilers/ghc/7.0.2.nix
···22 '';
2324 configureFlags=[
25- "--with-gcc=${stdenv.gcc}/bin/gcc"
26 ];
2728 # required, because otherwise all symbols from HSffi.o are stripped, and
···22 '';
2324 configureFlags=[
25+ "--with-gcc=${stdenv.cc}/bin/gcc"
26 ];
2728 # required, because otherwise all symbols from HSffi.o are stripped, and
+1-1
pkgs/development/compilers/ghc/7.0.3.nix
···22 '';
2324 configureFlags=[
25- "--with-gcc=${stdenv.gcc}/bin/gcc"
26 ];
2728 # required, because otherwise all symbols from HSffi.o are stripped, and
···22 '';
2324 configureFlags=[
25+ "--with-gcc=${stdenv.cc}/bin/gcc"
26 ];
2728 # required, because otherwise all symbols from HSffi.o are stripped, and
···22 '';
2324 configureFlags=[
25- "--with-gcc=${stdenv.gcc}/bin/gcc"
26 ];
2728 # required, because otherwise all symbols from HSffi.o are stripped, and
···22 '';
2324 configureFlags=[
25+ "--with-gcc=${stdenv.cc}/bin/gcc"
26 ];
2728 # required, because otherwise all symbols from HSffi.o are stripped, and
···22 '';
2324 configureFlags=[
25- "--with-gcc=${stdenv.gcc}/bin/gcc"
26 ];
2728 # required, because otherwise all symbols from HSffi.o are stripped, and
···22 '';
2324 configureFlags=[
25+ "--with-gcc=${stdenv.cc}/bin/gcc"
26 ];
2728 # required, because otherwise all symbols from HSffi.o are stripped, and
···26 '';
2728 configureFlags=[
29- "--with-gcc=${stdenv.gcc}/bin/gcc"
30 ];
3132 # required, because otherwise all symbols from HSffi.o are stripped, and
···26 '';
2728 configureFlags=[
29+ "--with-gcc=${stdenv.cc}/bin/gcc"
30 ];
3132 # required, because otherwise all symbols from HSffi.o are stripped, and
+1-1
pkgs/development/compilers/ghc/7.6.1.nix
···23 '';
2425 configureFlags=[
26- "--with-gcc=${stdenv.gcc}/bin/gcc"
27 ];
2829 # required, because otherwise all symbols from HSffi.o are stripped, and
···23 '';
2425 configureFlags=[
26+ "--with-gcc=${stdenv.cc}/bin/gcc"
27 ];
2829 # required, because otherwise all symbols from HSffi.o are stripped, and
+1-1
pkgs/development/compilers/ghc/7.6.2.nix
···24 '';
2526 configureFlags = [
27- "--with-gcc=${stdenv.gcc}/bin/gcc"
28 ];
2930 # required, because otherwise all symbols from HSffi.o are stripped, and
···24 '';
2526 configureFlags = [
27+ "--with-gcc=${stdenv.cc}/bin/gcc"
28 ];
2930 # required, because otherwise all symbols from HSffi.o are stripped, and
+1-1
pkgs/development/compilers/ghc/7.6.3.nix
···41 export NIX_LDFLAGS="$NIX_LDFLAGS -rpath $out/lib/ghc-${version}"
42 '';
4344- configureFlags = "--with-gcc=${stdenv.gcc}/bin/gcc";
4546 postInstall = ''
47 # ghci uses mmap with rwx protection at it implements dynamic
···41 export NIX_LDFLAGS="$NIX_LDFLAGS -rpath $out/lib/ghc-${version}"
42 '';
4344+ configureFlags = "--with-gcc=${stdenv.cc}/bin/gcc";
4546 postInstall = ''
47 # ghci uses mmap with rwx protection at it implements dynamic
···8, withGd ? false, gd ? null, libpng ? null
9}:
1011-assert stdenv.gcc.gcc != null;
1213let
14 build = import ./common.nix;
···33 # libgcc_s will not be at {gcc}/lib, and gcc's libgcc will be found without
34 # any special hack.
35 preInstall = ''
36- if [ -f ${stdenv.gcc.gcc}/lib/libgcc_s.so.1 ]; then
37 mkdir -p $out/lib
38- cp ${stdenv.gcc.gcc}/lib/libgcc_s.so.1 $out/lib/libgcc_s.so.1
39 fi
40 '';
41
···8, withGd ? false, gd ? null, libpng ? null
9}:
1011+assert stdenv.cc ? gcc;
1213let
14 build = import ./common.nix;
···33 # libgcc_s will not be at {gcc}/lib, and gcc's libgcc will be found without
34 # any special hack.
35 preInstall = ''
36+ if [ -f ${stdenv.cc.gcc}/lib/libgcc_s.so.1 ]; then
37 mkdir -p $out/lib
38+ cp ${stdenv.cc.gcc}/lib/libgcc_s.so.1 $out/lib/libgcc_s.so.1
39 fi
40 '';
41
···22 ar x opensc-dnie*
23 tar xf data.tar.gz
2425- RPATH=${glib}/lib:${opensc}/lib:${openssl}/lib:${openct}/lib:${libtool}/lib:${pcsclite}/lib:${stdenv.gcc.libc}/lib:${zlib}/lib
2627 for a in "usr/lib/"*.so*; do
28 if ! test -L $a; then
···22 ar x opensc-dnie*
23 tar xf data.tar.gz
2425+ RPATH=${glib}/lib:${opensc}/lib:${openssl}/lib:${openct}/lib:${libtool}/lib:${pcsclite}/lib:${stdenv.cc.libc}/lib:${zlib}/lib
2627 for a in "usr/lib/"*.so*; do
28 if ! test -L $a; then
···45 # remove impure reference to /usr/lib/libstdc++.6.dylib
46 # there might be more references, but this is the only one I could find
47 substituteInPlace tools/macdeployqt/tests/tst_deployment_mac.cpp \
48- --replace /usr/lib/libstdc++.6.dylib "${stdenv.gcc}/lib/libstdc++.6.dylib"
49 '';
5051 patches =
···53 (substituteAll {
54 src = ./dlopen-absolute-paths.diff;
55 inherit cups icu libXfixes;
56- glibc = stdenv.gcc.libc;
57 openglDriver = if mesaSupported then mesa.driverLink else "/no-such-path";
58 })
59 ] ++ stdenv.lib.optional gtkStyle (substituteAll {
···45 # remove impure reference to /usr/lib/libstdc++.6.dylib
46 # there might be more references, but this is the only one I could find
47 substituteInPlace tools/macdeployqt/tests/tst_deployment_mac.cpp \
48+ --replace /usr/lib/libstdc++.6.dylib "${stdenv.cc}/lib/libstdc++.6.dylib"
49 '';
5051 patches =
···53 (substituteAll {
54 src = ./dlopen-absolute-paths.diff;
55 inherit cups icu libXfixes;
56+ glibc = stdenv.cc.libc;
57 openglDriver = if mesaSupported then mesa.driverLink else "/no-such-path";
58 })
59 ] ++ stdenv.lib.optional gtkStyle (substituteAll {
+2-2
pkgs/development/libraries/scmccid/default.nix
···1{stdenv, fetchurl, patchelf, libusb}:
23-assert stdenv ? gcc && stdenv.gcc.libc != null;
45stdenv.mkDerivation rec {
6 name = "scmccid-5.0.11";
···18 buildInputs = [ patchelf ];
1920 installPhase = ''
21- RPATH=${libusb}/lib:${stdenv.gcc.libc}/lib
2223 for a in proprietary/*/Contents/Linux/*.so*; do
24 if ! test -L $a; then
···1{stdenv, fetchurl, patchelf, libusb}:
23+assert stdenv ? cc && stdenv.cc.libc != null;
45stdenv.mkDerivation rec {
6 name = "scmccid-5.0.11";
···18 buildInputs = [ patchelf ];
1920 installPhase = ''
21+ RPATH=${libusb}/lib:${stdenv.cc.libc}/lib
2223 for a in proprietary/*/Contents/Linux/*.so*; do
24 if ! test -L $a; then
···39 fixLoaderPath =
40 let dollar = "\$"; in
41 '' sed -i "$out/bin/castle-combat" \
42- -e "/^exec/ iexport LD_LIBRARY_PATH=\"$(cat ${stdenv.gcc}/nix-support/orig-gcc)/lib\:"'${dollar}'"LD_LIBRARY_PATH\"\\
43-export LD_LIBRARY_PATH=\"$(cat ${stdenv.gcc}/nix-support/orig-gcc)/lib64\:"'${dollar}'"LD_LIBRARY_PATH\""
44 '';
45 # ^
46 # `--- The run-time says: "libgcc_s.so.1 must be installed for
···39 fixLoaderPath =
40 let dollar = "\$"; in
41 '' sed -i "$out/bin/castle-combat" \
42+ -e "/^exec/ iexport LD_LIBRARY_PATH=\"$(cat ${stdenv.cc}/nix-support/orig-gcc)/lib\:"'${dollar}'"LD_LIBRARY_PATH\"\\
43+export LD_LIBRARY_PATH=\"$(cat ${stdenv.cc}/nix-support/orig-gcc)/lib64\:"'${dollar}'"LD_LIBRARY_PATH\""
44 '';
45 # ^
46 # `--- The run-time says: "libgcc_s.so.1 must be installed for
+2-2
pkgs/games/gemrb/default.nix
···1{ stdenv, fetchurl, cmake, SDL, openal, zlib, libpng, python, libvorbis }:
23-assert stdenv.gcc.libc != null;
45stdenv.mkDerivation rec {
6 name = "gemrb-0.8.1";
···14 # TODO: make libpng, libvorbis, sdl_mixer, freetype, vlc, glew (and other gl reqs) optional
1516 # Necessary to find libdl.
17- CMAKE_LIBRARY_PATH = "${stdenv.gcc.libc}/lib";
1819 # Can't have -werror because of the Vorbis header files.
20 cmakeFlags = "-DDISABLE_WERROR=ON -DCMAKE_VERBOSE_MAKEFILE=ON";
···1{ stdenv, fetchurl, cmake, SDL, openal, zlib, libpng, python, libvorbis }:
23+assert stdenv.cc.libc != null;
45stdenv.mkDerivation rec {
6 name = "gemrb-0.8.1";
···14 # TODO: make libpng, libvorbis, sdl_mixer, freetype, vlc, glew (and other gl reqs) optional
1516 # Necessary to find libdl.
17+ CMAKE_LIBRARY_PATH = "${stdenv.cc.libc}/lib";
1819 # Can't have -werror because of the Vorbis header files.
20 cmakeFlags = "-DDISABLE_WERROR=ON -DCMAKE_VERBOSE_MAKEFILE=ON";
···25 cp -r * $out/res
2627 patchelf --set-interpreter ${glibc}/lib/ld-linux.so.2 \
28- --set-rpath ${stdenv.gcc.gcc}/lib:${libX11}/lib:${mesa}/lib \
29 "$out/res/Tibia"
3031 # We've patchelf'd the files. The main ‘Tibia’ binary is a bit
···25 cp -r * $out/res
2627 patchelf --set-interpreter ${glibc}/lib/ld-linux.so.2 \
28+ --set-rpath ${stdenv.cc.gcc}/lib:${libX11}/lib:${mesa}/lib \
29 "$out/res/Tibia"
3031 # We've patchelf'd the files. The main ‘Tibia’ binary is a bit
···15 # The fpc is not properly wrapped to add -rpath. I add this manually.
16 # I even do a trick on lib/lib64 for libgcc, that I expect it will work.
17 preBuild = ''
18- export NIX_LDFLAGS="$NIX_LDFLAGS -rpath ${SDL}/lib -rpath ${SDL_image}/lib -rpath ${libpng}/lib -rpath ${freetype}/lib -rpath ${portaudio}/lib -rpath ${ffmpeg}/lib -rpath ${zlib}/lib -rpath ${sqlite}/lib -rpath ${libX11}/lib -rpath ${pcre}/lib -rpath ${lua}/lib -rpath ${stdenv.gcc.gcc}/lib64 -rpath ${stdenv.gcc.gcc}/lib"
1920 sed -i 414,424d Makefile
21 '';
···15 # The fpc is not properly wrapped to add -rpath. I add this manually.
16 # I even do a trick on lib/lib64 for libgcc, that I expect it will work.
17 preBuild = ''
18+ export NIX_LDFLAGS="$NIX_LDFLAGS -rpath ${SDL}/lib -rpath ${SDL_image}/lib -rpath ${libpng}/lib -rpath ${freetype}/lib -rpath ${portaudio}/lib -rpath ${ffmpeg}/lib -rpath ${zlib}/lib -rpath ${sqlite}/lib -rpath ${libX11}/lib -rpath ${pcre}/lib -rpath ${lua}/lib -rpath ${stdenv.cc.gcc}/lib64 -rpath ${stdenv.cc.gcc}/lib"
1920 sed -i 414,424d Makefile
21 '';
+1-1
pkgs/games/ut2004demo/builder.sh
···2526# Set the ELF interpreter to our own Glibc.
27for i in "$out/System/ucc-bin" "$out/System/ut2004-bin"; do
28- patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" "$i"
29done
···2526# Set the ELF interpreter to our own Glibc.
27for i in "$out/System/ucc-bin" "$out/System/ut2004-bin"; do
28+ patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$i"
29done
+3-3
pkgs/games/vessel/default.nix
···20 phases = "installPhase";
21 ld_preload = ./isatty.c;
2223- libPath = stdenv.lib.makeLibraryPath [ stdenv.gcc.gcc stdenv.gcc.libc ]
24 + ":" + stdenv.lib.makeLibraryPath [ SDL pulseaudio alsaLib ] ;
2526 installPhase = ''
···35 echo @@@
3637 # if we call ld.so $(bin) we don't need to set the ELF interpreter, and save a patchelf step.
38- LD_PRELOAD=./isatty.so $(cat $NIX_GCC/nix-support/dynamic-linker) $src << IM_A_BOT
39 n
40 $out/libexec/strangeloop/vessel/
41 IM_A_BOT
···47 # props to Ethan Lee (the Vessel porter) for understanding
48 # how $ORIGIN works in rpath. There is hope for humanity.
49 patchelf \
50- --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
51 --set-rpath $libPath:$out/libexec/strangeloop/vessel/x86/ \
52 $out/libexec/strangeloop/vessel/x86/vessel.x86
53
···20 phases = "installPhase";
21 ld_preload = ./isatty.c;
2223+ libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.gcc stdenv.cc.libc ]
24 + ":" + stdenv.lib.makeLibraryPath [ SDL pulseaudio alsaLib ] ;
2526 installPhase = ''
···35 echo @@@
3637 # if we call ld.so $(bin) we don't need to set the ELF interpreter, and save a patchelf step.
38+ LD_PRELOAD=./isatty.so $(cat $NIX_CC/nix-support/dynamic-linker) $src << IM_A_BOT
39 n
40 $out/libexec/strangeloop/vessel/
41 IM_A_BOT
···47 # props to Ethan Lee (the Vessel porter) for understanding
48 # how $ORIGIN works in rpath. There is hope for humanity.
49 patchelf \
50+ --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
51 --set-rpath $libPath:$out/libexec/strangeloop/vessel/x86/ \
52 $out/libexec/strangeloop/vessel/x86/vessel.x86
53
···28cd $out/lib/cups/filter
29for i in $(ls); do
30 echo patching $i...
31- patchelf --set-interpreter $(cat $NIX_GCC/nix-support/dynamic-linker) $i || echo "(couldn't set interpreter)"
32 patchelf --set-rpath $cups/lib:$gcc/lib:$glibc/lib $i # This might not be necessary.
33done
34
···28cd $out/lib/cups/filter
29for i in $(ls); do
30 echo patching $i...
31+ patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $i || echo "(couldn't set interpreter)"
32 patchelf --set-rpath $cups/lib:$gcc/lib:$glibc/lib $i # This might not be necessary.
33done
34
···120121 for i in $out/bin/* $out/sbin/*; do
122 patchelf \
123- --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
124 --set-rpath "$out/lib:$libPath" \
125 $i
126 done
···120121 for i in $out/bin/* $out/sbin/*; do
122 patchelf \
123+ --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
124 --set-rpath "$out/lib:$libPath" \
125 $i
126 done
+1-1
pkgs/os-specific/linux/systemd/default.nix
···8687 # This is needed because systemd uses the gold linker, which doesn't
88 # yet have the wrapper script to add rpath flags automatically.
89- NIX_LDFLAGS = "-rpath ${pam}/lib -rpath ${libcap}/lib -rpath ${acl}/lib -rpath ${stdenv.gcc.gcc}/lib";
9091 PYTHON_BINARY = "${coreutils}/bin/env python"; # don't want a build time dependency on Python
92
···8687 # This is needed because systemd uses the gold linker, which doesn't
88 # yet have the wrapper script to add rpath flags automatically.
89+ NIX_LDFLAGS = "-rpath ${pam}/lib -rpath ${libcap}/lib -rpath ${acl}/lib -rpath ${stdenv.cc.gcc}/lib";
9091 PYTHON_BINARY = "${coreutils}/bin/env python"; # don't want a build time dependency on Python
92
···52 "--localstatedir=/var"
53 ]
54 ++ (stdenv.lib.optional winbind "--with-winbind")
55- ++ (stdenv.lib.optional (stdenv.gcc.libc != null) "--with-libiconv=${stdenv.gcc.libc}");
5657 # Need to use a DESTDIR because `make install' tries to write in /var and /etc.
58 installFlags = "DESTDIR=$(TMPDIR)/inst";
···52 "--localstatedir=/var"
53 ]
54 ++ (stdenv.lib.optional winbind "--with-winbind")
55+ ++ (stdenv.lib.optional (stdenv.cc.libc != null) "--with-libiconv=${stdenv.cc.libc}");
5657 # Need to use a DESTDIR because `make install' tries to write in /var and /etc.
58 installFlags = "DESTDIR=$(TMPDIR)/inst";
···8910 # Override the compiler in stdenv for specific packages.
11- overrideGCC = stdenv: gcc: stdenv.override { allowedRequisites = null; inherit gcc; };
121314 # Add some arbitrary packages to buildInputs for specific packages.
···235 });
236 };
237238- dropCxx = drv: drv.override {
239- stdenv = if pkgs.stdenv.isDarwin
240- then pkgs.allStdenvs.stdenvDarwinNaked
241- else pkgs.stdenv;
242- };
243}
···8910 # Override the compiler in stdenv for specific packages.
11+ overrideGCC = stdenv: gcc: stdenv.override { allowedRequisites = null; cc = gcc; };
121314 # Add some arbitrary packages to buildInputs for specific packages.
···235 });
236 };
23700000238}
+3-3
pkgs/stdenv/generic/default.nix
···1let lib = import ../../../lib; in lib.makeOverridable (
23-{ system, name ? "stdenv", preHook ? "", initialPath, gcc, shell
4, allowedRequisites ? null, extraAttrs ? {}, overrides ? (pkgs: {}), config
56, # The `fetchurl' to use for downloading curl and its dependencies
···48 ../../build-support/setup-hooks/patch-shebangs.sh
49 ../../build-support/setup-hooks/move-sbin.sh
50 ../../build-support/setup-hooks/move-lib64.sh
51- gcc
52 ];
5354 # Add a utility function to produce derivations that use this
···198199 inherit overrides;
200201- inherit gcc;
202 }
203204 # Propagate any extra attributes. For instance, we use this to
···1let lib = import ../../../lib; in lib.makeOverridable (
23+{ system, name ? "stdenv", preHook ? "", initialPath, cc, shell
4, allowedRequisites ? null, extraAttrs ? {}, overrides ? (pkgs: {}), config
56, # The `fetchurl' to use for downloading curl and its dependencies
···48 ../../build-support/setup-hooks/patch-shebangs.sh
49 ../../build-support/setup-hooks/move-sbin.sh
50 ../../build-support/setup-hooks/move-lib64.sh
51+ cc
52 ];
5354 # Add a utility function to produce derivations that use this
···198199 inherit overrides;
200201+ inherit cc;
202 }
203204 # Propagate any extra attributes. For instance, we use this to
···12 ''
13 # Fix for building on Glibc 2.16. Won't be needed once the
14 # gnulib in sharutils is updated.
15- sed -i ${stdenv.lib.optionalString (stdenv.isBSD && stdenv.gcc.nativeTools) "''"} '/gets is a security hole/d' lib/stdio.in.h
16 '';
1718 # GNU Gettext is needed on non-GNU platforms.
···12 ''
13 # Fix for building on Glibc 2.16. Won't be needed once the
14 # gnulib in sharutils is updated.
15+ sed -i ${stdenv.lib.optionalString (stdenv.isBSD && stdenv.cc.nativeTools) "''"} '/gets is a security hole/d' lib/stdio.in.h
16 '';
1718 # GNU Gettext is needed on non-GNU platforms.