From 292a191f70fe2f557dd8035659400d55440cbef7 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 24 Jul 2009 21:56:58 +0000 Subject: GCC 4.4: Fewer $NIX_ variables. svn path=/nixpkgs/trunk/; revision=16458 --- pkgs/development/compilers/gcc-4.4/builder.sh | 5 ++ pkgs/development/compilers/gcc-4.4/default.nix | 5 +- .../compilers/gcc-4.4/no-sys-dirs-fortran.patch | 15 ----- .../compilers/gcc-4.4/no-sys-dirs.patch | 66 ---------------------- 4 files changed, 6 insertions(+), 85 deletions(-) delete mode 100644 pkgs/development/compilers/gcc-4.4/no-sys-dirs-fortran.patch (limited to 'pkgs/development/compilers/gcc-4.4') diff --git a/pkgs/development/compilers/gcc-4.4/builder.sh b/pkgs/development/compilers/gcc-4.4/builder.sh index dc96adc982df..b3436e447dcd 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 ed70195f4c15..9ce3fa599f95 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 4568e57819b2..000000000000 --- 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 4d843891a03c..7eaf421cc402 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) -- cgit 1.4.1