about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorRicardo M. Correia <rcorreia@wizy.org>2014-01-14 00:43:06 +0100
committerRicardo M. Correia <rcorreia@wizy.org>2014-01-14 01:33:34 +0100
commitbf3476c7d2b80938218741f9fe907a2fc22e8cb3 (patch)
tree4e9d2719934f5fc5d8a4c8b3fba5c8ddf0cbb316 /pkgs
parentf1766c252f7572fce9f4f6150dafda4dba211387 (diff)
downloadnixlib-bf3476c7d2b80938218741f9fe907a2fc22e8cb3.tar
nixlib-bf3476c7d2b80938218741f9fe907a2fc22e8cb3.tar.gz
nixlib-bf3476c7d2b80938218741f9fe907a2fc22e8cb3.tar.bz2
nixlib-bf3476c7d2b80938218741f9fe907a2fc22e8cb3.tar.lz
nixlib-bf3476c7d2b80938218741f9fe907a2fc22e8cb3.tar.xz
nixlib-bf3476c7d2b80938218741f9fe907a2fc22e8cb3.tar.zst
nixlib-bf3476c7d2b80938218741f9fe907a2fc22e8cb3.zip
gcc: Fix build error on gcc 4.7
Specifically, we are trying to fix the following error seen on Hydra:

../../gcc-4.7.3/gcc/gengtype-lex.c:1:21: fatal error: bconfig.h: No such file or directory

The patch is taken from gcc's SVN revision 193691.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/compilers/gcc/4.7/build-race.patch11
-rw-r--r--pkgs/development/compilers/gcc/4.7/default.nix5
2 files changed, 14 insertions, 2 deletions
diff --git a/pkgs/development/compilers/gcc/4.7/build-race.patch b/pkgs/development/compilers/gcc/4.7/build-race.patch
new file mode 100644
index 000000000000..4d7607076d66
--- /dev/null
+++ b/pkgs/development/compilers/gcc/4.7/build-race.patch
@@ -0,0 +1,11 @@
+--- gcc-4.7.3/gcc/Makefile.in	2013-04-01 10:11:11.000000000 +0200
++++ gcc-4.7.3/gcc/Makefile.in.new	2014-01-14 00:55:31.056406483 +0100
+@@ -3904,7 +3904,7 @@
+   $(SYSTEM_H) coretypes.h $(GTM_H) errors.h $(READ_MD_H) gensupport.h
+ build/gengenrtl.o : gengenrtl.c $(BCONFIG_H) $(SYSTEM_H) rtl.def
+ gengtype-lex.o build/gengtype-lex.o : gengtype-lex.c gengtype.h $(SYSTEM_H)
+-gengtype-lex.o: $(CONFIG_H)
++gengtype-lex.o: $(CONFIG_H) $(BCONFIG_H)
+ build/gengtype-lex.o: $(BCONFIG_H)
+ gengtype-parse.o build/gengtype-parse.o : gengtype-parse.c gengtype.h \
+   $(SYSTEM_H)
diff --git a/pkgs/development/compilers/gcc/4.7/default.nix b/pkgs/development/compilers/gcc/4.7/default.nix
index 4f260d75afcc..da2d8c33161f 100644
--- a/pkgs/development/compilers/gcc/4.7/default.nix
+++ b/pkgs/development/compilers/gcc/4.7/default.nix
@@ -54,8 +54,9 @@ let version = "4.7.3";
     # Whether building a cross-compiler for GNU/Hurd.
     crossGNU = cross != null && cross.config == "i586-pc-gnu";
 
-    patches = []
-      ++ optional stdenv.isArm [ ./arm-eabi.patch ]
+    patches = [
+      ./build-race.patch
+    ] ++ optional stdenv.isArm [ ./arm-eabi.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