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:
@@ -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" {} \;
|
||||
|
||||
@@ -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" {} \;
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 "";
|
||||
|
||||
|
||||
@@ -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 =
|
||||
''
|
||||
|
||||
@@ -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 = "
|
||||
|
||||
@@ -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 = ''
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user