diff --git a/pkgs/development/compilers/gcc/4.6/default.nix b/pkgs/development/compilers/gcc/4.6/default.nix index c94a9285b29b..ec229a46a546 100644 --- a/pkgs/development/compilers/gcc/4.6/default.nix +++ b/pkgs/development/compilers/gcc/4.6/default.nix @@ -51,7 +51,10 @@ let version = "4.6.3"; # Whether building a cross-compiler for GNU/Hurd. crossGNU = cross != null && cross.config == "i586-pc-gnu"; - patches = [ ] + patches = + [ # Fix building on Glibc 2.16. + ./siginfo_t_fix.patch + ] ++ 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 diff --git a/pkgs/development/compilers/gcc/4.6/siginfo_t_fix.patch b/pkgs/development/compilers/gcc/4.6/siginfo_t_fix.patch new file mode 100644 index 000000000000..5b5898196564 --- /dev/null +++ b/pkgs/development/compilers/gcc/4.6/siginfo_t_fix.patch @@ -0,0 +1,16 @@ +From http://pastebin.com/VkgE27Pd + +--- a/gcc/config/i386/linux-unwind.h 2011-01-03 20:52:22.000000000 +0000 ++++ b/gcc/config/i386/linux-unwind.h 2012-07-06 12:23:51.562859470 +0100 +@@ -133,9 +133,9 @@ + { + struct rt_sigframe { + int sig; +- struct siginfo *pinfo; ++ siginfo_t *pinfo; + void *puc; +- struct siginfo info; ++ siginfo_t info; + struct ucontext uc; + } *rt_ = context->cfa; + /* The void * cast is necessary to avoid an aliasing warning. \ No newline at end of file