Blame SOURCES/gcc7-hack.patch

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