summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2009-07-24 21:56:58 +0000
committerLudovic Courtès <ludo@gnu.org>2009-07-24 21:56:58 +0000
commit292a191f70fe2f557dd8035659400d55440cbef7 (patch)
treeb826cdc528366acfff106eb9ede49260c7d6c573 /pkgs
parent685bb27c64b68883eb92b1ab7f70f0f7be09d5ae (diff)
downloadnixpkgs-292a191f70fe2f557dd8035659400d55440cbef7.tar
nixpkgs-292a191f70fe2f557dd8035659400d55440cbef7.tar.gz
nixpkgs-292a191f70fe2f557dd8035659400d55440cbef7.tar.bz2
nixpkgs-292a191f70fe2f557dd8035659400d55440cbef7.tar.lz
nixpkgs-292a191f70fe2f557dd8035659400d55440cbef7.tar.xz
nixpkgs-292a191f70fe2f557dd8035659400d55440cbef7.tar.zst
nixpkgs-292a191f70fe2f557dd8035659400d55440cbef7.zip
GCC 4.4: Fewer $NIX_ variables.
svn path=/nixpkgs/trunk/; revision=16458
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/compilers/gcc-4.4/builder.sh5
-rw-r--r--pkgs/development/compilers/gcc-4.4/default.nix5
-rw-r--r--pkgs/development/compilers/gcc-4.4/no-sys-dirs-fortran.patch15
-rw-r--r--pkgs/development/compilers/gcc-4.4/no-sys-dirs.patch66
4 files changed, 6 insertions, 85 deletions
diff --git a/pkgs/development/compilers/gcc-4.4/builder.sh b/pkgs/development/compilers/gcc-4.4/builder.sh
index dc96adc982d..b3436e447dc 100644
--- a/pkgs/development/compilers/gcc-4.4/builder.sh
+++ b/pkgs/development/compilers/gcc-4.4/builder.sh
@@ -9,6 +9,11 @@ mkdir $NIX_FIXINC_DUMMY
 # Thing.
 export CPP="gcc -E"
 
+if test "$staticCompiler" = "1"; then
+    EXTRA_LDFLAGS="-static"
+else
+    EXTRA_LDFLAGS=""
+fi
 
 if test "$noSysDirs" = "1"; then
 
diff --git a/pkgs/development/compilers/gcc-4.4/default.nix b/pkgs/development/compilers/gcc-4.4/default.nix
index ed70195f4c1..9ce3fa599f9 100644
--- a/pkgs/development/compilers/gcc-4.4/default.nix
+++ b/pkgs/development/compilers/gcc-4.4/default.nix
@@ -57,8 +57,7 @@ stdenv.mkDerivation ({
 
   patches =
     [./pass-cxxcpp.patch]
-    ++ optional noSysDirs ./no-sys-dirs.patch
-    ++ optional (noSysDirs && langFortran) ./no-sys-dirs-fortran.patch;
+    ++ optional noSysDirs ./no-sys-dirs.patch;
 
   inherit noSysDirs profiledCompiler staticCompiler;
 
@@ -91,8 +90,6 @@ stdenv.mkDerivation ({
     ${if stdenv.isi686 then "--with-arch=i686" else ""}
   ";
 
-  NIX_EXTRA_LDFLAGS = if staticCompiler then "-static" else "";
-
   inherit gmp mpfr;
   
   passthru = { inherit langC langCC langFortran langTreelang enableMultilib; };
diff --git a/pkgs/development/compilers/gcc-4.4/no-sys-dirs-fortran.patch b/pkgs/development/compilers/gcc-4.4/no-sys-dirs-fortran.patch
deleted file mode 100644
index 4568e57819b..00000000000
--- a/pkgs/development/compilers/gcc-4.4/no-sys-dirs-fortran.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff -ru gcc-4.3.1-orig/libgfortran/configure gcc-4.3.1/libgfortran/configure
---- gcc-4.3.1-orig/libgfortran/configure	2008-06-06 16:49:11.000000000 +0200
-+++ gcc-4.3.1/libgfortran/configure	2008-06-27 08:25:08.000000000 +0200
-@@ -35405,6 +35405,11 @@
- # A language specific compiler.
- CC=$lt_compiler
- 
-+# Ugly hack to get libmudflap (and possibly other libraries) to build.
-+# Libtool filters out \`-B' flags when linking (why?), so the \`-B' flag
-+# to Glibc gets lost.  Here we forcibly add it to any invocation.
-+CC="\$CC $NIX_EXTRA_CFLAGS $NIX_EXTRA_LDFLAGS"
-+
- # Is the compiler the GNU compiler?
- with_gcc=$GCC
- 
diff --git a/pkgs/development/compilers/gcc-4.4/no-sys-dirs.patch b/pkgs/development/compilers/gcc-4.4/no-sys-dirs.patch
index 4d843891a03..7eaf421cc40 100644
--- a/pkgs/development/compilers/gcc-4.4/no-sys-dirs.patch
+++ b/pkgs/development/compilers/gcc-4.4/no-sys-dirs.patch
@@ -64,69 +64,3 @@ diff -ru gcc-4.3.1-orig/gcc/Makefile.in gcc-4.3.1/gcc/Makefile.in
    -DCROSS_INCLUDE_DIR=\"$(CROSS_SYSTEM_HEADER_DIR)\" \
    -DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \
    -DPREFIX=\"$(prefix)/\" \
-diff -ru gcc-4.3.1-orig/libgomp/configure gcc-4.3.1/libgomp/configure
---- gcc-4.3.1-orig/libgomp/configure	2008-01-24 17:23:13.000000000 +0100
-+++ gcc-4.3.1/libgomp/configure	2008-06-26 11:23:49.000000000 +0200
-@@ -21493,6 +21493,11 @@
- # A language specific compiler.
- CC=$lt_compiler
- 
-+# Ugly hack to get libmudflap (and possibly other libraries) to build.
-+# Libtool filters out \`-B' flags when linking (why?), so the \`-B' flag
-+# to Glibc gets lost.  Here we forcibly add it to any invocation.
-+CC="\$CC $NIX_EXTRA_CFLAGS $NIX_EXTRA_LDFLAGS"
-+
- # Is the compiler the GNU compiler?
- with_gcc=$GCC
- 
-Only in gcc-4.3.1/libgomp: configure~
-diff -ru gcc-4.3.1-orig/libmudflap/configure gcc-4.3.1/libmudflap/configure
---- gcc-4.3.1-orig/libmudflap/configure	2008-01-24 17:30:08.000000000 +0100
-+++ gcc-4.3.1/libmudflap/configure	2008-06-26 11:23:11.000000000 +0200
-@@ -14229,6 +14229,11 @@
- # A language specific compiler.
- CC=$lt_compiler
- 
-+# Ugly hack to get libmudflap (and possibly other libraries) to build.
-+# Libtool filters out \`-B' flags when linking (why?), so the \`-B' flag
-+# to Glibc gets lost.  Here we forcibly add it to any invocation.
-+CC="\$CC $NIX_EXTRA_CFLAGS $NIX_EXTRA_LDFLAGS"
-+
- # Is the compiler the GNU compiler?
- with_gcc=$GCC
- 
-Only in gcc-4.3.1/libmudflap: configure~
-diff -ru gcc-4.3.1-orig/libssp/configure gcc-4.3.1/libssp/configure
---- gcc-4.3.1-orig/libssp/configure	2008-01-24 17:33:29.000000000 +0100
-+++ gcc-4.3.1/libssp/configure	2008-06-26 11:23:25.000000000 +0200
-@@ -12142,6 +12142,11 @@
- # A language specific compiler.
- CC=$lt_compiler
- 
-+# Ugly hack to get libmudflap (and possibly other libraries) to build.
-+# Libtool filters out \`-B' flags when linking (why?), so the \`-B' flag
-+# to Glibc gets lost.  Here we forcibly add it to any invocation.
-+CC="\$CC $NIX_EXTRA_CFLAGS $NIX_EXTRA_LDFLAGS"
-+
- # Is the compiler the GNU compiler?
- with_gcc=$GCC
- 
-Only in gcc-4.3.1/libssp: configure~
-diff -ru gcc-4.3.1-orig/Makefile.in gcc-4.3.1/Makefile.in
---- gcc-4.3.1-orig/Makefile.in	2007-12-13 10:30:49.000000000 +0100
-+++ gcc-4.3.1/Makefile.in	2008-06-25 17:48:23.000000000 +0200
-@@ -405,6 +405,14 @@
- @host_makefile_frag@
- ###
- 
-+CFLAGS += $(NIX_EXTRA_CFLAGS)
-+CPPFLAGS_FOR_TARGET += $(NIX_EXTRA_CFLAGS)
-+CXXFLAGS += $(NIX_EXTRA_CFLAGS)
-+LDFLAGS += $(NIX_EXTRA_LDFLAGS)
-+LDFLAGS_FOR_TARGET += $(NIX_EXTRA_LDFLAGS)
-+BOOT_CFLAGS += $(NIX_EXTRA_CFLAGS)
-+BOOT_LDFLAGS += $(NIX_EXTRA_LDFLAGS)
-+
- # This is the list of directories that may be needed in RPATH_ENVVAR
- # so that prorgams built for the target machine work.
- TARGET_LIB_PATH = $(TARGET_LIB_PATH_libstdc++-v3)$(TARGET_LIB_PATH_libmudflap)$(TARGET_LIB_PATH_libssp)$(TARGET_LIB_PATH_libgomp)$(HOST_LIB_PATH_gcc)