Blame SOURCES/gcc7-hack.patch

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