Change occurrences of gcc to the more general cc

This is done for the sake of Yosemite, which does not have gcc, and yet
this change is also compatible with Linux.
This commit is contained in:
John Wiegley 2014-12-17 12:11:30 -06:00
parent ce100a5d58
commit 28b6fb61e6
252 changed files with 553 additions and 540 deletions

View file

@ -184,10 +184,10 @@ if test "$noSysDirs" = "1"; then
if test "$noSysDirs" = "1"; then
# Figure out what extra flags to pass to the gcc compilers
# being generated to make sure that they use our glibc.
if test -e $NIX_GCC/nix-support/orig-glibc; then
glibc=$(cat $NIX_GCC/nix-support/orig-glibc)
if test -e $NIX_CC/nix-support/orig-glibc; then
glibc=$(cat $NIX_CC/nix-support/orig-glibc)
# Ugh. Copied from gcc-wrapper/builder.sh. We can't just
# source in $NIX_GCC/nix-support/add-flags, since that
# source in $NIX_CC/nix-support/add-flags, since that
# would cause *this* GCC to be linked against the
# *previous* GCC. Need some more modularity there.
extraCFlags="-B$glibc/lib -isystem $glibc/include"

View file

@ -62,7 +62,7 @@ for bin in $(find $binaryDist -executable -type f) :; do
)
if test "$names" = "glibc"; then names="stdenv.glibc"; fi
if echo $names | grep -c "gcc" &> /dev/null; then names="stdenv.gcc.gcc"; fi
if echo $names | grep -c "gcc" &> /dev/null; then names="stdenv.cc.gcc"; fi
if test $lib != $libPath; then
interpreter="--interpreter \${$names}/lib/$lib"

View file

@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
QT_PLUGIN_PATH="${qtscriptgenerator}/lib/qt4/plugins";
buildInputs = [ qtscriptgenerator stdenv.gcc.libc gettext curl
buildInputs = [ qtscriptgenerator stdenv.cc.libc gettext curl
libxml2 mysql taglib taglib_extras loudmouth kdelibs automoc4 phonon strigi
soprano qca2 libmtp liblastfm libgpod pkgconfig qjson ffmpeg libofa nepomuk_core ];

View file

@ -7,6 +7,8 @@ stdenv.mkDerivation rec {
url = "http://downloads.xiph.org/releases/cdparanoia/${name}.src.tgz";
sha256 = "1pv4zrajm46za0f6lv162iqffih57a8ly4pc69f7y0gfyigb8p80";
};
preConfigure = "unset CC";
meta = {
homepage = http://xiph.org/paranoia;

View file

@ -33,8 +33,8 @@ stdenv.mkDerivation rec {
buildPhase = ''
patchelf \
--set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-rpath "$out/opt/google/musicmanager:${readline}/lib:${ncurses}/lib:${stdenv.gcc.libc}/lib:${qt48}/lib:${stdenv.gcc.gcc}/lib:${libidn}/lib:${expat}/lib:${flac}/lib:${libvorbis}/lib" opt/google/musicmanager/MusicManager
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "$out/opt/google/musicmanager:${readline}/lib:${ncurses}/lib:${stdenv.cc.libc}/lib:${qt48}/lib:${stdenv.cc.gcc}/lib:${libidn}/lib:${expat}/lib:${flac}/lib:${libvorbis}/lib" opt/google/musicmanager/MusicManager
'';
dontPatchELF = true;

View file

@ -45,7 +45,7 @@ let
pango
qt4
sqlite
stdenv.gcc.gcc
stdenv.cc.gcc
xlibs.libX11
xlibs.libXcomposite
xlibs.libXdamage
@ -113,16 +113,16 @@ stdenv.mkDerivation {
mkdir -p $out/bin
rpath="$out/spotify-client/Data:$out/lib:$out/spotify-client:${stdenv.gcc.gcc}/lib64"
rpath="$out/spotify-client/Data:$out/lib:$out/spotify-client:${stdenv.cc.gcc}/lib64"
ln -s $out/spotify-client/spotify $out/bin/spotify
patchelf \
--interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath $rpath $out/spotify-client/spotify
patchelf \
--interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath $rpath $out/spotify-client/Data/SpotifyHelper
dpkg-deb -x ${qt4webkit} ./

View file

@ -7,7 +7,7 @@ let
atomEnv = buildEnv {
name = "env-atom";
paths = [
stdenv.gcc.gcc zlib glib dbus gtk atk pango freetype libgnome_keyring3
stdenv.cc.gcc zlib glib dbus gtk atk pango freetype libgnome_keyring3
fontconfig gdk_pixbuf cairo cups expat libgpgerror alsaLib nspr gconf nss
xlibs.libXrender xlibs.libX11 xlibs.libXext xlibs.libXdamage xlibs.libXtst
xlibs.libXcomposite xlibs.libXi xlibs.libXfixes xlibs.libXrandr
@ -33,9 +33,9 @@ in stdenv.mkDerivation rec {
ar p $src data.tar.gz | tar -C $out -xz ./usr
mv $out/usr/* $out/
rm -r $out/usr/
patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
$out/share/atom/atom
patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
$out/share/atom/resources/app/apm/node_modules/atom-package-manager/bin/node
wrapProgram $out/bin/atom \
--prefix "LD_LIBRARY_PATH" : "${atomEnv}/lib:${atomEnv}/lib64"

View file

@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
patches = [ ./writable-projects.patch ];
preConfigure = "substituteInPlace ./configure --replace /usr/bin/file ${file}/bin/file";
postConfigure = optionalString stdenv.isLinux "substituteInPlace libtool --replace ldconfig ${stdenv.gcc.libc}/sbin/ldconfig";
postConfigure = optionalString stdenv.isLinux "substituteInPlace libtool --replace ldconfig ${stdenv.cc.libc}/sbin/ldconfig";
configureFlags = [ "--enable-pch=no" ]
++ optional contribPlugins "--with-contrib-plugins";

View file

@ -11,7 +11,7 @@ preConfigure() {
*) return;
esac
libc=$(cat ${NIX_GCC}/nix-support/orig-libc)
libc=$(cat ${NIX_CC}/nix-support/orig-libc)
echo "libc: $libc"
for i in src/s/*.h src/m/*.h; do

View file

@ -56,9 +56,9 @@ let
snappyPath="lib/snappy-java-1.0.5"
7z x -o"$snappyPath" "$snappyPath.jar"
if [ "${stdenv.system}" == "x86_64-linux" ]; then
patchelf --set-rpath ${stdenv.gcc.gcc}/lib64 "$snappyPath/org/xerial/snappy/native/Linux/amd64/libsnappyjava.so"
patchelf --set-rpath ${stdenv.cc.gcc}/lib64 "$snappyPath/org/xerial/snappy/native/Linux/amd64/libsnappyjava.so"
else
patchelf --set-rpath ${stdenv.gcc.gcc}/lib "$snappyPath/org/xerial/snappy/native/Linux/i386/libsnappyjava.so"
patchelf --set-rpath ${stdenv.cc.gcc}/lib "$snappyPath/org/xerial/snappy/native/Linux/i386/libsnappyjava.so"
fi
7z a -tzip "$snappyPath.jar" ./"$snappyPath"/*
rm -vr "$snappyPath"
@ -76,7 +76,7 @@ let
makeWrapper "$out/$name/bin/${loName}.sh" "$out/bin/${loName}" \
--prefix PATH : "${jdk}/bin:${coreutils}/bin:${gnugrep}/bin:${which}/bin:${git}/bin" \
--prefix LD_RUN_PATH : "${stdenv.gcc.gcc}/lib/" \
--prefix LD_RUN_PATH : "${stdenv.cc.gcc}/lib/" \
--prefix JDK_HOME : "$jdk" \
--prefix ${hiName}_JDK : "$jdk"

View file

@ -5,7 +5,7 @@
let
libPath = stdenv.lib.makeLibraryPath [
stdenv.gcc.gcc zlib glib dbus gtk atk pango freetype libgnome_keyring3 nss
stdenv.cc.gcc zlib glib dbus gtk atk pango freetype libgnome_keyring3 nss
fontconfig gdk_pixbuf cairo cups expat libgpgerror alsaLib nspr gnome3.gconf
xlibs.libXrender xlibs.libX11 xlibs.libXext xlibs.libXdamage xlibs.libXtst
xlibs.libXcomposite xlibs.libXi xlibs.libXfixes
@ -40,8 +40,8 @@ stdenv.mkDerivation rec {
mv LightTable $out/
patchelf \
--interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-rpath ${libPath}:${stdenv.gcc.gcc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"} \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath ${libPath}:${stdenv.cc.gcc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"} \
$out/LightTable/ltbin
ln -s ${udev}/lib/libudev.so.1 $out/LightTable/libudev.so.0

View file

@ -28,8 +28,8 @@ stdenv.mkDerivation rec {
echo ${libPath}
patchelf \
--interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-rpath ${libPath}:${stdenv.gcc.gcc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"} \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath ${libPath}:${stdenv.cc.gcc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"} \
$out/sublime/sublime_text
'';

View file

@ -31,8 +31,8 @@ in let
buildPhase = ''
for i in sublime_text plugin_host crash_reporter; do
patchelf \
--interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-rpath ${libPath}:${stdenv.gcc.gcc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"} \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath ${libPath}:${stdenv.cc.gcc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"} \
$i
done
'';
@ -41,7 +41,7 @@ in let
mkdir -p $out
cp -prvd * $out/
# Without this, plugin_host crashes, even though it has the rpath
wrapProgram $out/plugin_host --prefix LD_PRELOAD : ${stdenv.gcc.gcc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"}/libgcc_s.so.1:${openssl}/lib/libssl.so:${bzip2}/lib/libbz2.so
wrapProgram $out/plugin_host --prefix LD_PRELOAD : ${stdenv.cc.gcc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"}/libgcc_s.so.1:${openssl}/lib/libssl.so:${bzip2}/lib/libbz2.so
'';
};
in stdenv.mkDerivation {

View file

@ -17,7 +17,7 @@ rm $p/Reader/intellinux/plug_ins/PPKLite.api
# More pointless files.
rm $p/bin/UNINSTALL
patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath $libPath \
$p/Reader/intellinux/bin/acroread

View file

@ -20,7 +20,7 @@ stdenv.mkDerivation {
# versions.
libPath = stdenv.lib.makeLibraryPath
[ stdenv.gcc.gcc libX11 zlib libxml2 cups pango atk gtk glib gdk_pixbuf ];
[ stdenv.cc.gcc libX11 zlib libxml2 cups pango atk gtk glib gdk_pixbuf ];
meta = {
description = "Adobe Reader, a viewer for PDF documents";

View file

@ -16,7 +16,7 @@ stdenv.mkDerivation {
nativeBuildInputs = [
glibc
glib
stdenv.gcc.gcc
stdenv.cc.gcc
libSM
libICE
libXi
@ -59,7 +59,7 @@ stdenv.mkDerivation {
fullPath=$fullPath:$i/lib
done
patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath $fullPath \
$out/opt/googleearth/googleearth-bin

View file

@ -53,7 +53,7 @@ stdenv.mkDerivation {
sed -i /ENV{PATH}/d ikiwiki.in
# State the gcc dependency, and make the cgi use our wrapper
sed -i -e 's@$0@"'$out/bin/ikiwiki'"@' \
-e "s@'cc'@'${stdenv.gcc}/bin/gcc'@" IkiWiki/Wrapper.pm
-e "s@'cc'@'${stdenv.cc}/bin/gcc'@" IkiWiki/Wrapper.pm
'';
configurePhase = "perl Makefile.PL PREFIX=$out";

View file

@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
buildInputs =
[ cmake qt4 perl shared_mime_info libvorbis taglib
flac libsamplerate libdvdread lame libsndfile
libmad gettext stdenv.gcc.libc
libmad gettext stdenv.cc.libc
kdelibs kdemultimedia automoc4 phonon
libkcddb makeWrapper cdparanoia
];

View file

@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
postInstall = ''
wrapProgram "$out/bin/mysql-workbench" \
--prefix LD_LIBRARY_PATH : "${python}/lib" \
--prefix LD_LIBRARY_PATH : "$(cat ${stdenv.gcc}/nix-support/orig-gcc)/lib64" \
--prefix LD_LIBRARY_PATH : "$(cat ${stdenv.cc}/nix-support/orig-gcc)/lib64" \
--prefix PATH : "${gnome_keyring}/bin" \
--prefix PATH : "${python}/bin" \
--set PYTHONPATH $PYTHONPATH \

View file

@ -3,7 +3,7 @@
stdenv.mkDerivation {
name = "procmail-3.22";
buildInputs = [ stdenv.gcc.libc ];
buildInputs = [ stdenv.cc.libc ];
# getline is defined differently in glibc now. So rename it.
installPhase = "

View file

@ -28,7 +28,7 @@ stdenv.mkDerivation {
cp usr/bin/rescuetime $out/bin
${patchelf}/bin/patchelf \
--interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
$out/bin/rescuetime
wrapProgram $out/bin/rescuetime \

View file

@ -9,7 +9,7 @@ let
else if stdenv.system == "i686-linux" then "0jv3zg0jhdzsc56kkpylwihvhsz73gsl2i2pjmqk3r3x4gwjk8xx"
else throw "Bittorrent Sync for: ${stdenv.system} not supported!";
libPath = stdenv.lib.makeLibraryPath [ stdenv.gcc.libc ];
libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.libc ];
in
stdenv.mkDerivation rec {
name = "btsync-${version}";
@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
mkdir -p "$out/bin/"
cp -r "btsync" "$out/bin/"
patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath ${libPath} "$out/bin/btsync"
'';

View file

@ -35,7 +35,7 @@ let
'';
patchPhase = let
rpaths = [ stdenv.gcc.gcc ];
rpaths = [ stdenv.cc.gcc ];
mkrpath = p: "${makeSearchPath "lib64" p}:${makeSearchPath "lib" p}";
in ''
for sofile in PepperFlash/libpepflashplayer.so \

View file

@ -70,7 +70,7 @@ stdenv.mkDerivation {
phases = "unpackPhase installPhase";
libPath = stdenv.lib.makeLibraryPath
[ stdenv.gcc.gcc
[ stdenv.cc.gcc
alsaLib
atk
cairo
@ -106,7 +106,7 @@ stdenv.mkDerivation {
pulseaudio
systemd
] + ":" + stdenv.lib.makeSearchPath "lib64" [
stdenv.gcc.gcc
stdenv.cc.gcc
];
# "strip" after "patchelf" may break binaries.
@ -125,7 +125,7 @@ stdenv.mkDerivation {
firefox mozilla-xremote-client firefox-bin plugin-container \
updater crashreporter webapprt-stub
do
patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
"$out/usr/lib/firefox-bin-${version}/$executable"
done

View file

@ -13,7 +13,7 @@
enableOfficialBranding ? false
}:
assert stdenv.gcc ? libc && stdenv.gcc.libc != null;
assert stdenv.cc ? libc && stdenv.cc.libc != null;
let version = "34.0.5"; in

View file

@ -32,7 +32,7 @@ let
xorg.libXfixes
xorg.libXrender
xorg.libXrandr
stdenv.gcc.gcc
stdenv.cc.gcc
alsaLib
pulseaudio
dbus_glib
@ -76,19 +76,19 @@ stdenv.mkDerivation rec {
cp opt/google/talkplugin/*.so $plugins
for i in libnpgoogletalk.so libppgoogletalk.so libppo1d.so; do
patchelf --set-rpath "${makeLibraryPath [ stdenv.gcc.gcc xorg.libX11 ]}:${stdenv.gcc.gcc}/lib64" $plugins/$i
patchelf --set-rpath "${makeLibraryPath [ stdenv.cc.gcc xorg.libX11 ]}:${stdenv.cc.gcc}/lib64" $plugins/$i
done
for i in libgoogletalkremoting.so libnpo1d.so; do
patchelf --set-rpath "$out/libexec/google/talkplugin/lib:${rpathPlugin}:${stdenv.gcc.gcc}/lib64" $plugins/$i
patchelf --set-rpath "$out/libexec/google/talkplugin/lib:${rpathPlugin}:${stdenv.cc.gcc}/lib64" $plugins/$i
done
mkdir -p $out/libexec/google/talkplugin
cp -prd opt/google/talkplugin/{data,GoogleTalkPlugin,locale,remoting24x24.png,windowpicker.glade} $out/libexec/google/talkplugin/
patchelf \
--set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-rpath "${rpathProgram}:${stdenv.gcc.gcc}/lib64" \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${rpathProgram}:${stdenv.cc.gcc}/lib64" \
$out/libexec/google/talkplugin/GoogleTalkPlugin
# Generate an LD_PRELOAD wrapper to redirect execvp() calls to

View file

@ -6,7 +6,7 @@
, kdeSupport ? false, qt4, kdelibs
}:
assert stdenv.isLinux && stdenv.gcc.gcc != null && stdenv.gcc.libc != null;
assert stdenv.isLinux && stdenv.cc.gcc != null && stdenv.cc.libc != null;
let
mirror = http://get.geo.opera.com/pub/opera;
@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
'';
buildInputs =
[ stdenv.gcc.gcc stdenv.gcc.libc zlib libX11 libXt libXext libSM libICE
[ stdenv.cc.gcc stdenv.cc.libc zlib libX11 libXt libXext libSM libICE
libXft freetype fontconfig libXrender libuuid expat
gstreamer libxml2 gst_plugins_base
]
@ -57,7 +57,7 @@ stdenv.mkDerivation rec {
elif [ $type == "EXEC" ]; then
echo "patching $f executable <<"
patchelf \
--set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${libPath}" \
"$f"
elif [ $type == "DYN" ]; then

View file

@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
for n in "bin/"* "sbin/"*; do
sed -i $n -e "s|#!/usr/bin/env bash|#! ${bash}/bin/bash|"
done
patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" bin/container-executor
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" bin/container-executor
'';
installPhase = ''

View file

@ -32,8 +32,8 @@ stdenv.mkDerivation rec {
"USE_BV32=" "USE_COREAUDIO=" "USE_G711=" "USE_G722=" "USE_G722_1="
"USE_ILBC=" "USE_OPUS=" "USE_SILK="
]
++ stdenv.lib.optional (stdenv.gcc.gcc != null) "SYSROOT_ALT=${stdenv.gcc.gcc}"
++ stdenv.lib.optional (stdenv.gcc.libc != null) "SYSROOT=${stdenv.gcc.libc}"
++ stdenv.lib.optional (stdenv.cc.gcc != null) "SYSROOT_ALT=${stdenv.cc.gcc}"
++ stdenv.lib.optional (stdenv.cc.libc != null) "SYSROOT=${stdenv.cc.libc}"
;
NIX_CFLAGS_COMPILE='' -I${librem}/include/rem -I${gsm}/include/gsm '';
meta = {

View file

@ -19,7 +19,7 @@ stdenv.mkDerivation {
libPath =
stdenv.lib.makeLibraryPath [
openssl alsaLib libXext libXfixes libXrandr libjpeg curl_custom
libX11 libXmu libXv qt4 libXtst mesa stdenv.gcc.gcc zlib
libX11 libXmu libXv qt4 libXtst mesa stdenv.cc.gcc zlib
gnome.GConf libidn rtmpdump c-ares openldap
];
buildCommand = ''
@ -28,7 +28,7 @@ stdenv.mkDerivation {
cp -R usr/lib/fuzebox $out/lib
patchelf \
--set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath $out/lib/fuzebox:$libPath \
$out/lib/fuzebox/FuzeLinuxApp

View file

@ -41,7 +41,7 @@ let
xz
libcanberra
xcbutilkeysyms
] + ":${stdenv.gcc.gcc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"}";
] + ":${stdenv.cc.gcc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"}";
src =
if stdenv.system == "x86_64-linux" then
@ -76,7 +76,7 @@ stdenv.mkDerivation {
mv usr/share $out
for file in $(find $d -type f); do
patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" $file || true
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $file || true
patchelf --set-rpath ${rpath}:\$ORIGIN $file || true
done

View file

@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
buildInputs = [
stdenv.glibc
stdenv.gcc.gcc
stdenv.cc.gcc
libXv
libXext
libX11
@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
fullPath=$fullPath''${fullPath:+:}$i/lib
done
patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "$fullPath" $out/libexec/skype/skype
cat > $out/bin/skype << EOF

View file

@ -46,8 +46,8 @@ stdenv.mkDerivation rec {
mv ts3client_linux_${arch} ts3client
echo "patching ts3client..."
patchelf \
--interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-rpath ${stdenv.lib.makeLibraryPath deps}:$(cat $NIX_GCC/nix-support/orig-gcc)/${libDir} \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath ${stdenv.lib.makeLibraryPath deps}:$(cat $NIX_CC/nix-support/orig-gcc)/${libDir} \
--force-rpath \
ts3client
'';

View file

@ -29,8 +29,8 @@ stdenv.mkDerivation {
mv ts3server_linux_${arch} ts3server
echo "patching ts3server"
patchelf \
--interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-rpath $(cat $NIX_GCC/nix-support/orig-gcc)/${libDir} \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath $(cat $NIX_CC/nix-support/orig-gcc)/${libDir} \
--force-rpath \
ts3server
'';

View file

@ -115,7 +115,7 @@ stdenv.mkDerivation {
thunderbird mozilla-xremote-client thunderbird-bin plugin-container \
updater
do
patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
"$out/usr/lib/thunderbird-bin-${version}/$executable"
done

View file

@ -5,7 +5,7 @@ let
topath = "${wineUnstable}/bin";
toldpath = stdenv.lib.concatStringsSep ":" (map (x: "${x}/lib")
[ stdenv.gcc.gcc libX11 libXtst libXext libXdamage libXfixes wineUnstable ]);
[ stdenv.cc.gcc libX11 libXtst libXext libXdamage libXfixes wineUnstable ]);
in
stdenv.mkDerivation {
name = "teamviewer-8.0.17147";
@ -34,8 +34,8 @@ stdenv.mkDerivation {
EOF
chmod +x $out/bin/teamviewer
patchelf --set-rpath "${stdenv.gcc.gcc}/lib64:${stdenv.gcc.gcc}/lib:${libX11}/lib:${libXext}/lib:${libXau}/lib:${libXdamage}/lib:${libXfixes}/lib" $out/share/teamviewer8/tv_bin/teamviewerd
patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" $out/share/teamviewer8/tv_bin/teamviewerd
patchelf --set-rpath "${stdenv.cc.gcc}/lib64:${stdenv.cc.gcc}/lib:${libX11}/lib:${libXext}/lib:${libXau}/lib:${libXdamage}/lib:${libXfixes}/lib" $out/share/teamviewer8/tv_bin/teamviewerd
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/teamviewer8/tv_bin/teamviewerd
ln -s $out/share/teamviewer8/tv_bin/teamviewerd $out/bin/
'';

View file

@ -35,7 +35,7 @@ stdenv.mkDerivation {
chmod +x $out/bin/teamviewer
patchelf --set-rpath "${stdenv.gcc.gcc}/lib64:${stdenv.gcc.gcc}/lib:${libX11}/lib:${libXext}/lib:${libXau}/lib:${libXdamage}/lib:${libXfixes}/lib" $out/share/teamviewer9/tv_bin/teamviewerd
patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" $out/share/teamviewer9/tv_bin/teamviewerd
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/teamviewer9/tv_bin/teamviewerd
ln -s $out/share/teamviewer9/tv_bin/teamviewerd $out/bin/
'';

View file

@ -6,7 +6,7 @@ let
topath = "${wine}/bin";
toldpath = stdenv.lib.concatStringsSep ":" (map (x: "${x}/lib")
[ stdenv.gcc.gcc libX11 libXtst libXext libXdamage libXfixes wine ]);
[ stdenv.cc.gcc libX11 libXtst libXext libXdamage libXfixes wine ]);
in
stdenv.mkDerivation {
name = "teamviewer-7.0.9377";

View file

@ -125,7 +125,7 @@ stdenv.mkDerivation {
firefox mozilla-xremote-client firefox-bin plugin-container \
updater crashreporter webapprt-stub
do
patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
"$out/usr/lib/firefox-bin-${version}/$executable"
done

View file

@ -59,11 +59,11 @@ stdenv.mkDerivation rec {
gcc -shared -fPIC -DEAGLE_PATH=\"$out/eagle-${version}\" ${./eagle_fixer.c} -o "$out"/lib/eagle_fixer.so -ldl
# Make wrapper script
dynlinker="$(cat $NIX_GCC/nix-support/dynamic-linker)"
dynlinker="$(cat $NIX_CC/nix-support/dynamic-linker)"
mkdir -p "$out"/bin
cat > "$out"/bin/eagle << EOF
#!${stdenv.shell}
export LD_LIBRARY_PATH="${stdenv.gcc.gcc}/lib:${libPath}"
export LD_LIBRARY_PATH="${stdenv.cc.gcc}/lib:${libPath}"
export LD_PRELOAD="$out/lib/eagle_fixer.so"
exec "$dynlinker" "$out/eagle-${version}/bin/eagle" "\$@"
EOF

View file

@ -5,12 +5,12 @@ assert stdenv.isLinux;
let
libPath = stdenv.lib.makeLibraryPath
[ stdenv.gcc.libc stdenv.gcc.gcc gtk gdk_pixbuf atk pango glib cairo
[ stdenv.cc.libc stdenv.cc.gcc gtk gdk_pixbuf atk pango glib cairo
freetype fontconfig libxml2 gnome2.gtksourceview
] + ":${stdenv.gcc.gcc}/lib64";
] + ":${stdenv.cc.gcc}/lib64";
patchExe = x: ''
patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath ${libPath} ${x}
'';
in

View file

@ -3,7 +3,7 @@
assert stdenv.isLinux;
let
libPath = stdenv.lib.makeLibraryPath [ stdenv.gcc.libc ];
libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.libc ];
in
stdenv.mkDerivation rec {
name = "yices-${version}";

View file

@ -93,7 +93,7 @@ stdenv.mkDerivation rec {
elif [ "$type" == "EXEC" ]; then
echo "patching $f executable <<"
patchelf \
--set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${ldpath}" \
"$f"
patchelf --shrink-rpath "$f"

View file

@ -104,7 +104,7 @@ stdenv.mkDerivation rec {
echo "patching $f executable <<"
patchelf --shrink-rpath "$f"
patchelf \
--set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "$(patchelf --print-rpath "$f"):${ldpath}" \
"$f" \
&& patchelf --shrink-rpath "$f" \

View file

@ -3,7 +3,7 @@ source $stdenv/setup
buildPhase() {
for i in bin/*; do
patchelf \
--set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath $libX11/lib:$libXext/lib \
$i
done

View file

@ -1,12 +1,12 @@
source $stdenv/setup
echo $NIX_GCC
echo $NIX_CC
buildPhase() {
for i in bin/*; do
patchelf \
--set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-rpath $libX11/lib:$libXext/lib:$libSM/lib:$(cat $NIX_GCC/nix-support/orig-gcc)/lib \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath $libX11/lib:$libXext/lib:$libSM/lib:$(cat $NIX_CC/nix-support/orig-gcc)/lib \
$i
done
}

View file

@ -1,12 +1,12 @@
source $stdenv/setup
echo $NIX_GCC
echo $NIX_CC
buildPhase() {
for i in bin/*; do
patchelf \
--set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-rpath $libX11/lib:$libXext/lib:$libSM/lib:$(cat $NIX_GCC/nix-support/orig-gcc)/lib \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath $libX11/lib:$libXext/lib:$libSM/lib:$(cat $NIX_CC/nix-support/orig-gcc)/lib \
$i
done
}

View file

@ -17,8 +17,8 @@ stdenv.mkDerivation {
''
for i in bin/*; do
patchelf \
--set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-rpath ${stdenv.lib.makeLibraryPath [ libX11 libXext libSM ]}:$(cat $NIX_GCC/nix-support/orig-gcc)/lib \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath ${stdenv.lib.makeLibraryPath [ libX11 libXext libSM ]}:$(cat $NIX_CC/nix-support/orig-gcc)/lib \
$i
done
'';

View file

@ -17,8 +17,8 @@ stdenv.mkDerivation {
''
for i in bin/*; do
patchelf \
--set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-rpath ${stdenv.lib.makeLibraryPath [ libX11 libXext libSM ]}:$(cat $NIX_GCC/nix-support/orig-gcc)/lib \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath ${stdenv.lib.makeLibraryPath [ libX11 libXext libSM ]}:$(cat $NIX_CC/nix-support/orig-gcc)/lib \
$i
done
'';

View file

@ -17,8 +17,8 @@ stdenv.mkDerivation {
''
for i in bin/*; do
patchelf \
--set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-rpath ${stdenv.lib.makeLibraryPath [ libX11 libXext libSM ]}:$(cat $NIX_GCC/nix-support/orig-gcc)/lib \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath ${stdenv.lib.makeLibraryPath [ libX11 libXext libSM ]}:$(cat $NIX_CC/nix-support/orig-gcc)/lib \
$i
done
'';

View file

@ -17,8 +17,8 @@ stdenv.mkDerivation {
''
for i in bin/*; do
patchelf \
--set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-rpath ${stdenv.lib.makeLibraryPath [ libX11 libXext libSM ]}:$(cat $NIX_GCC/nix-support/orig-gcc)/lib \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath ${stdenv.lib.makeLibraryPath [ libX11 libXext libSM ]}:$(cat $NIX_CC/nix-support/orig-gcc)/lib \
$i
done
'';
@ -28,7 +28,7 @@ stdenv.mkDerivation {
mkdir -p $out
cp -prvd * $out/
wrapProgram $out/bin/ib2012ux --prefix PATH : ${xdg_utils}/bin \
--prefix LD_PRELOAD : $(cat $NIX_GCC/nix-support/orig-gcc)/lib/libgcc_s.so.1
--prefix LD_PRELOAD : $(cat $NIX_CC/nix-support/orig-gcc)/lib/libgcc_s.so.1
'';
meta = {

View file

@ -17,8 +17,8 @@ stdenv.mkDerivation {
''
for i in bin/*; do
patchelf \
--set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-rpath ${stdenv.lib.makeLibraryPath [ libX11 libXext libSM ]}:$(cat $NIX_GCC/nix-support/orig-gcc)/lib \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath ${stdenv.lib.makeLibraryPath [ libX11 libXext libSM ]}:$(cat $NIX_CC/nix-support/orig-gcc)/lib \
$i
done
'';
@ -28,7 +28,7 @@ stdenv.mkDerivation {
mkdir -p $out
cp -prvd * $out/
wrapProgram $out/bin/ib2013ux --prefix PATH : ${xdg_utils}/bin \
--prefix LD_PRELOAD : $(cat $NIX_GCC/nix-support/orig-gcc)/lib/libgcc_s.so.1
--prefix LD_PRELOAD : $(cat $NIX_CC/nix-support/orig-gcc)/lib/libgcc_s.so.1
'';
meta = {

View file

@ -27,7 +27,7 @@ libPath="${libPath}:${out}/lib" # XXX: der. This should be in the nix file?
for i in ${bin} ; do
patchelf \
--interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath $libPath \
${i}
done

View file

@ -19,8 +19,8 @@ stdenv.mkDerivation rec {
buildInputs = [openssl qt4 mesa zlib pkgconfig libav];
libPath = stdenv.lib.makeLibraryPath [stdenv.gcc.gcc openssl mesa qt4 zlib ]
+ ":" + stdenv.gcc.gcc + "/lib64";
libPath = stdenv.lib.makeLibraryPath [stdenv.cc.gcc openssl mesa qt4 zlib ]
+ ":" + stdenv.cc.gcc + "/lib64";
meta = with stdenv.lib; {
description = "convert blu-ray and dvd to mkv";

View file

@ -70,7 +70,7 @@ stdenv.mkDerivation {
''
else throw ("Architecture: "+stdenv.system+" not supported for VirtualBox guest additions")
}
patchelf --set-rpath ${stdenv.gcc.gcc}/lib:${dbus}/lib:${libX11}/lib:${libXt}/lib:${libXext}/lib:${libXmu}/lib:${libXfixes}/lib:${libXrandr}/lib:${libXcursor}/lib $i
patchelf --set-rpath ${stdenv.cc.gcc}/lib:${dbus}/lib:${libX11}/lib:${libXt}/lib:${libXext}/lib:${libXmu}/lib:${libXfixes}/lib:${libXrandr}/lib:${libXcursor}/lib $i
done
for i in lib/VBoxOGL*.so

View file

@ -100,13 +100,13 @@ let inherit (builtins) head tail trace; in
${stdenv.preHook}
set -e
NIX_GCC=${stdenv.gcc}
NIX_CC=${stdenv.cc}
export SHELL=${stdenv.shell}
PATH_DELIMITER=':'
# Set up the initial path.
PATH=
for i in \$NIX_GCC ${toString stdenv.initialPath}; do
for i in \$NIX_CC ${toString stdenv.initialPath}; do
PATH=\$PATH\${PATH:+\"\${PATH_DELIMITER}\"}\$i/bin
done
@ -138,7 +138,7 @@ let inherit (builtins) head tail trace; in
}
pkgs=\"\"
for i in \$NIX_GCC ${toString realBuildInputs}; do
for i in \$NIX_CC ${toString realBuildInputs}; do
findInputs \$i
done

View file

@ -220,6 +220,8 @@ assert !enableStaticLibraries -> versionOlder "7.7" ghc.version;
done
done
configureFlags+=" --with-gcc=$CC"
${optionalString (self.enableSharedExecutables && self.stdenv.isLinux) ''
configureFlags+=" --ghc-option=-optl=-Wl,-rpath=$out/lib/${ghc.ghc.name}/${self.pname}-${self.version}"
''}

View file

@ -1,7 +1,7 @@
#! @shell@ -e
if test -n "$NIX_GCC_WRAPPER_START_HOOK"; then
source "$NIX_GCC_WRAPPER_START_HOOK"
if test -n "$NIX_CC_WRAPPER_START_HOOK"; then
source "$NIX_CC_WRAPPER_START_HOOK"
fi
if test -z "$NIX_CROSS_GLIBC_FLAGS_SET"; then
@ -107,8 +107,8 @@ if test "$NIX_DEBUG" = "1"; then
done
fi
if test -n "$NIX_GCC_WRAPPER_EXEC_HOOK"; then
source "$NIX_GCC_WRAPPER_EXEC_HOOK"
if test -n "$NIX_CC_WRAPPER_EXEC_HOOK"; then
source "$NIX_CC_WRAPPER_EXEC_HOOK"
fi
# We want gcc to call the wrapper linker, not that of binutils.

View file

@ -25,4 +25,4 @@ if test -e @out@/nix-support/libc-ldflags-before; then
export NIX_LDFLAGS_BEFORE="$(cat @out@/nix-support/libc-ldflags-before) $NIX_LDFLAGS_BEFORE"
fi
export NIX_GCC_WRAPPER_FLAGS_SET=1
export NIX_CC_WRAPPER_FLAGS_SET=1

View file

@ -1,10 +1,10 @@
#! @shell@ -e
if [ -n "$NIX_GCC_WRAPPER_START_HOOK" ]; then
source "$NIX_GCC_WRAPPER_START_HOOK"
if [ -n "$NIX_CC_WRAPPER_START_HOOK" ]; then
source "$NIX_CC_WRAPPER_START_HOOK"
fi
if [ -z "$NIX_GCC_WRAPPER_FLAGS_SET" ]; then
if [ -z "$NIX_CC_WRAPPER_FLAGS_SET" ]; then
source @out@/nix-support/add-flags.sh
fi
@ -139,8 +139,8 @@ if [ -n "$NIX_DEBUG" ]; then
done
fi
if [ -n "$NIX_GCC_WRAPPER_EXEC_HOOK" ]; then
source "$NIX_GCC_WRAPPER_EXEC_HOOK"
if [ -n "$NIX_CC_WRAPPER_EXEC_HOOK" ]; then
source "$NIX_CC_WRAPPER_EXEC_HOOK"
fi
exec @prog@ ${extraBefore[@]} "${params[@]}" "${extraAfter[@]}"

View file

@ -1,10 +1,10 @@
#! @shell@ -e
if test -n "$NIX_GCC_WRAPPER_START_HOOK"; then
source "$NIX_GCC_WRAPPER_START_HOOK"
if test -n "$NIX_CC_WRAPPER_START_HOOK"; then
source "$NIX_CC_WRAPPER_START_HOOK"
fi
if test -z "$NIX_GCC_WRAPPER_FLAGS_SET"; then
if test -z "$NIX_CC_WRAPPER_FLAGS_SET"; then
source @out@/nix-support/add-flags.sh
fi
@ -130,15 +130,15 @@ if test "$NIX_DEBUG" = "1"; then
done
fi
if test -n "$NIX_GCC_WRAPPER_EXEC_HOOK"; then
source "$NIX_GCC_WRAPPER_EXEC_HOOK"
if test -n "$NIX_CC_WRAPPER_EXEC_HOOK"; then
source "$NIX_CC_WRAPPER_EXEC_HOOK"
fi
# Call the real `gcc'. Filter out warnings from stderr about unused
# `-B' flags, since they confuse some programs. Deep bash magic to
# apply grep to stderr (by swapping stdin/stderr twice).
if test -z "$NIX_GCC_NEEDS_GREP"; then
if test -z "$NIX_CC_NEEDS_GREP"; then
@gccProg@ ${extraBefore[@]} "${params[@]}" ${extraAfter[@]}
else
(@gccProg@ ${extraBefore[@]} "${params[@]}" ${extraAfter[@]} 3>&2 2>&1 1>&3- \

View file

@ -4,7 +4,7 @@ if test -n "$NIX_LD_WRAPPER_START_HOOK"; then
source "$NIX_LD_WRAPPER_START_HOOK"
fi
if test -z "$NIX_GCC_WRAPPER_FLAGS_SET"; then
if test -z "$NIX_CC_WRAPPER_FLAGS_SET"; then
source @out@/nix-support/add-flags.sh
fi

View file

@ -25,4 +25,4 @@ if [ -e @out@/nix-support/libc-ldflags-before ]; then
export NIX_LDFLAGS_BEFORE="$(cat @out@/nix-support/libc-ldflags-before) $NIX_LDFLAGS_BEFORE"
fi
export NIX_GCC_WRAPPER_FLAGS_SET=1
export NIX_CC_WRAPPER_FLAGS_SET=1

View file

@ -226,7 +226,7 @@ stdenv.mkDerivation {
crossAttrs = {
shell = shell.crossDrv + shell.crossDrv.shellPath;
libc = stdenv.gccCross.libc;
libc = stdenv.ccCross.libc;
coreutils = coreutils.crossDrv;
binutils = binutils.crossDrv;
gcc = gcc.crossDrv;

View file

@ -1,10 +1,10 @@
#! @shell@ -e
if [ -n "$NIX_GCC_WRAPPER_START_HOOK" ]; then
source "$NIX_GCC_WRAPPER_START_HOOK"
if [ -n "$NIX_CC_WRAPPER_START_HOOK" ]; then
source "$NIX_CC_WRAPPER_START_HOOK"
fi
if [ -z "$NIX_GCC_WRAPPER_FLAGS_SET" ]; then
if [ -z "$NIX_CC_WRAPPER_FLAGS_SET" ]; then
source @out@/nix-support/add-flags.sh
fi
@ -139,8 +139,8 @@ if [ -n "$NIX_DEBUG" ]; then
done
fi
if [ -n "$NIX_GCC_WRAPPER_EXEC_HOOK" ]; then
source "$NIX_GCC_WRAPPER_EXEC_HOOK"
if [ -n "$NIX_CC_WRAPPER_EXEC_HOOK" ]; then
source "$NIX_CC_WRAPPER_EXEC_HOOK"
fi
exec @prog@ ${extraBefore[@]} "${params[@]}" "${extraAfter[@]}"

View file

@ -4,7 +4,7 @@ if [ -n "$NIX_LD_WRAPPER_START_HOOK" ]; then
source "$NIX_LD_WRAPPER_START_HOOK"
fi
if [ -z "$NIX_GCC_WRAPPER_FLAGS_SET" ]; then
if [ -z "$NIX_CC_WRAPPER_FLAGS_SET" ]; then
source @out@/nix-support/add-flags.sh
fi

View file

@ -1,4 +1,4 @@
export NIX_GCC=@out@
export NIX_CC=@out@
addCVars () {
if [ -d $1/include ]; then
@ -33,3 +33,6 @@ fi
if [ -n "@coreutils@" ]; then
addToSearchPath PATH @coreutils@/bin
fi
export CC=gcc
export CXX=g++

View file

@ -36,8 +36,8 @@ stdenv.mkDerivation rec {
if echo "$filepath" | grep -q "\.elf$"; then
continue
fi
echo "setting interpreter $(cat "$NIX_GCC"/nix-support/dynamic-linker) in $filepath"
patchelf --set-interpreter "$(cat "$NIX_GCC"/nix-support/dynamic-linker)" "$filepath"
echo "setting interpreter $(cat "$NIX_CC"/nix-support/dynamic-linker) in $filepath"
patchelf --set-interpreter "$(cat "$NIX_CC"/nix-support/dynamic-linker)" "$filepath"
test $? -eq 0 || { echo "patchelf failed to process $filepath"; exit 1; }
fi
done

View file

@ -23,7 +23,7 @@ stdenv.mkDerivation {
do
wrapProgram $out/bin/$prog --set ALDORROOT $out \
--prefix PATH : ${openjdk}/bin \
--prefix PATH : ${stdenv.gcc}/bin ;
--prefix PATH : ${stdenv.cc}/bin ;
done
'';

View file

@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
preConfigure =
# Help libgc's configure.
'' export CXXCPP="g++ -E"
'' export CXXCPP="$CXX -E"
'';
patchPhase = ''

View file

@ -24,7 +24,7 @@ stdenv.mkDerivation {
buildCommand = ''
mkdir -p $out
tar -C $out -xjf ${dist}
patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
$out/bin/lisp
'';

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, coq, ocaml, ocamlPackages, gcc }:
{ stdenv, fetchurl, coq, ocaml, ocamlPackages }:
stdenv.mkDerivation rec {
name = "compcert-${version}";
@ -12,7 +12,10 @@ stdenv.mkDerivation rec {
buildInputs = [ coq ocaml ocamlPackages.menhir ];
enableParallelBuilding = true;
configurePhase = "./configure -prefix $out -toolprefix ${gcc}/bin/ " +
configurePhase = ''
substituteInPlace ./configure --replace '{toolprefix}gcc' '{toolprefix}cc'
./configure -prefix $out -toolprefix ${stdenv.cc}/bin/ '' +
(if stdenv.isDarwin then "ia32-macosx" else "ia32-linux");
meta = with stdenv.lib; {

View file

@ -10,12 +10,12 @@ let
jss-ver = "jss-0.4";
libPath = stdenv.lib.makeLibraryPath
[ stdenv.gcc.libc
stdenv.gcc.gcc
[ stdenv.cc.libc
stdenv.cc.gcc
gmp4
ncurses
zlib
] + ":${stdenv.gcc.gcc}/lib64";
] + ":${stdenv.cc.gcc}/lib64";
cryptol-bin =
if stdenv.system == "i686-linux"
@ -94,12 +94,12 @@ stdenv.mkDerivation rec {
# Hack around lack of libtinfo in NixOS
ln -s ${ncurses}/lib/libncursesw.so.5.9 $out/lib/libtinfo.so.5
ln -s ${stdenv.gcc.libc}/lib/libpthread-2.19.so $out/lib/libpthread.so.0
ln -s ${stdenv.cc.libc}/lib/libpthread-2.19.so $out/lib/libpthread.so.0
'';
fixupPhase = ''
for x in bin/cryptol bin/edif2verilog bin/copy-iverilog bin/symbolic_netlist bin/jaig bin/vvp-galois bin/lss libexec/jss; do
patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "$out/lib:${libPath}" $out/$x
patchelf --shrink-rpath $out/$x
done

View file

@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
gtk2 glib fontconfig freetype unixODBC alsaLib
];
rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.gcc.gcc}/lib64";
rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.cc.gcc}/lib64";
unpackPhase = ''
sh $src --keep --noexec
@ -38,10 +38,10 @@ stdenv.mkDerivation rec {
buildPhase = ''
find . -type f -executable -exec patchelf \
--set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
'{}' \; || true
find . -type f -exec patchelf \
--set-rpath $rpath:$out/jre/lib/amd64/jli:$out/lib:$out/lib64:$out/nvvm/lib:$out/nvvm/lib64:$(cat $NIX_GCC/nix-support/orig-gcc)/lib \
--set-rpath $rpath:$out/jre/lib/amd64/jli:$out/lib:$out/lib64:$out/nvvm/lib:$out/nvvm/lib64:$(cat $NIX_CC/nix-support/orig-gcc)/lib \
--force-rpath \
'{}' \; || true
'';

View file

@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
gtk2 glib fontconfig freetype unixODBC alsaLib
];
rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.gcc.gcc}/lib64";
rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.cc.gcc}/lib64";
unpackPhase = ''
sh $src --keep --noexec
@ -38,10 +38,10 @@ stdenv.mkDerivation rec {
buildPhase = ''
find . -type f -executable -exec patchelf \
--set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
'{}' \; || true
find . -type f -exec patchelf \
--set-rpath $rpath:$out/jre/lib/amd64/jli:$out/lib:$out/lib64:$out/nvvm/lib:$out/nvvm/lib64:$(cat $NIX_GCC/nix-support/orig-gcc)/lib \
--set-rpath $rpath:$out/jre/lib/amd64/jli:$out/lib:$out/lib64:$out/nvvm/lib:$out/nvvm/lib64:$(cat $NIX_CC/nix-support/orig-gcc)/lib \
--force-rpath \
'{}' \; || true
'';

View file

@ -17,7 +17,7 @@ let
buildInputs = [
fpc gtk glib libXi inputproto
libX11 xproto libXext xextproto pango atk
stdenv.gcc makeWrapper gdk_pixbuf
stdenv.cc makeWrapper gdk_pixbuf
];
in
stdenv.mkDerivation {

View file

@ -7,17 +7,17 @@ mkdir $NIX_FIXINC_DUMMY
if test "$noSysDirs" = "1"; then
if test -e $NIX_GCC/nix-support/orig-libc; then
if test -e $NIX_CC/nix-support/orig-libc; then
# Figure out what extra flags to pass to the gcc compilers
# being generated to make sure that they use our glibc.
extraCFlags="$(cat $NIX_GCC/nix-support/libc-cflags)"
extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
extraCFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
# Use *real* header files, otherwise a limits.h is generated
# that does not include Glibc's limits.h (notably missing
# SSIZE_MAX, which breaks the build).
export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include
export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
else
# Hack: support impure environments.

View file

@ -14,11 +14,11 @@ if test "$noSysDirs" = "1"; then
# Figure out what extra flags to pass to the gcc compilers being
# generated to make sure that they use our glibc.
if test -e $NIX_GCC/nix-support/orig-glibc; then
glibc=$(cat $NIX_GCC/nix-support/orig-glibc)
if test -e $NIX_CC/nix-support/orig-glibc; then
glibc=$(cat $NIX_CC/nix-support/orig-glibc)
# Ugh. Copied from gcc-wrapper/builder.sh. We can't just
# source in $NIX_GCC/nix-support/add-flags, since that would
# source in $NIX_CC/nix-support/add-flags, since that would
# cause *this* GCC to be linked against the *previous* GCC.
# Need some more modularity there.
extraCFlags="-B$glibc/lib -isystem $glibc/include"

View file

@ -12,17 +12,17 @@ export CPP="gcc -E"
if test "$noSysDirs" = "1"; then
if test -e $NIX_GCC/nix-support/orig-libc; then
if test -e $NIX_CC/nix-support/orig-libc; then
# Figure out what extra flags to pass to the gcc compilers
# being generated to make sure that they use our glibc.
extraCFlags="$(cat $NIX_GCC/nix-support/libc-cflags)"
extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
extraCFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
# Use *real* header files, otherwise a limits.h is generated
# that does not include Glibc's limits.h (notably missing
# SSIZE_MAX, which breaks the build).
export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include
export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
else
# Hack: support impure environments.

View file

@ -17,20 +17,20 @@ fi
if test "$noSysDirs" = "1"; then
if test -e $NIX_GCC/nix-support/orig-libc; then
if test -e $NIX_CC/nix-support/orig-libc; then
# Figure out what extra flags to pass to the gcc compilers
# being generated to make sure that they use our glibc.
extraFlags="$(cat $NIX_GCC/nix-support/libc-cflags)"
extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
extraFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
# Use *real* header files, otherwise a limits.h is generated
# that does not include Glibc's limits.h (notably missing
# SSIZE_MAX, which breaks the build).
export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include
export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
# The path to the Glibc binaries such as `crti.o'.
glibc_libdir="$(cat $NIX_GCC/nix-support/orig-libc)/lib"
glibc_libdir="$(cat $NIX_CC/nix-support/orig-libc)/lib"
else
# Hack: support impure environments.
@ -61,27 +61,27 @@ if test "$noSysDirs" = "1"; then
EXTRA_LDFLAGS_TARGET="-Wl,-L${libcCross}/lib"
fi
else
if test -z "$NIX_GCC_CROSS"; then
if test -z "$NIX_CC_CROSS"; then
EXTRA_FLAGS_TARGET="$EXTRA_FLAGS"
EXTRA_LDFLAGS_TARGET="$EXTRA_LDFLAGS"
else
# This the case of cross-building the gcc.
# We need special flags for the target, different than those of the build
# Assertion:
test -e $NIX_GCC_CROSS/nix-support/orig-libc
test -e $NIX_CC_CROSS/nix-support/orig-libc
# Figure out what extra flags to pass to the gcc compilers
# being generated to make sure that they use our glibc.
extraFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-cflags)"
extraLDFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-ldflags) $(cat $NIX_GCC_CROSS/nix-support/libc-ldflags-before)"
extraFlags="$(cat $NIX_CC_CROSS/nix-support/libc-cflags)"
extraLDFlags="$(cat $NIX_CC_CROSS/nix-support/libc-ldflags) $(cat $NIX_CC_CROSS/nix-support/libc-ldflags-before)"
# Use *real* header files, otherwise a limits.h is generated
# that does not include Glibc's limits.h (notably missing
# SSIZE_MAX, which breaks the build).
NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/include
NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_CC_CROSS/nix-support/orig-libc)/include
# The path to the Glibc binaries such as `crti.o'.
glibc_libdir="$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/lib"
glibc_libdir="$(cat $NIX_CC_CROSS/nix-support/orig-libc)/lib"
extraFlags="-g0 -O2 -I$NIX_FIXINC_DUMMY_CROSS $extraFlags"
extraLDFlags="--strip-debug -L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"

View file

@ -188,7 +188,7 @@ stdenv.mkDerivation ({
NM_FOR_TARGET = "${stdenv.cross.config}-nm";
CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
# If we are making a cross compiler, cross != null
NIX_GCC_CROSS = if cross == null then "${stdenv.gccCross}" else "";
NIX_CC_CROSS = if cross == null then "${stdenv.ccCross}" else "";
configureFlags = "
${if enableMultilib then "" else "--disable-multilib"}
${if enableShared then "" else "--disable-shared"}

View file

@ -23,20 +23,20 @@ echo "\$LIBRARY_PATH is \`$LIBRARY_PATH'"
if test "$noSysDirs" = "1"; then
if test -e $NIX_GCC/nix-support/orig-libc; then
if test -e $NIX_CC/nix-support/orig-libc; then
# Figure out what extra flags to pass to the gcc compilers
# being generated to make sure that they use our glibc.
extraFlags="$(cat $NIX_GCC/nix-support/libc-cflags)"
extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
extraFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
# Use *real* header files, otherwise a limits.h is generated
# that does not include Glibc's limits.h (notably missing
# SSIZE_MAX, which breaks the build).
export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include
export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
# The path to the Glibc binaries such as `crti.o'.
glibc_libdir="$(cat $NIX_GCC/nix-support/orig-libc)/lib"
glibc_libdir="$(cat $NIX_CC/nix-support/orig-libc)/lib"
else
# Hack: support impure environments.
@ -67,27 +67,27 @@ if test "$noSysDirs" = "1"; then
EXTRA_TARGET_LDFLAGS="-Wl,-L${libcCross}/lib"
fi
else
if test -z "$NIX_GCC_CROSS"; then
if test -z "$NIX_CC_CROSS"; then
EXTRA_TARGET_CFLAGS="$EXTRA_FLAGS"
EXTRA_TARGET_LDFLAGS="$EXTRA_LDFLAGS"
else
# This the case of cross-building the gcc.
# We need special flags for the target, different than those of the build
# Assertion:
test -e $NIX_GCC_CROSS/nix-support/orig-libc
test -e $NIX_CC_CROSS/nix-support/orig-libc
# Figure out what extra flags to pass to the gcc compilers
# being generated to make sure that they use our glibc.
extraFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-cflags)"
extraLDFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-ldflags) $(cat $NIX_GCC_CROSS/nix-support/libc-ldflags-before)"
extraFlags="$(cat $NIX_CC_CROSS/nix-support/libc-cflags)"
extraLDFlags="$(cat $NIX_CC_CROSS/nix-support/libc-ldflags) $(cat $NIX_CC_CROSS/nix-support/libc-ldflags-before)"
# Use *real* header files, otherwise a limits.h is generated
# that does not include Glibc's limits.h (notably missing
# SSIZE_MAX, which breaks the build).
NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/include
NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_CC_CROSS/nix-support/orig-libc)/include
# The path to the Glibc binaries such as `crti.o'.
glibc_libdir="$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/lib"
glibc_libdir="$(cat $NIX_CC_CROSS/nix-support/orig-libc)/lib"
extraFlags="-I$NIX_FIXINC_DUMMY_CROSS $extraFlags"
extraLDFlags="-L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
@ -162,7 +162,7 @@ preConfigure() {
# Patch the configure script so it finds glibc headers
# It's important for example in order not to get libssp built, because it's
# functionality is in glibc already.
glibc_headers="$(cat $NIX_GCC/nix-support/orig-libc)/include"
glibc_headers="$(cat $NIX_CC/nix-support/orig-libc)/include"
sed -i \
-e s,glibc_header_dir=/usr/include,glibc_header_dir=$glibc_headers, \
gcc/configure

View file

@ -185,11 +185,11 @@ stdenv.mkDerivation ({
sed -i gcc/config/t-gnu \
-es'|NATIVE_SYSTEM_HEADER_DIR.*$|NATIVE_SYSTEM_HEADER_DIR = ${libc}/include|g'
''
else if cross != null || stdenv.gcc.libc != null then
else if cross != null || stdenv.cc.libc != null then
# On NixOS, use the right path to the dynamic linker instead of
# `/lib/ld*.so'.
let
libc = if libcCross != null then libcCross else stdenv.gcc.libc;
libc = if libcCross != null then libcCross else stdenv.cc.libc;
in
'' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..."
for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
@ -272,7 +272,7 @@ stdenv.mkDerivation ({
NM_FOR_TARGET = "${stdenv.cross.config}-nm";
CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
# If we are making a cross compiler, cross != null
NIX_GCC_CROSS = if cross == null then "${stdenv.gccCross}" else "";
NIX_CC_CROSS = if cross == null then "${stdenv.ccCross}" else "";
dontStrip = true;
configureFlags = ''
${if enableMultilib then "" else "--disable-multilib"}

View file

@ -19,20 +19,20 @@ echo "\$LIBRARY_PATH is \`$LIBRARY_PATH'"
if test "$noSysDirs" = "1"; then
if test -e $NIX_GCC/nix-support/orig-libc; then
if test -e $NIX_CC/nix-support/orig-libc; then
# Figure out what extra flags to pass to the gcc compilers
# being generated to make sure that they use our glibc.
extraFlags="$(cat $NIX_GCC/nix-support/libc-cflags)"
extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
extraFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
# Use *real* header files, otherwise a limits.h is generated
# that does not include Glibc's limits.h (notably missing
# SSIZE_MAX, which breaks the build).
export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include
export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
# The path to the Glibc binaries such as `crti.o'.
glibc_libdir="$(cat $NIX_GCC/nix-support/orig-libc)/lib"
glibc_libdir="$(cat $NIX_CC/nix-support/orig-libc)/lib"
else
# Hack: support impure environments.
@ -74,27 +74,27 @@ if test "$noSysDirs" = "1"; then
EXTRA_TARGET_LDFLAGS="-Wl,-L${libcCross}/lib"
fi
else
if test -z "$NIX_GCC_CROSS"; then
if test -z "$NIX_CC_CROSS"; then
EXTRA_TARGET_CFLAGS="$EXTRA_FLAGS"
EXTRA_TARGET_LDFLAGS="$EXTRA_LDFLAGS"
else
# This the case of cross-building the gcc.
# We need special flags for the target, different than those of the build
# Assertion:
test -e $NIX_GCC_CROSS/nix-support/orig-libc
test -e $NIX_CC_CROSS/nix-support/orig-libc
# Figure out what extra flags to pass to the gcc compilers
# being generated to make sure that they use our glibc.
extraFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-cflags)"
extraLDFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-ldflags) $(cat $NIX_GCC_CROSS/nix-support/libc-ldflags-before)"
extraFlags="$(cat $NIX_CC_CROSS/nix-support/libc-cflags)"
extraLDFlags="$(cat $NIX_CC_CROSS/nix-support/libc-ldflags) $(cat $NIX_CC_CROSS/nix-support/libc-ldflags-before)"
# Use *real* header files, otherwise a limits.h is generated
# that does not include Glibc's limits.h (notably missing
# SSIZE_MAX, which breaks the build).
NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/include
NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_CC_CROSS/nix-support/orig-libc)/include
# The path to the Glibc binaries such as `crti.o'.
glibc_libdir="$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/lib"
glibc_libdir="$(cat $NIX_CC_CROSS/nix-support/orig-libc)/lib"
extraFlags="-I$NIX_FIXINC_DUMMY_CROSS $extraFlags"
extraLDFlags="-L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
@ -166,11 +166,11 @@ preConfigure() {
rm -Rf zlib
fi
if test -f "$NIX_GCC/nix-support/orig-libc"; then
if test -f "$NIX_CC/nix-support/orig-libc"; then
# Patch the configure script so it finds glibc headers. It's
# important for example in order not to get libssp built,
# because its functionality is in glibc already.
glibc_headers="$(cat $NIX_GCC/nix-support/orig-libc)/include"
glibc_headers="$(cat $NIX_CC/nix-support/orig-libc)/include"
sed -i \
-e "s,glibc_header_dir=/usr/include,glibc_header_dir=$glibc_headers", \
gcc/configure

View file

@ -229,11 +229,11 @@ stdenv.mkDerivation ({
sed -i gcc/config/t-gnu \
-es'|NATIVE_SYSTEM_HEADER_DIR.*$|NATIVE_SYSTEM_HEADER_DIR = ${libc}/include|g'
''
else if cross != null || stdenv.gcc.libc != null then
else if cross != null || stdenv.cc.libc != null then
# On NixOS, use the right path to the dynamic linker instead of
# `/lib/ld*.so'.
let
libc = if libcCross != null then libcCross else stdenv.gcc.libc;
libc = if libcCross != null then libcCross else stdenv.cc.libc;
in
'' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..."
for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
@ -339,7 +339,7 @@ stdenv.mkDerivation ({
NM_FOR_TARGET = "${stdenv.cross.config}-nm";
CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
# If we are making a cross compiler, cross != null
NIX_GCC_CROSS = if cross == null then "${stdenv.gccCross}" else "";
NIX_CC_CROSS = if cross == null then "${stdenv.ccCross}" else "";
dontStrip = true;
configureFlags = ''
${if enableMultilib then "" else "--disable-multilib"}

View file

@ -19,20 +19,20 @@ echo "\$LIBRARY_PATH is \`$LIBRARY_PATH'"
if test "$noSysDirs" = "1"; then
if test -e $NIX_GCC/nix-support/orig-libc; then
if test -e $NIX_CC/nix-support/orig-libc; then
# Figure out what extra flags to pass to the gcc compilers
# being generated to make sure that they use our glibc.
extraFlags="$(cat $NIX_GCC/nix-support/libc-cflags)"
extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
extraFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
# Use *real* header files, otherwise a limits.h is generated
# that does not include Glibc's limits.h (notably missing
# SSIZE_MAX, which breaks the build).
export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include
export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
# The path to the Glibc binaries such as `crti.o'.
glibc_libdir="$(cat $NIX_GCC/nix-support/orig-libc)/lib"
glibc_libdir="$(cat $NIX_CC/nix-support/orig-libc)/lib"
else
# Hack: support impure environments.
@ -74,7 +74,7 @@ if test "$noSysDirs" = "1"; then
EXTRA_TARGET_LDFLAGS="-Wl,-L${libcCross}/lib -Wl,-rpath,${libcCross}/lib -Wl,-rpath-link,${libcCross}/lib"
fi
else
if test -z "$NIX_GCC_CROSS"; then
if test -z "$NIX_CC_CROSS"; then
EXTRA_TARGET_CFLAGS="$EXTRA_FLAGS"
EXTRA_TARGET_CXXFLAGS="$EXTRA_FLAGS"
EXTRA_TARGET_LDFLAGS="$EXTRA_LDFLAGS"
@ -82,20 +82,20 @@ if test "$noSysDirs" = "1"; then
# This the case of cross-building the gcc.
# We need special flags for the target, different than those of the build
# Assertion:
test -e $NIX_GCC_CROSS/nix-support/orig-libc
test -e $NIX_CC_CROSS/nix-support/orig-libc
# Figure out what extra flags to pass to the gcc compilers
# being generated to make sure that they use our glibc.
extraFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-cflags)"
extraLDFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-ldflags) $(cat $NIX_GCC_CROSS/nix-support/libc-ldflags-before)"
extraFlags="$(cat $NIX_CC_CROSS/nix-support/libc-cflags)"
extraLDFlags="$(cat $NIX_CC_CROSS/nix-support/libc-ldflags) $(cat $NIX_CC_CROSS/nix-support/libc-ldflags-before)"
# Use *real* header files, otherwise a limits.h is generated
# that does not include Glibc's limits.h (notably missing
# SSIZE_MAX, which breaks the build).
NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/include
NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_CC_CROSS/nix-support/orig-libc)/include
# The path to the Glibc binaries such as `crti.o'.
glibc_dir="$(cat $NIX_GCC_CROSS/nix-support/orig-libc)"
glibc_dir="$(cat $NIX_CC_CROSS/nix-support/orig-libc)"
glibc_libdir="$glibc_dir/lib"
configureFlags="$configureFlags --with-native-system-header-dir=$glibc_dir/include"
@ -167,11 +167,11 @@ preConfigure() {
rm -Rf zlib
fi
if test -f "$NIX_GCC/nix-support/orig-libc"; then
if test -f "$NIX_CC/nix-support/orig-libc"; then
# Patch the configure script so it finds glibc headers. It's
# important for example in order not to get libssp built,
# because its functionality is in glibc already.
glibc_headers="$(cat $NIX_GCC/nix-support/orig-libc)/include"
glibc_headers="$(cat $NIX_CC/nix-support/orig-libc)/include"
sed -i \
-e "s,glibc_header_dir=/usr/include,glibc_header_dir=$glibc_headers", \
gcc/configure

View file

@ -251,11 +251,11 @@ stdenv.mkDerivation ({
sed -i "${gnu_h}" \
-es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc}/include"|g'
''
else if cross != null || stdenv.gcc.libc != null then
else if cross != null || stdenv.cc.libc != null then
# On NixOS, use the right path to the dynamic linker instead of
# `/lib/ld*.so'.
let
libc = if libcCross != null then libcCross else stdenv.gcc.libc;
libc = if libcCross != null then libcCross else stdenv.cc.libc;
in
'' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..."
for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
@ -397,7 +397,7 @@ stdenv.mkDerivation ({
NM_FOR_TARGET = "${stdenv.cross.config}-nm";
CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
# If we are making a cross compiler, cross != null
NIX_GCC_CROSS = if cross == null then "${stdenv.gccCross}" else "";
NIX_CC_CROSS = if cross == null then "${stdenv.ccCross}" else "";
dontStrip = true;
configureFlags = ''
${if enableMultilib then "" else "--disable-multilib"}

View file

@ -19,20 +19,20 @@ echo "\$LIBRARY_PATH is \`$LIBRARY_PATH'"
if test "$noSysDirs" = "1"; then
if test -e $NIX_GCC/nix-support/orig-libc; then
if test -e $NIX_CC/nix-support/orig-libc; then
# Figure out what extra flags to pass to the gcc compilers
# being generated to make sure that they use our glibc.
extraFlags="$(cat $NIX_GCC/nix-support/libc-cflags)"
extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
extraFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
# Use *real* header files, otherwise a limits.h is generated
# that does not include Glibc's limits.h (notably missing
# SSIZE_MAX, which breaks the build).
export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include
export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
# The path to the Glibc binaries such as `crti.o'.
glibc_libdir="$(cat $NIX_GCC/nix-support/orig-libc)/lib"
glibc_libdir="$(cat $NIX_CC/nix-support/orig-libc)/lib"
else
# Hack: support impure environments.
@ -74,7 +74,7 @@ if test "$noSysDirs" = "1"; then
EXTRA_TARGET_LDFLAGS="-Wl,-L${libcCross}/lib -Wl,-rpath,${libcCross}/lib -Wl,-rpath-link,${libcCross}/lib"
fi
else
if test -z "$NIX_GCC_CROSS"; then
if test -z "$NIX_CC_CROSS"; then
EXTRA_TARGET_CFLAGS="$EXTRA_FLAGS"
EXTRA_TARGET_CXXFLAGS="$EXTRA_FLAGS"
EXTRA_TARGET_LDFLAGS="$EXTRA_LDFLAGS"
@ -82,20 +82,20 @@ if test "$noSysDirs" = "1"; then
# This the case of cross-building the gcc.
# We need special flags for the target, different than those of the build
# Assertion:
test -e $NIX_GCC_CROSS/nix-support/orig-libc
test -e $NIX_CC_CROSS/nix-support/orig-libc
# Figure out what extra flags to pass to the gcc compilers
# being generated to make sure that they use our glibc.
extraFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-cflags)"
extraLDFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-ldflags) $(cat $NIX_GCC_CROSS/nix-support/libc-ldflags-before)"
extraFlags="$(cat $NIX_CC_CROSS/nix-support/libc-cflags)"
extraLDFlags="$(cat $NIX_CC_CROSS/nix-support/libc-ldflags) $(cat $NIX_CC_CROSS/nix-support/libc-ldflags-before)"
# Use *real* header files, otherwise a limits.h is generated
# that does not include Glibc's limits.h (notably missing
# SSIZE_MAX, which breaks the build).
NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/include
NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_CC_CROSS/nix-support/orig-libc)/include
# The path to the Glibc binaries such as `crti.o'.
glibc_dir="$(cat $NIX_GCC_CROSS/nix-support/orig-libc)"
glibc_dir="$(cat $NIX_CC_CROSS/nix-support/orig-libc)"
glibc_libdir="$glibc_dir/lib"
configureFlags="$configureFlags --with-native-system-header-dir=$glibc_dir/include"
@ -171,11 +171,11 @@ preConfigure() {
rm -Rf zlib
fi
if test -f "$NIX_GCC/nix-support/orig-libc"; then
if test -f "$NIX_CC/nix-support/orig-libc"; then
# Patch the configure script so it finds glibc headers. It's
# important for example in order not to get libssp built,
# because its functionality is in glibc already.
glibc_headers="$(cat $NIX_GCC/nix-support/orig-libc)/include"
glibc_headers="$(cat $NIX_CC/nix-support/orig-libc)/include"
sed -i \
-e "s,glibc_header_dir=/usr/include,glibc_header_dir=$glibc_headers", \
gcc/configure

View file

@ -247,11 +247,11 @@ stdenv.mkDerivation ({
sed -i "${gnu_h}" \
-es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc}/include"|g'
''
else if cross != null || stdenv.gcc.libc != null then
else if cross != null || stdenv.cc.libc != null then
# On NixOS, use the right path to the dynamic linker instead of
# `/lib/ld*.so'.
let
libc = if libcCross != null then libcCross else stdenv.gcc.libc;
libc = if libcCross != null then libcCross else stdenv.cc.libc;
in
'' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..."
for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
@ -385,7 +385,7 @@ stdenv.mkDerivation ({
NM_FOR_TARGET = "${stdenv.cross.config}-nm";
CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
# If we are making a cross compiler, cross != null
NIX_GCC_CROSS = if cross == null then "${stdenv.gccCross}" else "";
NIX_CC_CROSS = if cross == null then "${stdenv.ccCross}" else "";
dontStrip = true;
configureFlags = ''
${if enableMultilib then "" else "--disable-multilib"}

View file

@ -9,11 +9,11 @@ let
in
(
assert a.stdenv ? gcc ;
assert a.stdenv.gcc ? gcc ;
assert a.stdenv.gcc ? libc ;
assert a.stdenv.gcc.gcc != null ;
assert a.stdenv.gcc.libc != null ;
assert a.stdenv ? cc ;
assert a.stdenv.cc ? gcc ;
assert a.stdenv.cc ? libc ;
assert a.stdenv.cc.gcc != null ;
assert a.stdenv.cc.libc != null ;
rec {
src = a.fetchurl {
@ -37,7 +37,7 @@ rec {
preBuild = a.fullDepEntry (''
sed -re "s@/bin/cat@$(which cat)@g" -i configure */configure
sed -re "s@if test -d /proc/self @if false @" -i configure
sed -re 's^([ \t])cpp ^\1cpp -I${a.stdenv.gcc.gcc}/include -I${a.stdenv.gcc.libc}/include ^g' -i makefile
sed -re 's^([ \t])cpp ^\1cpp -I${a.stdenv.cc.gcc}/include -I${a.stdenv.cc.libc}/include ^g' -i makefile
'') ["minInit" "doUnpack" "addInputs"];
/* doConfigure should be removed if not needed */

View file

@ -45,7 +45,7 @@ stdenv.mkDerivation rec {
# find editline/gmp.
(if stdenv.isLinux then ''
find . -type f -perm +100 \
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${libedit}/lib:${ncurses}/lib:${gmp}/lib" {} \;
for prog in ld ar gcc strip ranlib; do
find . -name "setup-config" -exec sed -i "s@/usr/bin/$prog@$(type -p $prog)@g" {} \;

View file

@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
configureFlags=[
"--with-gmp-libraries=${gmp}/lib"
"--with-gmp-includes=${gmp}/include"
"--with-gcc=${stdenv.gcc}/bin/gcc"
"--with-gcc=${stdenv.cc}/bin/gcc"
];
meta = {

View file

@ -39,7 +39,7 @@ stdenv.mkDerivation rec {
# find editline/gmp.
(if stdenv.isLinux then ''
find . -type f -perm +100 \
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${libedit}/lib:${ncurses}/lib:${gmp}/lib" {} \;
for prog in ld ar gcc strip ranlib; do
find . -name "setup-config" -exec sed -i "s@/usr/bin/$prog@$(type -p $prog)@g" {} \;

View file

@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
configureFlags=[
"--with-gmp-libraries=${gmp}/lib"
"--with-gmp-includes=${gmp}/include"
"--with-gcc=${stdenv.gcc}/bin/gcc"
"--with-gcc=${stdenv.cc}/bin/gcc"
];
meta = {

View file

@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
configureFlags=[
"--with-gmp-libraries=${gmp}/lib"
"--with-gmp-includes=${gmp}/include"
"--with-gcc=${stdenv.gcc}/bin/gcc"
"--with-gcc=${stdenv.cc}/bin/gcc"
];
meta = {

View file

@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
configureFlags=[
"--with-gmp-libraries=${gmp}/lib"
"--with-gmp-includes=${gmp}/include"
"--with-gcc=${stdenv.gcc}/bin/gcc"
"--with-gcc=${stdenv.cc}/bin/gcc"
];
NIX_CFLAGS_COMPILE = "-fomit-frame-pointer";

View file

@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
configureFlags=[
"--with-gmp-libraries=${gmp}/lib"
"--with-gmp-includes=${gmp}/include"
"--with-gcc=${stdenv.gcc}/bin/gcc"
"--with-gcc=${stdenv.cc}/bin/gcc"
];
preConfigure=[

View file

@ -42,7 +42,7 @@ stdenv.mkDerivation rec {
# find editline/gmp.
(if stdenv.isLinux then ''
find . -type f -perm +100 \
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${ncurses}/lib:${gmp}/lib" {} \;
sed -i "s|/usr/bin/perl|perl\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
sed -i "s|/usr/bin/gcc|gcc\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2

View file

@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
'';
configureFlags=[
"--with-gcc=${stdenv.gcc}/bin/gcc"
"--with-gcc=${stdenv.cc}/bin/gcc"
];
# required, because otherwise all symbols from HSffi.o are stripped, and

View file

@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
'';
configureFlags=[
"--with-gcc=${stdenv.gcc}/bin/gcc"
"--with-gcc=${stdenv.cc}/bin/gcc"
];
# required, because otherwise all symbols from HSffi.o are stripped, and

Some files were not shown because too many files have changed in this diff Show more