about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2010-04-07 15:53:34 +0000
committerLudovic Courtès <ludo@gnu.org>2010-04-07 15:53:34 +0000
commit7f6b1e9abd5dd14c4cb304b06f55c72bc87a6b19 (patch)
treee4c1b0434ce4fad713d3767e9799b4ae14f77b3a /pkgs/development
parent7b9ccbd457404ee346fe335c50f82b0a47b3a4ad (diff)
downloadnixlib-7f6b1e9abd5dd14c4cb304b06f55c72bc87a6b19.tar
nixlib-7f6b1e9abd5dd14c4cb304b06f55c72bc87a6b19.tar.gz
nixlib-7f6b1e9abd5dd14c4cb304b06f55c72bc87a6b19.tar.bz2
nixlib-7f6b1e9abd5dd14c4cb304b06f55c72bc87a6b19.tar.lz
nixlib-7f6b1e9abd5dd14c4cb304b06f55c72bc87a6b19.tar.xz
nixlib-7f6b1e9abd5dd14c4cb304b06f55c72bc87a6b19.tar.zst
nixlib-7f6b1e9abd5dd14c4cb304b06f55c72bc87a6b19.zip
GCC 4.4: Fix shared library support of sparc64-linux-gnu cross-compiler.
svn path=/nixpkgs/trunk/; revision=20975
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/compilers/gcc-4.4/default.nix3
-rw-r--r--pkgs/development/compilers/gcc-4.4/pr41818.patch26
2 files changed, 28 insertions, 1 deletions
diff --git a/pkgs/development/compilers/gcc-4.4/default.nix b/pkgs/development/compilers/gcc-4.4/default.nix
index 9ec2c4859921..b1b7aaa33601 100644
--- a/pkgs/development/compilers/gcc-4.4/default.nix
+++ b/pkgs/development/compilers/gcc-4.4/default.nix
@@ -120,7 +120,8 @@ stdenv.mkDerivation ({
     # The GNAT Makefiles did not pay attention to CFLAGS_FOR_TARGET for its
     # target libraries and tools.
     ++ optional langAda ./gnat-cflags.patch
-    ++ optional langVhdl ./ghdl-ortho-cflags.patch;
+    ++ optional langVhdl ./ghdl-ortho-cflags.patch
+    ++ optional (cross != null && cross.arch == "sparc64") ./pr41818.patch;
 
   inherit noSysDirs profiledCompiler staticCompiler langJava crossStageStatic
     libcCross;
diff --git a/pkgs/development/compilers/gcc-4.4/pr41818.patch b/pkgs/development/compilers/gcc-4.4/pr41818.patch
new file mode 100644
index 000000000000..98731c460679
--- /dev/null
+++ b/pkgs/development/compilers/gcc-4.4/pr41818.patch
@@ -0,0 +1,26 @@
+From <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41818>.  This fixes compilation
+of the sparc64-linux-gnu cross-compiler with shared libraries.
+
+--- trunk/Makefile.in	2010/01/07 19:21:46	155705
++++ trunk/Makefile.in	2010/01/07 19:53:50	155706
+@@ -259,7 +259,7 @@
+ # directories built for the target.
+ TARGET_CONFIGARGS = @target_configargs@ --with-target-subdir="$(TARGET_SUBDIR)"
+ # This is the list of variables to export in the environment when
+-# configuring subdirectories for the host system.
++# configuring subdirectories for the target system.
+ BASE_TARGET_EXPORTS = \
+ 	$(BASE_EXPORTS) \
+ 	AR="$(AR_FOR_TARGET)"; export AR; \
+@@ -281,7 +281,10 @@
+ 	STRIP="$(STRIP_FOR_TARGET)"; export STRIP; \
+ 	WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
+ 	WINDMC="$(WINDMC_FOR_TARGET)"; export WINDMC; \
+-	$(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
++@if gcc-bootstrap
++	$(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \
++@endif gcc-bootstrap
++	$(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
+ 
+ RAW_CXX_TARGET_EXPORTS = \
+ 	$(BASE_TARGET_EXPORTS) \