summary refs log tree commit diff
path: root/pkgs/development/compilers/gcc/5
diff options
context:
space:
mode:
authorDan Peebles <pumpkin@me.com>2017-03-19 16:21:18 -0400
committerDan Peebles <pumpkin@me.com>2017-03-19 16:22:12 -0400
commit6ea3eefdfc9313c850304d01a398c6199805b726 (patch)
tree7734a3e8e2c309452630f480b802aeba00c21751 /pkgs/development/compilers/gcc/5
parent82e760a3d613ec9e82ab48131f8b94b1119dc535 (diff)
downloadnixlib-6ea3eefdfc9313c850304d01a398c6199805b726.tar
nixlib-6ea3eefdfc9313c850304d01a398c6199805b726.tar.gz
nixlib-6ea3eefdfc9313c850304d01a398c6199805b726.tar.bz2
nixlib-6ea3eefdfc9313c850304d01a398c6199805b726.tar.lz
nixlib-6ea3eefdfc9313c850304d01a398c6199805b726.tar.xz
nixlib-6ea3eefdfc9313c850304d01a398c6199805b726.tar.zst
nixlib-6ea3eefdfc9313c850304d01a398c6199805b726.zip
gcc5: fix for libc++ 3.8 and above
    
This is in preparation for the big Darwin LLVM 4.0 stdenv switchover
Diffstat (limited to 'pkgs/development/compilers/gcc/5')
-rw-r--r--pkgs/development/compilers/gcc/5/default.nix5
-rw-r--r--pkgs/development/compilers/gcc/5/libcxx38-and-above.patch46
2 files changed, 50 insertions, 1 deletions
diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix
index 1721eba325bf..da4f7a606705 100644
--- a/pkgs/development/compilers/gcc/5/default.nix
+++ b/pkgs/development/compilers/gcc/5/default.nix
@@ -74,7 +74,10 @@ let version = "5.4.0";
       # The GNAT Makefiles did not pay attention to CFLAGS_FOR_TARGET for its
       # target libraries and tools.
       ++ optional langAda ../gnat-cflags.patch
-      ++ optional langFortran ../gfortran-driving.patch;
+      ++ optional langFortran ../gfortran-driving.patch
+
+      # This could be applied unconditionally but I don't want to cause a full Linux rebuild.
+      ++ optional stdenv.cc.isClang ./libcxx38-and-above.patch;
 
     javaEcj = fetchurl {
       # The `$(top_srcdir)/ecj.jar' file is automatically picked up at
diff --git a/pkgs/development/compilers/gcc/5/libcxx38-and-above.patch b/pkgs/development/compilers/gcc/5/libcxx38-and-above.patch
new file mode 100644
index 000000000000..ee48901a6d0c
--- /dev/null
+++ b/pkgs/development/compilers/gcc/5/libcxx38-and-above.patch
@@ -0,0 +1,46 @@
+This is a slightly modified version of https://svnweb.freebsd.org/ports/head/lang/gcc5/files/patch-libc%2B%2B?revision=432958&view=co&pathrev=432958,
+which doesn't apply cleanly due to them using a slightly different format of patch from us. I just replaced the .orig file references with a/b paths.
+
+--- a/gcc/auto-profile.c 2015-01-18 02:25:42 UTC
++++ b/gcc/auto-profile.c
+@@ -19,11 +19,9 @@ along with GCC; see the file COPYING3.  
+ <http://www.gnu.org/licenses/>.  */
+ 
+ #include "config.h"
+-#include "system.h"
+-
+-#include <string.h>
+ #include <map>
+ #include <set>
++#include "system.h"
+ 
+ #include "coretypes.h"
+ #include "hash-set.h"
+--- a/gcc/graphite-isl-ast-to-gimple.c 2017-01-19 21:02:12 UTC
++++ b/gcc/graphite-isl-ast-to-gimple.c
+@@ -38,6 +38,7 @@ extern "C" {
+ #endif
+ #endif
+ 
++#include <map>
+ #include "system.h"
+ #include "coretypes.h"
+ #include "hash-set.h"
+@@ -75,7 +76,6 @@ extern "C" {
+ #include "tree-scalar-evolution.h"
+ #include "gimple-ssa.h"
+ #include "tree-into-ssa.h"
+-#include <map>
+ 
+ #ifdef HAVE_isl
+ #include "graphite-poly.h"
+--- a/gcc/system.h 2015-01-05 12:33:28 UTC
++++ b/gcc/system.h
+@@ -217,6 +217,7 @@ extern int errno;
+ #ifdef __cplusplus
+ # include <algorithm>
+ # include <cstring>
++# include <new>
+ # include <utility>
+ #endif
+