Blame SOURCES/gcc6-hack.patch

78ce48
--- libada/Makefile.in.jj	2009-01-14 12:07:35.000000000 +0100
78ce48
+++ libada/Makefile.in	2009-01-15 14:25:33.000000000 +0100
78ce48
@@ -66,18 +66,40 @@ libsubdir := $(libdir)/gcc/$(target_nonc
78ce48
 ADA_RTS_DIR=$(GCC_DIR)/ada/rts$(subst /,_,$(MULTISUBDIR))
78ce48
 ADA_RTS_SUBDIR=./rts$(subst /,_,$(MULTISUBDIR))
78ce48
 
78ce48
+DEFAULTMULTIFLAGS :=
78ce48
+ifeq ($(MULTISUBDIR),)
78ce48
+targ:=$(subst -, ,$(target))
78ce48
+arch:=$(word 1,$(targ))
78ce48
+ifeq ($(words $(targ)),2)
78ce48
+osys:=$(word 2,$(targ))
78ce48
+else
78ce48
+osys:=$(word 3,$(targ))
78ce48
+endif
78ce48
+ifeq ($(strip $(filter-out i%86 x86_64 powerpc% ppc% s390% sparc% linux%, $(arch) $(osys))),)
78ce48
+ifeq ($(shell $(CC) $(CFLAGS) -print-multi-os-directory),../lib64)
78ce48
+DEFAULTMULTIFLAGS := -m64
78ce48
+else
78ce48
+ifeq ($(strip $(filter-out s390%, $(arch))),)
78ce48
+DEFAULTMULTIFLAGS := -m31
78ce48
+else
78ce48
+DEFAULTMULTIFLAGS := -m32
78ce48
+endif
78ce48
+endif
78ce48
+endif
78ce48
+endif
78ce48
+
78ce48
 # exeext should not be used because it's the *host* exeext.  We're building
78ce48
 # a *target* library, aren't we?!?  Likewise for CC.  Still, provide bogus
78ce48
 # definitions just in case something slips through the safety net provided
78ce48
 # by recursive make invocations in gcc/ada/Makefile.in
78ce48
 LIBADA_FLAGS_TO_PASS = \
78ce48
         "MAKEOVERRIDES=" \
78ce48
-        "LDFLAGS=$(LDFLAGS)" \
78ce48
+        "LDFLAGS=$(LDFLAGS) $(DEFAULTMULTIFLAGS)" \
78ce48
         "LN_S=$(LN_S)" \
78ce48
         "SHELL=$(SHELL)" \
78ce48
-        "GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS)" \
78ce48
-        "GNATLIBCFLAGS=$(GNATLIBCFLAGS) $(MULTIFLAGS)" \
78ce48
-        "GNATLIBCFLAGS_FOR_C=$(GNATLIBCFLAGS_FOR_C) $(MULTIFLAGS)" \
78ce48
+        "GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS)" \
78ce48
+        "GNATLIBCFLAGS=$(GNATLIBCFLAGS) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS)" \
78ce48
+        "GNATLIBCFLAGS_FOR_C=$(GNATLIBCFLAGS_FOR_C) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS)" \
78ce48
         "PICFLAG_FOR_TARGET=$(PICFLAG)" \
78ce48
         "THREAD_KIND=$(THREAD_KIND)" \
78ce48
         "TRACE=$(TRACE)" \
78ce48
@@ -88,7 +110,7 @@ LIBADA_FLAGS_TO_PASS = \
78ce48
         "exeext=.exeext.should.not.be.used " \
78ce48
 	'CC=the.host.compiler.should.not.be.needed' \
78ce48
 	"GCC_FOR_TARGET=$(CC)" \
78ce48
-        "CFLAGS=$(CFLAGS)"
78ce48
+        "CFLAGS=$(CFLAGS) $(DEFAULTMULTIFLAGS)"
78ce48
 
78ce48
 # Rules to build gnatlib.
78ce48
 .PHONY: gnatlib gnatlib-plain gnatlib-sjlj gnatlib-zcx gnatlib-shared osconstool
78ce48
--- gcc/ada/sem_util.adb	(revision 161677)
78ce48
+++ gcc/ada/sem_util.adb	(working copy)
78ce48
@@ -5487,7 +5487,7 @@ package body Sem_Util is
78ce48
             Exp           : Node_Id;
78ce48
             Assn          : Node_Id;
78ce48
             Choice        : Node_Id;
78ce48
-            Comp_Type     : Entity_Id;
78ce48
+            Comp_Type     : Entity_Id := Empty;
78ce48
             Is_Array_Aggr : Boolean;
78ce48
 
78ce48
          begin
78ce48
--- config-ml.in.jj	2010-06-30 09:50:44.000000000 +0200
78ce48
+++ config-ml.in	2010-07-02 21:24:17.994211151 +0200
78ce48
@@ -516,6 +516,8 @@ multi-do:
78ce48
 				ADAFLAGS="$(ADAFLAGS) $${flags}" \
78ce48
 				prefix="$(prefix)" \
78ce48
 				exec_prefix="$(exec_prefix)" \
78ce48
+				mandir="$(mandir)" \
78ce48
+				infodir="$(infodir)" \
78ce48
 				GCJFLAGS="$(GCJFLAGS) $${flags}" \
78ce48
 				GOCFLAGS="$(GOCFLAGS) $${flags}" \
78ce48
 				CXXFLAGS="$(CXXFLAGS) $${flags}" \
78ce48
--- libjava/Makefile.am.jj	2010-07-09 11:17:33.729604090 +0200
78ce48
+++ libjava/Makefile.am	2010-07-09 13:16:41.894375641 +0200
78ce48
@@ -710,7 +710,8 @@ if USE_LIBGCJ_BC
78ce48
 ## later.
78ce48
 	@echo Installing dummy lib libgcj_bc.so.1.0.0; \
78ce48
 	rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \
78ce48
-	mv $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0 $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \
78ce48
+	$(INSTALL) $(INSTALL_STRIP_FLAG) $(here)/.libs/libgcj_bc.so $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \
78ce48
+	rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0; \
78ce48
 	$(libgcj_bc_dummy_LINK) -xc /dev/null -Wl,-soname,libgcj_bc.so.1 \
78ce48
 	-o $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0 -lgcj || exit; \
78ce48
 	rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1; \
78ce48
--- libjava/Makefile.in.jj	2010-07-09 11:17:34.000000000 +0200
78ce48
+++ libjava/Makefile.in	2010-07-09 13:18:07.542572270 +0200
78ce48
@@ -12665,7 +12665,8 @@ install-exec-hook: install-binPROGRAMS i
78ce48
 	install-libexecsubPROGRAMS
78ce48
 @USE_LIBGCJ_BC_TRUE@	@echo Installing dummy lib libgcj_bc.so.1.0.0; \
78ce48
 @USE_LIBGCJ_BC_TRUE@	rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \
78ce48
-@USE_LIBGCJ_BC_TRUE@	mv $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0 $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \
78ce48
+@USE_LIBGCJ_BC_TRUE@	$(INSTALL) $(INSTALL_STRIP_FLAG) $(here)/.libs/libgcj_bc.so $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \
78ce48
+@USE_LIBGCJ_BC_TRUE@	rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0; \
78ce48
 @USE_LIBGCJ_BC_TRUE@	$(libgcj_bc_dummy_LINK) -xc /dev/null -Wl,-soname,libgcj_bc.so.1 \
78ce48
 @USE_LIBGCJ_BC_TRUE@	-o $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0 -lgcj || exit; \
78ce48
 @USE_LIBGCJ_BC_TRUE@	rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1; \
78ce48
--- libcpp/macro.c.jj	2015-01-14 11:01:34.000000000 +0100
78ce48
+++ libcpp/macro.c	2015-01-14 14:22:19.286949884 +0100
78ce48
@@ -2947,8 +2947,6 @@ create_iso_definition (cpp_reader *pfile
78ce48
   cpp_token *token;
78ce48
   const cpp_token *ctoken;
78ce48
   bool following_paste_op = false;
78ce48
-  const char *paste_op_error_msg =
78ce48
-    N_("'##' cannot appear at either end of a macro expansion");
78ce48
   unsigned int num_extra_tokens = 0;
78ce48
 
78ce48
   /* Get the first token of the expansion (or the '(' of a
78ce48
@@ -3059,7 +3057,8 @@ create_iso_definition (cpp_reader *pfile
78ce48
 	     function-like macros, but not at the end.  */
78ce48
 	  if (following_paste_op)
78ce48
 	    {
78ce48
-	      cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);
78ce48
+	      cpp_error (pfile, CPP_DL_ERROR,
78ce48
+			 "'##' cannot appear at either end of a macro expansion");
78ce48
 	      return false;
78ce48
 	    }
78ce48
 	  break;
78ce48
@@ -3072,7 +3071,8 @@ create_iso_definition (cpp_reader *pfile
78ce48
 	     function-like macros, but not at the beginning.  */
78ce48
 	  if (macro->count == 1)
78ce48
 	    {
78ce48
-	      cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);
78ce48
+	      cpp_error (pfile, CPP_DL_ERROR,
78ce48
+			 "'##' cannot appear at either end of a macro expansion");
78ce48
 	      return false;
78ce48
 	    }
78ce48
 
78ce48
--- libcpp/expr.c.jj	2015-01-14 11:01:34.000000000 +0100
78ce48
+++ libcpp/expr.c	2015-01-14 14:35:52.851002344 +0100
78ce48
@@ -672,16 +672,17 @@ cpp_classify_number (cpp_reader *pfile,
78ce48
       if ((result & CPP_N_WIDTH) == CPP_N_LARGE
78ce48
 	  && CPP_OPTION (pfile, cpp_warn_long_long))
78ce48
         {
78ce48
-          const char *message = CPP_OPTION (pfile, cplusplus) 
78ce48
-				? N_("use of C++11 long long integer constant")
78ce48
-		                : N_("use of C99 long long integer constant");
78ce48
-
78ce48
 	  if (CPP_OPTION (pfile, c99))
78ce48
             cpp_warning_with_line (pfile, CPP_W_LONG_LONG, virtual_location,
78ce48
-				   0, message);
78ce48
+				   0, CPP_OPTION (pfile, cplusplus)
78ce48
+				      ? N_("use of C++11 long long integer constant")
78ce48
+				      : N_("use of C99 long long integer constant"));
78ce48
           else
78ce48
             cpp_pedwarning_with_line (pfile, CPP_W_LONG_LONG,
78ce48
-				      virtual_location, 0, message);
78ce48
+				      virtual_location, 0,
78ce48
+				      CPP_OPTION (pfile, cplusplus)
78ce48
+				      ? N_("use of C++11 long long integer constant")
78ce48
+				      : N_("use of C99 long long integer constant"));
78ce48
         }
78ce48
 
78ce48
       result |= CPP_N_INTEGER;