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-26 11:06:21 -06:00
parent ce100a5d58
commit 28b6fb61e6
252 changed files with 553 additions and 540 deletions
@@ -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" {} \;
+1 -1
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 = {
@@ -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" {} \;
+1 -1
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 = {
+1 -1
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 = {
+1 -1
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";
+1 -1
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=[
@@ -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
+1 -1
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
+1 -1
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
+1 -1
View File
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
'';
configureFlags=[
"--with-gcc=${stdenv.gcc}/bin/gcc"
"--with-gcc=${stdenv.cc}/bin/gcc"
];
NIX_CFLAGS_COMPILE = "-fomit-frame-pointer";
@@ -30,7 +30,7 @@ stdenv.mkDerivation {
# find readline/gmp.
postBuild = 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 \"${readline}/lib:${ncurses}/lib:${gmp}/lib\" {} \\;
" else "";
+1 -1
View File
@@ -12,7 +12,7 @@ stdenv.mkDerivation {
propagatedBuildInputs = [readline ncurses gmp];
configureFlags = "--with-gcc=${stdenv.gcc}/bin/gcc";
configureFlags = "--with-gcc=${stdenv.cc}/bin/gcc";
preConfigure =
''
+1 -1
View File
@@ -25,7 +25,7 @@ stdenv.mkDerivation (rec {
"--with-gmp-libraries=${gmp}/lib"
"--with-gmp-includes=${gmp}/include"
"--with-readline-libraries=${readline}/lib"
"--with-gcc=${stdenv.gcc}/bin/gcc"
"--with-gcc=${stdenv.cc}/bin/gcc"
];
preConfigure = "
+1 -1
View File
@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
"--with-gmp-libraries=${gmp}/lib"
"--with-gmp-includes=${gmp}/include"
"--with-readline-libraries=${readline}/lib"
"--with-gcc=${stdenv.gcc}/bin/gcc"
"--with-gcc=${stdenv.cc}/bin/gcc"
];
preConfigure = ''
+1 -1
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
+1 -1
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
+1 -1
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
@@ -52,7 +52,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
+1 -1
View File
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
'';
configureFlags=[
"--with-gcc=${stdenv.gcc}/bin/gcc"
"--with-gcc=${stdenv.cc}/bin/gcc"
];
NIX_CFLAGS_COMPILE = "-fomit-frame-pointer";
+1 -1
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
+1 -1
View File
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
'';
configureFlags=[
"--with-gcc=${stdenv.gcc}/bin/gcc"
"--with-gcc=${stdenv.cc}/bin/gcc"
];
NIX_CFLAGS_COMPILE = "-fomit-frame-pointer";
+1 -1
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
@@ -52,7 +52,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
+1 -1
View File
@@ -26,7 +26,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
+1 -1
View File
@@ -23,7 +23,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
+1 -1
View File
@@ -24,7 +24,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
+1 -1
View File
@@ -41,7 +41,7 @@ in stdenv.mkDerivation rec {
export NIX_LDFLAGS="$NIX_LDFLAGS -rpath $out/lib/ghc-${version}"
'';
configureFlags = "--with-gcc=${stdenv.gcc}/bin/gcc";
configureFlags = "--with-gcc=${stdenv.cc}/bin/gcc";
postInstall = ''
# ghci uses mmap with rwx protection at it implements dynamic
@@ -52,7 +52,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
+1 -1
View File
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
'';
configureFlags = [
"--with-gcc=${stdenv.gcc}/bin/gcc"
"--with-gcc=${stdenv.cc}/bin/cc"
"--with-gmp-includes=${gmp}/include" "--with-gmp-libraries=${gmp}/lib"
];