···184184 if test "$noSysDirs" = "1"; then
185185 # Figure out what extra flags to pass to the gcc compilers
186186 # being generated to make sure that they use our glibc.
187187- if test -e $NIX_GCC/nix-support/orig-glibc; then
188188- glibc=$(cat $NIX_GCC/nix-support/orig-glibc)
187187+ if test -e $NIX_CC/nix-support/orig-glibc; then
188188+ glibc=$(cat $NIX_CC/nix-support/orig-glibc)
189189 # Ugh. Copied from gcc-wrapper/builder.sh. We can't just
190190- # source in $NIX_GCC/nix-support/add-flags, since that
190190+ # source in $NIX_CC/nix-support/add-flags, since that
191191 # would cause *this* GCC to be linked against the
192192 # *previous* GCC. Need some more modularity there.
193193 extraCFlags="-B$glibc/lib -isystem $glibc/include"
+1-1
maintainers/scripts/patchelf-hints.sh
···6262 )
63636464 if test "$names" = "glibc"; then names="stdenv.glibc"; fi
6565- if echo $names | grep -c "gcc" &> /dev/null; then names="stdenv.gcc.gcc"; fi
6565+ if echo $names | grep -c "gcc" &> /dev/null; then names="stdenv.cc.gcc"; fi
66666767 if test $lib != $libPath; then
6868 interpreter="--interpreter \${$names}/lib/$lib"
···5353 sed -i /ENV{PATH}/d ikiwiki.in
5454 # State the gcc dependency, and make the cgi use our wrapper
5555 sed -i -e 's@$0@"'$out/bin/ikiwiki'"@' \
5656- -e "s@'cc'@'${stdenv.gcc}/bin/gcc'@" IkiWiki/Wrapper.pm
5656+ -e "s@'cc'@'${stdenv.cc}/bin/gcc'@" IkiWiki/Wrapper.pm
5757 '';
58585959 configurePhase = "perl Makefile.PL PREFIX=$out";
···7070 ''
7171 else throw ("Architecture: "+stdenv.system+" not supported for VirtualBox guest additions")
7272 }
7373- patchelf --set-rpath ${stdenv.gcc.gcc}/lib:${dbus}/lib:${libX11}/lib:${libXt}/lib:${libXext}/lib:${libXmu}/lib:${libXfixes}/lib:${libXrandr}/lib:${libXcursor}/lib $i
7373+ patchelf --set-rpath ${stdenv.cc.gcc}/lib:${dbus}/lib:${libX11}/lib:${libXt}/lib:${libXext}/lib:${libXmu}/lib:${libXfixes}/lib:${libXrandr}/lib:${libXcursor}/lib $i
7474 done
75757676 for i in lib/VBoxOGL*.so
+3-3
pkgs/build-support/builder-defs/builder-defs.nix
···100100 ${stdenv.preHook}
101101102102 set -e
103103- NIX_GCC=${stdenv.gcc}
103103+ NIX_CC=${stdenv.cc}
104104 export SHELL=${stdenv.shell}
105105 PATH_DELIMITER=':'
106106107107 # Set up the initial path.
108108 PATH=
109109- for i in \$NIX_GCC ${toString stdenv.initialPath}; do
109109+ for i in \$NIX_CC ${toString stdenv.initialPath}; do
110110 PATH=\$PATH\${PATH:+\"\${PATH_DELIMITER}\"}\$i/bin
111111 done
112112···138138 }
139139140140 pkgs=\"\"
141141- for i in \$NIX_GCC ${toString realBuildInputs}; do
141141+ for i in \$NIX_CC ${toString realBuildInputs}; do
142142 findInputs \$i
143143 done
144144
···11#! @shell@ -e
2233-if test -n "$NIX_GCC_WRAPPER_START_HOOK"; then
44- source "$NIX_GCC_WRAPPER_START_HOOK"
33+if test -n "$NIX_CC_WRAPPER_START_HOOK"; then
44+ source "$NIX_CC_WRAPPER_START_HOOK"
55fi
6677if test -z "$NIX_CROSS_GLIBC_FLAGS_SET"; then
···107107 done
108108fi
109109110110-if test -n "$NIX_GCC_WRAPPER_EXEC_HOOK"; then
111111- source "$NIX_GCC_WRAPPER_EXEC_HOOK"
110110+if test -n "$NIX_CC_WRAPPER_EXEC_HOOK"; then
111111+ source "$NIX_CC_WRAPPER_EXEC_HOOK"
112112fi
113113114114# We want gcc to call the wrapper linker, not that of binutils.
···11#! @shell@ -e
2233-if test -n "$NIX_GCC_WRAPPER_START_HOOK"; then
44- source "$NIX_GCC_WRAPPER_START_HOOK"
33+if test -n "$NIX_CC_WRAPPER_START_HOOK"; then
44+ source "$NIX_CC_WRAPPER_START_HOOK"
55fi
6677-if test -z "$NIX_GCC_WRAPPER_FLAGS_SET"; then
77+if test -z "$NIX_CC_WRAPPER_FLAGS_SET"; then
88 source @out@/nix-support/add-flags.sh
99fi
1010···130130 done
131131fi
132132133133-if test -n "$NIX_GCC_WRAPPER_EXEC_HOOK"; then
134134- source "$NIX_GCC_WRAPPER_EXEC_HOOK"
133133+if test -n "$NIX_CC_WRAPPER_EXEC_HOOK"; then
134134+ source "$NIX_CC_WRAPPER_EXEC_HOOK"
135135fi
136136137137138138# Call the real `gcc'. Filter out warnings from stderr about unused
139139# `-B' flags, since they confuse some programs. Deep bash magic to
140140# apply grep to stderr (by swapping stdin/stderr twice).
141141-if test -z "$NIX_GCC_NEEDS_GREP"; then
141141+if test -z "$NIX_CC_NEEDS_GREP"; then
142142 @gccProg@ ${extraBefore[@]} "${params[@]}" ${extraAfter[@]}
143143else
144144 (@gccProg@ ${extraBefore[@]} "${params[@]}" ${extraAfter[@]} 3>&2 2>&1 1>&3- \
+1-1
pkgs/build-support/gcc-wrapper-old/ld-wrapper.sh
···44 source "$NIX_LD_WRAPPER_START_HOOK"
55fi
6677-if test -z "$NIX_GCC_WRAPPER_FLAGS_SET"; then
77+if test -z "$NIX_CC_WRAPPER_FLAGS_SET"; then
88 source @out@/nix-support/add-flags.sh
99fi
1010
···7788if test "$noSysDirs" = "1"; then
991010- if test -e $NIX_GCC/nix-support/orig-libc; then
1010+ if test -e $NIX_CC/nix-support/orig-libc; then
11111212 # Figure out what extra flags to pass to the gcc compilers
1313 # being generated to make sure that they use our glibc.
1414- extraCFlags="$(cat $NIX_GCC/nix-support/libc-cflags)"
1515- extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
1414+ extraCFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
1515+ extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
16161717 # Use *real* header files, otherwise a limits.h is generated
1818 # that does not include Glibc's limits.h (notably missing
1919 # SSIZE_MAX, which breaks the build).
2020- export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include
2020+ export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
21212222 else
2323 # Hack: support impure environments.
···14141515 # Figure out what extra flags to pass to the gcc compilers being
1616 # generated to make sure that they use our glibc.
1717- if test -e $NIX_GCC/nix-support/orig-glibc; then
1818- glibc=$(cat $NIX_GCC/nix-support/orig-glibc)
1717+ if test -e $NIX_CC/nix-support/orig-glibc; then
1818+ glibc=$(cat $NIX_CC/nix-support/orig-glibc)
19192020 # Ugh. Copied from gcc-wrapper/builder.sh. We can't just
2121- # source in $NIX_GCC/nix-support/add-flags, since that would
2121+ # source in $NIX_CC/nix-support/add-flags, since that would
2222 # cause *this* GCC to be linked against the *previous* GCC.
2323 # Need some more modularity there.
2424 extraCFlags="-B$glibc/lib -isystem $glibc/include"
+4-4
pkgs/development/compilers/gcc/4.3/builder.sh
···12121313if test "$noSysDirs" = "1"; then
14141515- if test -e $NIX_GCC/nix-support/orig-libc; then
1515+ if test -e $NIX_CC/nix-support/orig-libc; then
16161717 # Figure out what extra flags to pass to the gcc compilers
1818 # being generated to make sure that they use our glibc.
1919- extraCFlags="$(cat $NIX_GCC/nix-support/libc-cflags)"
2020- extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
1919+ extraCFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
2020+ extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
21212222 # Use *real* header files, otherwise a limits.h is generated
2323 # that does not include Glibc's limits.h (notably missing
2424 # SSIZE_MAX, which breaks the build).
2525- export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include
2525+ export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
26262727 else
2828 # Hack: support impure environments.
+11-11
pkgs/development/compilers/gcc/4.4/builder.sh
···17171818if test "$noSysDirs" = "1"; then
19192020- if test -e $NIX_GCC/nix-support/orig-libc; then
2020+ if test -e $NIX_CC/nix-support/orig-libc; then
21212222 # Figure out what extra flags to pass to the gcc compilers
2323 # being generated to make sure that they use our glibc.
2424- extraFlags="$(cat $NIX_GCC/nix-support/libc-cflags)"
2525- extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
2424+ extraFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
2525+ extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
26262727 # Use *real* header files, otherwise a limits.h is generated
2828 # that does not include Glibc's limits.h (notably missing
2929 # SSIZE_MAX, which breaks the build).
3030- export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include
3030+ export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
31313232 # The path to the Glibc binaries such as `crti.o'.
3333- glibc_libdir="$(cat $NIX_GCC/nix-support/orig-libc)/lib"
3333+ glibc_libdir="$(cat $NIX_CC/nix-support/orig-libc)/lib"
34343535 else
3636 # Hack: support impure environments.
···6161 EXTRA_LDFLAGS_TARGET="-Wl,-L${libcCross}/lib"
6262 fi
6363 else
6464- if test -z "$NIX_GCC_CROSS"; then
6464+ if test -z "$NIX_CC_CROSS"; then
6565 EXTRA_FLAGS_TARGET="$EXTRA_FLAGS"
6666 EXTRA_LDFLAGS_TARGET="$EXTRA_LDFLAGS"
6767 else
6868 # This the case of cross-building the gcc.
6969 # We need special flags for the target, different than those of the build
7070 # Assertion:
7171- test -e $NIX_GCC_CROSS/nix-support/orig-libc
7171+ test -e $NIX_CC_CROSS/nix-support/orig-libc
72727373 # Figure out what extra flags to pass to the gcc compilers
7474 # being generated to make sure that they use our glibc.
7575- extraFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-cflags)"
7676- extraLDFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-ldflags) $(cat $NIX_GCC_CROSS/nix-support/libc-ldflags-before)"
7575+ extraFlags="$(cat $NIX_CC_CROSS/nix-support/libc-cflags)"
7676+ extraLDFlags="$(cat $NIX_CC_CROSS/nix-support/libc-ldflags) $(cat $NIX_CC_CROSS/nix-support/libc-ldflags-before)"
77777878 # Use *real* header files, otherwise a limits.h is generated
7979 # that does not include Glibc's limits.h (notably missing
8080 # SSIZE_MAX, which breaks the build).
8181- NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/include
8181+ NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_CC_CROSS/nix-support/orig-libc)/include
82828383 # The path to the Glibc binaries such as `crti.o'.
8484- glibc_libdir="$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/lib"
8484+ glibc_libdir="$(cat $NIX_CC_CROSS/nix-support/orig-libc)/lib"
85858686 extraFlags="-g0 -O2 -I$NIX_FIXINC_DUMMY_CROSS $extraFlags"
8787 extraLDFlags="--strip-debug -L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
+1-1
pkgs/development/compilers/gcc/4.4/default.nix
···188188 NM_FOR_TARGET = "${stdenv.cross.config}-nm";
189189 CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
190190 # If we are making a cross compiler, cross != null
191191- NIX_GCC_CROSS = if cross == null then "${stdenv.gccCross}" else "";
191191+ NIX_CC_CROSS = if cross == null then "${stdenv.ccCross}" else "";
192192 configureFlags = "
193193 ${if enableMultilib then "" else "--disable-multilib"}
194194 ${if enableShared then "" else "--disable-shared"}
+12-12
pkgs/development/compilers/gcc/4.5/builder.sh
···23232424if test "$noSysDirs" = "1"; then
25252626- if test -e $NIX_GCC/nix-support/orig-libc; then
2626+ if test -e $NIX_CC/nix-support/orig-libc; then
27272828 # Figure out what extra flags to pass to the gcc compilers
2929 # being generated to make sure that they use our glibc.
3030- extraFlags="$(cat $NIX_GCC/nix-support/libc-cflags)"
3131- extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
3030+ extraFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
3131+ extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
32323333 # Use *real* header files, otherwise a limits.h is generated
3434 # that does not include Glibc's limits.h (notably missing
3535 # SSIZE_MAX, which breaks the build).
3636- export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include
3636+ export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
37373838 # The path to the Glibc binaries such as `crti.o'.
3939- glibc_libdir="$(cat $NIX_GCC/nix-support/orig-libc)/lib"
3939+ glibc_libdir="$(cat $NIX_CC/nix-support/orig-libc)/lib"
40404141 else
4242 # Hack: support impure environments.
···6767 EXTRA_TARGET_LDFLAGS="-Wl,-L${libcCross}/lib"
6868 fi
6969 else
7070- if test -z "$NIX_GCC_CROSS"; then
7070+ if test -z "$NIX_CC_CROSS"; then
7171 EXTRA_TARGET_CFLAGS="$EXTRA_FLAGS"
7272 EXTRA_TARGET_LDFLAGS="$EXTRA_LDFLAGS"
7373 else
7474 # This the case of cross-building the gcc.
7575 # We need special flags for the target, different than those of the build
7676 # Assertion:
7777- test -e $NIX_GCC_CROSS/nix-support/orig-libc
7777+ test -e $NIX_CC_CROSS/nix-support/orig-libc
78787979 # Figure out what extra flags to pass to the gcc compilers
8080 # being generated to make sure that they use our glibc.
8181- extraFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-cflags)"
8282- extraLDFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-ldflags) $(cat $NIX_GCC_CROSS/nix-support/libc-ldflags-before)"
8181+ extraFlags="$(cat $NIX_CC_CROSS/nix-support/libc-cflags)"
8282+ extraLDFlags="$(cat $NIX_CC_CROSS/nix-support/libc-ldflags) $(cat $NIX_CC_CROSS/nix-support/libc-ldflags-before)"
83838484 # Use *real* header files, otherwise a limits.h is generated
8585 # that does not include Glibc's limits.h (notably missing
8686 # SSIZE_MAX, which breaks the build).
8787- NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/include
8787+ NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_CC_CROSS/nix-support/orig-libc)/include
88888989 # The path to the Glibc binaries such as `crti.o'.
9090- glibc_libdir="$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/lib"
9090+ glibc_libdir="$(cat $NIX_CC_CROSS/nix-support/orig-libc)/lib"
91919292 extraFlags="-I$NIX_FIXINC_DUMMY_CROSS $extraFlags"
9393 extraLDFlags="-L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
···162162 # Patch the configure script so it finds glibc headers
163163 # It's important for example in order not to get libssp built, because it's
164164 # functionality is in glibc already.
165165- glibc_headers="$(cat $NIX_GCC/nix-support/orig-libc)/include"
165165+ glibc_headers="$(cat $NIX_CC/nix-support/orig-libc)/include"
166166 sed -i \
167167 -e s,glibc_header_dir=/usr/include,glibc_header_dir=$glibc_headers, \
168168 gcc/configure
+3-3
pkgs/development/compilers/gcc/4.5/default.nix
···185185 sed -i gcc/config/t-gnu \
186186 -es'|NATIVE_SYSTEM_HEADER_DIR.*$|NATIVE_SYSTEM_HEADER_DIR = ${libc}/include|g'
187187 ''
188188- else if cross != null || stdenv.gcc.libc != null then
188188+ else if cross != null || stdenv.cc.libc != null then
189189 # On NixOS, use the right path to the dynamic linker instead of
190190 # `/lib/ld*.so'.
191191 let
192192- libc = if libcCross != null then libcCross else stdenv.gcc.libc;
192192+ libc = if libcCross != null then libcCross else stdenv.cc.libc;
193193 in
194194 '' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..."
195195 for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
···272272 NM_FOR_TARGET = "${stdenv.cross.config}-nm";
273273 CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
274274 # If we are making a cross compiler, cross != null
275275- NIX_GCC_CROSS = if cross == null then "${stdenv.gccCross}" else "";
275275+ NIX_CC_CROSS = if cross == null then "${stdenv.ccCross}" else "";
276276 dontStrip = true;
277277 configureFlags = ''
278278 ${if enableMultilib then "" else "--disable-multilib"}
+13-13
pkgs/development/compilers/gcc/4.6/builder.sh
···19192020if test "$noSysDirs" = "1"; then
21212222- if test -e $NIX_GCC/nix-support/orig-libc; then
2222+ if test -e $NIX_CC/nix-support/orig-libc; then
23232424 # Figure out what extra flags to pass to the gcc compilers
2525 # being generated to make sure that they use our glibc.
2626- extraFlags="$(cat $NIX_GCC/nix-support/libc-cflags)"
2727- extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
2626+ extraFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
2727+ extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
28282929 # Use *real* header files, otherwise a limits.h is generated
3030 # that does not include Glibc's limits.h (notably missing
3131 # SSIZE_MAX, which breaks the build).
3232- export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include
3232+ export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
33333434 # The path to the Glibc binaries such as `crti.o'.
3535- glibc_libdir="$(cat $NIX_GCC/nix-support/orig-libc)/lib"
3535+ glibc_libdir="$(cat $NIX_CC/nix-support/orig-libc)/lib"
36363737 else
3838 # Hack: support impure environments.
···7474 EXTRA_TARGET_LDFLAGS="-Wl,-L${libcCross}/lib"
7575 fi
7676 else
7777- if test -z "$NIX_GCC_CROSS"; then
7777+ if test -z "$NIX_CC_CROSS"; then
7878 EXTRA_TARGET_CFLAGS="$EXTRA_FLAGS"
7979 EXTRA_TARGET_LDFLAGS="$EXTRA_LDFLAGS"
8080 else
8181 # This the case of cross-building the gcc.
8282 # We need special flags for the target, different than those of the build
8383 # Assertion:
8484- test -e $NIX_GCC_CROSS/nix-support/orig-libc
8484+ test -e $NIX_CC_CROSS/nix-support/orig-libc
85858686 # Figure out what extra flags to pass to the gcc compilers
8787 # being generated to make sure that they use our glibc.
8888- extraFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-cflags)"
8989- extraLDFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-ldflags) $(cat $NIX_GCC_CROSS/nix-support/libc-ldflags-before)"
8888+ extraFlags="$(cat $NIX_CC_CROSS/nix-support/libc-cflags)"
8989+ extraLDFlags="$(cat $NIX_CC_CROSS/nix-support/libc-ldflags) $(cat $NIX_CC_CROSS/nix-support/libc-ldflags-before)"
90909191 # Use *real* header files, otherwise a limits.h is generated
9292 # that does not include Glibc's limits.h (notably missing
9393 # SSIZE_MAX, which breaks the build).
9494- NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/include
9494+ NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_CC_CROSS/nix-support/orig-libc)/include
95959696 # The path to the Glibc binaries such as `crti.o'.
9797- glibc_libdir="$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/lib"
9797+ glibc_libdir="$(cat $NIX_CC_CROSS/nix-support/orig-libc)/lib"
98989999 extraFlags="-I$NIX_FIXINC_DUMMY_CROSS $extraFlags"
100100 extraLDFlags="-L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
···166166 rm -Rf zlib
167167 fi
168168169169- if test -f "$NIX_GCC/nix-support/orig-libc"; then
169169+ if test -f "$NIX_CC/nix-support/orig-libc"; then
170170 # Patch the configure script so it finds glibc headers. It's
171171 # important for example in order not to get libssp built,
172172 # because its functionality is in glibc already.
173173- glibc_headers="$(cat $NIX_GCC/nix-support/orig-libc)/include"
173173+ glibc_headers="$(cat $NIX_CC/nix-support/orig-libc)/include"
174174 sed -i \
175175 -e "s,glibc_header_dir=/usr/include,glibc_header_dir=$glibc_headers", \
176176 gcc/configure
+3-3
pkgs/development/compilers/gcc/4.6/default.nix
···229229 sed -i gcc/config/t-gnu \
230230 -es'|NATIVE_SYSTEM_HEADER_DIR.*$|NATIVE_SYSTEM_HEADER_DIR = ${libc}/include|g'
231231 ''
232232- else if cross != null || stdenv.gcc.libc != null then
232232+ else if cross != null || stdenv.cc.libc != null then
233233 # On NixOS, use the right path to the dynamic linker instead of
234234 # `/lib/ld*.so'.
235235 let
236236- libc = if libcCross != null then libcCross else stdenv.gcc.libc;
236236+ libc = if libcCross != null then libcCross else stdenv.cc.libc;
237237 in
238238 '' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..."
239239 for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
···339339 NM_FOR_TARGET = "${stdenv.cross.config}-nm";
340340 CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
341341 # If we are making a cross compiler, cross != null
342342- NIX_GCC_CROSS = if cross == null then "${stdenv.gccCross}" else "";
342342+ NIX_CC_CROSS = if cross == null then "${stdenv.ccCross}" else "";
343343 dontStrip = true;
344344 configureFlags = ''
345345 ${if enableMultilib then "" else "--disable-multilib"}
+13-13
pkgs/development/compilers/gcc/4.8/builder.sh
···19192020if test "$noSysDirs" = "1"; then
21212222- if test -e $NIX_GCC/nix-support/orig-libc; then
2222+ if test -e $NIX_CC/nix-support/orig-libc; then
23232424 # Figure out what extra flags to pass to the gcc compilers
2525 # being generated to make sure that they use our glibc.
2626- extraFlags="$(cat $NIX_GCC/nix-support/libc-cflags)"
2727- extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
2626+ extraFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
2727+ extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
28282929 # Use *real* header files, otherwise a limits.h is generated
3030 # that does not include Glibc's limits.h (notably missing
3131 # SSIZE_MAX, which breaks the build).
3232- export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include
3232+ export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
33333434 # The path to the Glibc binaries such as `crti.o'.
3535- glibc_libdir="$(cat $NIX_GCC/nix-support/orig-libc)/lib"
3535+ glibc_libdir="$(cat $NIX_CC/nix-support/orig-libc)/lib"
36363737 else
3838 # Hack: support impure environments.
···7474 EXTRA_TARGET_LDFLAGS="-Wl,-L${libcCross}/lib -Wl,-rpath,${libcCross}/lib -Wl,-rpath-link,${libcCross}/lib"
7575 fi
7676 else
7777- if test -z "$NIX_GCC_CROSS"; then
7777+ if test -z "$NIX_CC_CROSS"; then
7878 EXTRA_TARGET_CFLAGS="$EXTRA_FLAGS"
7979 EXTRA_TARGET_CXXFLAGS="$EXTRA_FLAGS"
8080 EXTRA_TARGET_LDFLAGS="$EXTRA_LDFLAGS"
···8282 # This the case of cross-building the gcc.
8383 # We need special flags for the target, different than those of the build
8484 # Assertion:
8585- test -e $NIX_GCC_CROSS/nix-support/orig-libc
8585+ test -e $NIX_CC_CROSS/nix-support/orig-libc
86868787 # Figure out what extra flags to pass to the gcc compilers
8888 # being generated to make sure that they use our glibc.
8989- extraFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-cflags)"
9090- extraLDFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-ldflags) $(cat $NIX_GCC_CROSS/nix-support/libc-ldflags-before)"
8989+ extraFlags="$(cat $NIX_CC_CROSS/nix-support/libc-cflags)"
9090+ extraLDFlags="$(cat $NIX_CC_CROSS/nix-support/libc-ldflags) $(cat $NIX_CC_CROSS/nix-support/libc-ldflags-before)"
91919292 # Use *real* header files, otherwise a limits.h is generated
9393 # that does not include Glibc's limits.h (notably missing
9494 # SSIZE_MAX, which breaks the build).
9595- NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/include
9595+ NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_CC_CROSS/nix-support/orig-libc)/include
96969797 # The path to the Glibc binaries such as `crti.o'.
9898- glibc_dir="$(cat $NIX_GCC_CROSS/nix-support/orig-libc)"
9898+ glibc_dir="$(cat $NIX_CC_CROSS/nix-support/orig-libc)"
9999 glibc_libdir="$glibc_dir/lib"
100100 configureFlags="$configureFlags --with-native-system-header-dir=$glibc_dir/include"
101101···167167 rm -Rf zlib
168168 fi
169169170170- if test -f "$NIX_GCC/nix-support/orig-libc"; then
170170+ if test -f "$NIX_CC/nix-support/orig-libc"; then
171171 # Patch the configure script so it finds glibc headers. It's
172172 # important for example in order not to get libssp built,
173173 # because its functionality is in glibc already.
174174- glibc_headers="$(cat $NIX_GCC/nix-support/orig-libc)/include"
174174+ glibc_headers="$(cat $NIX_CC/nix-support/orig-libc)/include"
175175 sed -i \
176176 -e "s,glibc_header_dir=/usr/include,glibc_header_dir=$glibc_headers", \
177177 gcc/configure
+3-3
pkgs/development/compilers/gcc/4.8/default.nix
···251251 sed -i "${gnu_h}" \
252252 -es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc}/include"|g'
253253 ''
254254- else if cross != null || stdenv.gcc.libc != null then
254254+ else if cross != null || stdenv.cc.libc != null then
255255 # On NixOS, use the right path to the dynamic linker instead of
256256 # `/lib/ld*.so'.
257257 let
258258- libc = if libcCross != null then libcCross else stdenv.gcc.libc;
258258+ libc = if libcCross != null then libcCross else stdenv.cc.libc;
259259 in
260260 '' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..."
261261 for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
···397397 NM_FOR_TARGET = "${stdenv.cross.config}-nm";
398398 CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
399399 # If we are making a cross compiler, cross != null
400400- NIX_GCC_CROSS = if cross == null then "${stdenv.gccCross}" else "";
400400+ NIX_CC_CROSS = if cross == null then "${stdenv.ccCross}" else "";
401401 dontStrip = true;
402402 configureFlags = ''
403403 ${if enableMultilib then "" else "--disable-multilib"}
+13-13
pkgs/development/compilers/gcc/4.9/builder.sh
···19192020if test "$noSysDirs" = "1"; then
21212222- if test -e $NIX_GCC/nix-support/orig-libc; then
2222+ if test -e $NIX_CC/nix-support/orig-libc; then
23232424 # Figure out what extra flags to pass to the gcc compilers
2525 # being generated to make sure that they use our glibc.
2626- extraFlags="$(cat $NIX_GCC/nix-support/libc-cflags)"
2727- extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
2626+ extraFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
2727+ extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
28282929 # Use *real* header files, otherwise a limits.h is generated
3030 # that does not include Glibc's limits.h (notably missing
3131 # SSIZE_MAX, which breaks the build).
3232- export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include
3232+ export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
33333434 # The path to the Glibc binaries such as `crti.o'.
3535- glibc_libdir="$(cat $NIX_GCC/nix-support/orig-libc)/lib"
3535+ glibc_libdir="$(cat $NIX_CC/nix-support/orig-libc)/lib"
36363737 else
3838 # Hack: support impure environments.
···7474 EXTRA_TARGET_LDFLAGS="-Wl,-L${libcCross}/lib -Wl,-rpath,${libcCross}/lib -Wl,-rpath-link,${libcCross}/lib"
7575 fi
7676 else
7777- if test -z "$NIX_GCC_CROSS"; then
7777+ if test -z "$NIX_CC_CROSS"; then
7878 EXTRA_TARGET_CFLAGS="$EXTRA_FLAGS"
7979 EXTRA_TARGET_CXXFLAGS="$EXTRA_FLAGS"
8080 EXTRA_TARGET_LDFLAGS="$EXTRA_LDFLAGS"
···8282 # This the case of cross-building the gcc.
8383 # We need special flags for the target, different than those of the build
8484 # Assertion:
8585- test -e $NIX_GCC_CROSS/nix-support/orig-libc
8585+ test -e $NIX_CC_CROSS/nix-support/orig-libc
86868787 # Figure out what extra flags to pass to the gcc compilers
8888 # being generated to make sure that they use our glibc.
8989- extraFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-cflags)"
9090- extraLDFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-ldflags) $(cat $NIX_GCC_CROSS/nix-support/libc-ldflags-before)"
8989+ extraFlags="$(cat $NIX_CC_CROSS/nix-support/libc-cflags)"
9090+ extraLDFlags="$(cat $NIX_CC_CROSS/nix-support/libc-ldflags) $(cat $NIX_CC_CROSS/nix-support/libc-ldflags-before)"
91919292 # Use *real* header files, otherwise a limits.h is generated
9393 # that does not include Glibc's limits.h (notably missing
9494 # SSIZE_MAX, which breaks the build).
9595- NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/include
9595+ NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_CC_CROSS/nix-support/orig-libc)/include
96969797 # The path to the Glibc binaries such as `crti.o'.
9898- glibc_dir="$(cat $NIX_GCC_CROSS/nix-support/orig-libc)"
9898+ glibc_dir="$(cat $NIX_CC_CROSS/nix-support/orig-libc)"
9999 glibc_libdir="$glibc_dir/lib"
100100 configureFlags="$configureFlags --with-native-system-header-dir=$glibc_dir/include"
101101···171171 rm -Rf zlib
172172 fi
173173174174- if test -f "$NIX_GCC/nix-support/orig-libc"; then
174174+ if test -f "$NIX_CC/nix-support/orig-libc"; then
175175 # Patch the configure script so it finds glibc headers. It's
176176 # important for example in order not to get libssp built,
177177 # because its functionality is in glibc already.
178178- glibc_headers="$(cat $NIX_GCC/nix-support/orig-libc)/include"
178178+ glibc_headers="$(cat $NIX_CC/nix-support/orig-libc)/include"
179179 sed -i \
180180 -e "s,glibc_header_dir=/usr/include,glibc_header_dir=$glibc_headers", \
181181 gcc/configure
+3-3
pkgs/development/compilers/gcc/4.9/default.nix
···247247 sed -i "${gnu_h}" \
248248 -es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc}/include"|g'
249249 ''
250250- else if cross != null || stdenv.gcc.libc != null then
250250+ else if cross != null || stdenv.cc.libc != null then
251251 # On NixOS, use the right path to the dynamic linker instead of
252252 # `/lib/ld*.so'.
253253 let
254254- libc = if libcCross != null then libcCross else stdenv.gcc.libc;
254254+ libc = if libcCross != null then libcCross else stdenv.cc.libc;
255255 in
256256 '' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..."
257257 for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
···385385 NM_FOR_TARGET = "${stdenv.cross.config}-nm";
386386 CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
387387 # If we are making a cross compiler, cross != null
388388- NIX_GCC_CROSS = if cross == null then "${stdenv.gccCross}" else "";
388388+ NIX_CC_CROSS = if cross == null then "${stdenv.ccCross}" else "";
389389 dontStrip = true;
390390 configureFlags = ''
391391 ${if enableMultilib then "" else "--disable-multilib"}
···2222 '';
23232424 configureFlags=[
2525- "--with-gcc=${stdenv.gcc}/bin/gcc"
2525+ "--with-gcc=${stdenv.cc}/bin/gcc"
2626 ];
27272828 # required, because otherwise all symbols from HSffi.o are stripped, and
+1-1
pkgs/development/compilers/ghc/6.12.2.nix
···2222 '';
23232424 configureFlags=[
2525- "--with-gcc=${stdenv.gcc}/bin/gcc"
2525+ "--with-gcc=${stdenv.cc}/bin/gcc"
2626 ];
27272828 # required, because otherwise all symbols from HSffi.o are stripped, and
···2222 '';
23232424 configureFlags=[
2525- "--with-gcc=${stdenv.gcc}/bin/gcc"
2525+ "--with-gcc=${stdenv.cc}/bin/gcc"
2626 ];
27272828 # required, because otherwise all symbols from HSffi.o are stripped, and
+1-1
pkgs/development/compilers/ghc/7.0.2.nix
···2222 '';
23232424 configureFlags=[
2525- "--with-gcc=${stdenv.gcc}/bin/gcc"
2525+ "--with-gcc=${stdenv.cc}/bin/gcc"
2626 ];
27272828 # required, because otherwise all symbols from HSffi.o are stripped, and
+1-1
pkgs/development/compilers/ghc/7.0.3.nix
···2222 '';
23232424 configureFlags=[
2525- "--with-gcc=${stdenv.gcc}/bin/gcc"
2525+ "--with-gcc=${stdenv.cc}/bin/gcc"
2626 ];
27272828 # required, because otherwise all symbols from HSffi.o are stripped, and
···2222 '';
23232424 configureFlags=[
2525- "--with-gcc=${stdenv.gcc}/bin/gcc"
2525+ "--with-gcc=${stdenv.cc}/bin/gcc"
2626 ];
27272828 # required, because otherwise all symbols from HSffi.o are stripped, and
···2222 '';
23232424 configureFlags=[
2525- "--with-gcc=${stdenv.gcc}/bin/gcc"
2525+ "--with-gcc=${stdenv.cc}/bin/gcc"
2626 ];
27272828 # required, because otherwise all symbols from HSffi.o are stripped, and
···2626 '';
27272828 configureFlags=[
2929- "--with-gcc=${stdenv.gcc}/bin/gcc"
2929+ "--with-gcc=${stdenv.cc}/bin/gcc"
3030 ];
31313232 # required, because otherwise all symbols from HSffi.o are stripped, and
+1-1
pkgs/development/compilers/ghc/7.6.1.nix
···2323 '';
24242525 configureFlags=[
2626- "--with-gcc=${stdenv.gcc}/bin/gcc"
2626+ "--with-gcc=${stdenv.cc}/bin/gcc"
2727 ];
28282929 # required, because otherwise all symbols from HSffi.o are stripped, and
+1-1
pkgs/development/compilers/ghc/7.6.2.nix
···2424 '';
25252626 configureFlags = [
2727- "--with-gcc=${stdenv.gcc}/bin/gcc"
2727+ "--with-gcc=${stdenv.cc}/bin/gcc"
2828 ];
29293030 # required, because otherwise all symbols from HSffi.o are stripped, and
···88, withGd ? false, gd ? null, libpng ? null
99}:
10101111-assert stdenv.gcc.gcc != null;
1111+assert stdenv.cc ? gcc;
12121313let
1414 build = import ./common.nix;
···3333 # libgcc_s will not be at {gcc}/lib, and gcc's libgcc will be found without
3434 # any special hack.
3535 preInstall = ''
3636- if [ -f ${stdenv.gcc.gcc}/lib/libgcc_s.so.1 ]; then
3636+ if [ -f ${stdenv.cc.gcc}/lib/libgcc_s.so.1 ]; then
3737 mkdir -p $out/lib
3838- cp ${stdenv.gcc.gcc}/lib/libgcc_s.so.1 $out/lib/libgcc_s.so.1
3838+ cp ${stdenv.cc.gcc}/lib/libgcc_s.so.1 $out/lib/libgcc_s.so.1
3939 fi
4040 '';
4141
···2222 ar x opensc-dnie*
2323 tar xf data.tar.gz
24242525- RPATH=${glib}/lib:${opensc}/lib:${openssl}/lib:${openct}/lib:${libtool}/lib:${pcsclite}/lib:${stdenv.gcc.libc}/lib:${zlib}/lib
2525+ RPATH=${glib}/lib:${opensc}/lib:${openssl}/lib:${openct}/lib:${libtool}/lib:${pcsclite}/lib:${stdenv.cc.libc}/lib:${zlib}/lib
26262727 for a in "usr/lib/"*.so*; do
2828 if ! test -L $a; then
···1515 # The fpc is not properly wrapped to add -rpath. I add this manually.
1616 # I even do a trick on lib/lib64 for libgcc, that I expect it will work.
1717 preBuild = ''
1818- 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"
1818+ 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"
19192020 sed -i 414,424d Makefile
2121 '';
+1-1
pkgs/games/ut2004demo/builder.sh
···25252626# Set the ELF interpreter to our own Glibc.
2727for i in "$out/System/ucc-bin" "$out/System/ut2004-bin"; do
2828- patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" "$i"
2828+ patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$i"
2929done
+3-3
pkgs/games/vessel/default.nix
···2020 phases = "installPhase";
2121 ld_preload = ./isatty.c;
22222323- libPath = stdenv.lib.makeLibraryPath [ stdenv.gcc.gcc stdenv.gcc.libc ]
2323+ libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.gcc stdenv.cc.libc ]
2424 + ":" + stdenv.lib.makeLibraryPath [ SDL pulseaudio alsaLib ] ;
25252626 installPhase = ''
···3535 echo @@@
36363737 # if we call ld.so $(bin) we don't need to set the ELF interpreter, and save a patchelf step.
3838- LD_PRELOAD=./isatty.so $(cat $NIX_GCC/nix-support/dynamic-linker) $src << IM_A_BOT
3838+ LD_PRELOAD=./isatty.so $(cat $NIX_CC/nix-support/dynamic-linker) $src << IM_A_BOT
3939 n
4040 $out/libexec/strangeloop/vessel/
4141 IM_A_BOT
···4747 # props to Ethan Lee (the Vessel porter) for understanding
4848 # how $ORIGIN works in rpath. There is hope for humanity.
4949 patchelf \
5050- --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
5050+ --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
5151 --set-rpath $libPath:$out/libexec/strangeloop/vessel/x86/ \
5252 $out/libexec/strangeloop/vessel/x86/vessel.x86
5353
···88991010 # Override the compiler in stdenv for specific packages.
1111- overrideGCC = stdenv: gcc: stdenv.override { allowedRequisites = null; inherit gcc; };
1111+ overrideGCC = stdenv: gcc: stdenv.override { allowedRequisites = null; cc = gcc; };
121213131414 # Add some arbitrary packages to buildInputs for specific packages.
···235235 });
236236 };
237237238238- dropCxx = drv: drv.override {
239239- stdenv = if pkgs.stdenv.isDarwin
240240- then pkgs.allStdenvs.stdenvDarwinNaked
241241- else pkgs.stdenv;
242242- };
243238}
+3-3
pkgs/stdenv/generic/default.nix
···11let lib = import ../../../lib; in lib.makeOverridable (
2233-{ system, name ? "stdenv", preHook ? "", initialPath, gcc, shell
33+{ system, name ? "stdenv", preHook ? "", initialPath, cc, shell
44, allowedRequisites ? null, extraAttrs ? {}, overrides ? (pkgs: {}), config
5566, # The `fetchurl' to use for downloading curl and its dependencies
···4848 ../../build-support/setup-hooks/patch-shebangs.sh
4949 ../../build-support/setup-hooks/move-sbin.sh
5050 ../../build-support/setup-hooks/move-lib64.sh
5151- gcc
5151+ cc
5252 ];
53535454 # Add a utility function to produce derivations that use this
···198198199199 inherit overrides;
200200201201- inherit gcc;
201201+ inherit cc;
202202 }
203203204204 # Propagate any extra attributes. For instance, we use this to
···1212 ''
1313 # Fix for building on Glibc 2.16. Won't be needed once the
1414 # gnulib in sharutils is updated.
1515- sed -i ${stdenv.lib.optionalString (stdenv.isBSD && stdenv.gcc.nativeTools) "''"} '/gets is a security hole/d' lib/stdio.in.h
1515+ sed -i ${stdenv.lib.optionalString (stdenv.isBSD && stdenv.cc.nativeTools) "''"} '/gets is a security hole/d' lib/stdio.in.h
1616 '';
17171818 # GNU Gettext is needed on non-GNU platforms.