Blame SOURCES/gcc7-hack.patch

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