Blame SOURCES/gcc7-hack.patch

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