Blame SOURCES/gcc48-hack.patch

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