Author: ludo
Date: Tue Mar  6 21:33:20 2012
New Revision: 32837
URL: https://nixos.org/websvn/nix/?rev=32837&sc=1

Log:
GCC 4.6: Add patch to fix GNU/Hurd builds.

Added:
   nixpkgs/trunk/pkgs/development/compilers/gcc/4.6/hurd-sigrtmin.patch
Modified:
   nixpkgs/trunk/pkgs/development/compilers/gcc/4.6/default.nix

Modified: nixpkgs/trunk/pkgs/development/compilers/gcc/4.6/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/development/compilers/gcc/4.6/default.nix        Tue Mar 
 6 21:33:14 2012        (r32836)
+++ nixpkgs/trunk/pkgs/development/compilers/gcc/4.6/default.nix        Tue Mar 
 6 21:33:20 2012        (r32837)
@@ -43,6 +43,16 @@
 with builtins;
 
 let version = "4.6.3";
+
+    patches = [ ]
+      ++ optional (cross != null) ./libstdc++-target.patch
+      ++ optional noSysDirs ./no-sys-dirs.patch
+      # 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 stdenv.isGNU ./hurd-sigrtmin.patch;
+
     javaEcj = fetchurl {
       # The `$(top_srcdir)/ecj.jar' file is automatically picked up at
       # `configure' time.
@@ -137,15 +147,7 @@
     inherit langC langCC langFortran langJava langAda langGo;
   };
 
-  patches =
-    [ ]
-    ++ optional (cross != null) ./libstdc++-target.patch
-    ++ optional noSysDirs ./no-sys-dirs.patch
-    # 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
-    ;
+  inherit patches;
 
   postPatch =
     if (stdenv.system == "i586-pc-gnu"
@@ -278,6 +280,7 @@
     else "install";
 
   crossAttrs = {
+    patches = patches ++ [ ./hurd-sigrtmin.patch ];
     AR = "${stdenv.cross.config}-ar";
     LD = "${stdenv.cross.config}-ld";
     CC = "${stdenv.cross.config}-gcc";

Added: nixpkgs/trunk/pkgs/development/compilers/gcc/4.6/hurd-sigrtmin.patch
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ nixpkgs/trunk/pkgs/development/compilers/gcc/4.6/hurd-sigrtmin.patch        
Tue Mar  6 21:33:20 2012        (r32837)
@@ -0,0 +1,14 @@
+GNU libc on GNU/Hurd doesn't define `__SIGRTMIN'.
+From 
<http://patch-tracker.debian.org/patch/series/view/gcc-4.6/4.6.3-1/hurd-fixes.diff>.
+
+--- a/libgcc/generic-morestack.c       2011-12-19 21:14:52.000000000 +0100
++++ b/libgcc/generic-morestack.c       2011-12-19 21:15:35.000000000 +0100
+@@ -507,7 +507,7 @@
+   sigemptyset (&__morestack_initial_sp.mask);
+ 
+   sigfillset (&__morestack_fullmask);
+-#ifdef __GLIBC__
++#if defined(__GLIBC__) && defined(__SIGRTMIN)
+   /* In glibc, the first two real time signals are used by the NPTL
+      threading library.  By taking them out of the set of signals, we
+      avoiding copying the signal mask in pthread_sigmask.  More
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits

Reply via email to