Blame SOURCES/gcc48-hack.patch

543165
--- libada/Makefile.in.jj	2009-01-14 12:07:35.000000000 +0100
543165
+++ libada/Makefile.in	2009-01-15 14:25:33.000000000 +0100
543165
@@ -66,18 +66,40 @@ libsubdir := $(libdir)/gcc/$(target_nonc
543165
 ADA_RTS_DIR=$(GCC_DIR)/ada/rts$(subst /,_,$(MULTISUBDIR))
543165
 ADA_RTS_SUBDIR=./rts$(subst /,_,$(MULTISUBDIR))
543165
 
543165
+DEFAULTMULTIFLAGS :=
543165
+ifeq ($(MULTISUBDIR),)
543165
+targ:=$(subst -, ,$(target))
543165
+arch:=$(word 1,$(targ))
543165
+ifeq ($(words $(targ)),2)
543165
+osys:=$(word 2,$(targ))
543165
+else
543165
+osys:=$(word 3,$(targ))
543165
+endif
543165
+ifeq ($(strip $(filter-out i%86 x86_64 powerpc% ppc% s390% sparc% linux%, $(arch) $(osys))),)
543165
+ifeq ($(shell $(CC) $(CFLAGS) -print-multi-os-directory),../lib64)
543165
+DEFAULTMULTIFLAGS := -m64
543165
+else
543165
+ifeq ($(strip $(filter-out s390%, $(arch))),)
543165
+DEFAULTMULTIFLAGS := -m31
543165
+else
543165
+DEFAULTMULTIFLAGS := -m32
543165
+endif
543165
+endif
543165
+endif
543165
+endif
543165
+
543165
 # exeext should not be used because it's the *host* exeext.  We're building
543165
 # a *target* library, aren't we?!?  Likewise for CC.  Still, provide bogus
543165
 # definitions just in case something slips through the safety net provided
543165
 # by recursive make invocations in gcc/ada/Makefile.in
543165
 LIBADA_FLAGS_TO_PASS = \
543165
         "MAKEOVERRIDES=" \
543165
-        "LDFLAGS=$(LDFLAGS)" \
543165
+        "LDFLAGS=$(LDFLAGS) $(DEFAULTMULTIFLAGS)" \
543165
         "LN_S=$(LN_S)" \
543165
         "SHELL=$(SHELL)" \
543165
-        "GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS)" \
543165
-        "GNATLIBCFLAGS=$(GNATLIBCFLAGS) $(MULTIFLAGS)" \
543165
-        "GNATLIBCFLAGS_FOR_C=$(GNATLIBCFLAGS_FOR_C) $(MULTIFLAGS)" \
543165
+        "GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS)" \
543165
+        "GNATLIBCFLAGS=$(GNATLIBCFLAGS) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS)" \
543165
+        "GNATLIBCFLAGS_FOR_C=$(GNATLIBCFLAGS_FOR_C) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS)" \
543165
         "PICFLAG_FOR_TARGET=$(PICFLAG)" \
543165
         "THREAD_KIND=$(THREAD_KIND)" \
543165
         "TRACE=$(TRACE)" \
543165
@@ -88,7 +110,7 @@ LIBADA_FLAGS_TO_PASS = \
543165
         "exeext=.exeext.should.not.be.used " \
543165
 	'CC=the.host.compiler.should.not.be.needed' \
543165
 	"GCC_FOR_TARGET=$(CC)" \
543165
-        "CFLAGS=$(CFLAGS)"
543165
+        "CFLAGS=$(CFLAGS) $(DEFAULTMULTIFLAGS)"
543165
 
543165
 # Rules to build gnatlib.
543165
 .PHONY: gnatlib gnatlib-plain gnatlib-sjlj gnatlib-zcx gnatlib-shared osconstool
543165
--- gcc/ada/sem_util.adb	(revision 161677)
543165
+++ gcc/ada/sem_util.adb	(working copy)
543165
@@ -5487,7 +5487,7 @@ package body Sem_Util is
543165
             Exp           : Node_Id;
543165
             Assn          : Node_Id;
543165
             Choice        : Node_Id;
543165
-            Comp_Type     : Entity_Id;
543165
+            Comp_Type     : Entity_Id := Empty;
543165
             Is_Array_Aggr : Boolean;
543165
 
543165
          begin
543165
--- config-ml.in.jj	2010-06-30 09:50:44.000000000 +0200
543165
+++ config-ml.in	2010-07-02 21:24:17.994211151 +0200
543165
@@ -516,6 +516,8 @@ multi-do:
543165
 				ADAFLAGS="$(ADAFLAGS) $${flags}" \
543165
 				prefix="$(prefix)" \
543165
 				exec_prefix="$(exec_prefix)" \
543165
+				mandir="$(mandir)" \
543165
+				infodir="$(infodir)" \
543165
 				GCJFLAGS="$(GCJFLAGS) $${flags}" \
543165
 				GOCFLAGS="$(GOCFLAGS) $${flags}" \
543165
 				CXXFLAGS="$(CXXFLAGS) $${flags}" \
543165
--- libjava/Makefile.am.jj	2010-07-09 11:17:33.729604090 +0200
543165
+++ libjava/Makefile.am	2010-07-09 13:16:41.894375641 +0200
543165
@@ -710,7 +710,8 @@ if USE_LIBGCJ_BC
543165
 ## later.
543165
 	@echo Installing dummy lib libgcj_bc.so.1.0.0; \
543165
 	rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \
543165
-	mv $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0 $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \
543165
+	$(INSTALL) $(INSTALL_STRIP_FLAG) $(here)/.libs/libgcj_bc.so $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \
543165
+	rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0; \
543165
 	$(libgcj_bc_dummy_LINK) -xc /dev/null -Wl,-soname,libgcj_bc.so.1 \
543165
 	-o $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0 -lgcj || exit; \
543165
 	rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1; \
543165
--- libjava/Makefile.in.jj	2010-07-09 11:17:34.000000000 +0200
543165
+++ libjava/Makefile.in	2010-07-09 13:18:07.542572270 +0200
543165
@@ -12665,7 +12665,8 @@ install-exec-hook: install-binPROGRAMS i
543165
 	install-libexecsubPROGRAMS
543165
 @USE_LIBGCJ_BC_TRUE@	@echo Installing dummy lib libgcj_bc.so.1.0.0; \
543165
 @USE_LIBGCJ_BC_TRUE@	rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \
543165
-@USE_LIBGCJ_BC_TRUE@	mv $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0 $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \
543165
+@USE_LIBGCJ_BC_TRUE@	$(INSTALL) $(INSTALL_STRIP_FLAG) $(here)/.libs/libgcj_bc.so $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \
543165
+@USE_LIBGCJ_BC_TRUE@	rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0; \
543165
 @USE_LIBGCJ_BC_TRUE@	$(libgcj_bc_dummy_LINK) -xc /dev/null -Wl,-soname,libgcj_bc.so.1 \
543165
 @USE_LIBGCJ_BC_TRUE@	-o $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0 -lgcj || exit; \
543165
 @USE_LIBGCJ_BC_TRUE@	rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1; \