Blame SOURCES/gcc11-hack.patch

f61693
--- libada/Makefile.in.jj	2019-01-09 13:01:18.015608205 +0100
f61693
+++ libada/Makefile.in	2019-01-11 18:16:23.441726931 +0100
f61693
@@ -71,18 +71,40 @@ version := $(shell @get_gcc_base_ver@ $(
f61693
 libsubdir := $(libdir)/gcc/$(target_noncanonical)/$(version)$(MULTISUBDIR)
f61693
 ADA_RTS_DIR=$(GCC_DIR)/ada/rts$(subst /,_,$(MULTISUBDIR))
f61693
 
f61693
+DEFAULTMULTIFLAGS :=
f61693
+ifeq ($(MULTISUBDIR),)
f61693
+targ:=$(subst -, ,$(target))
f61693
+arch:=$(word 1,$(targ))
f61693
+ifeq ($(words $(targ)),2)
f61693
+osys:=$(word 2,$(targ))
f61693
+else
f61693
+osys:=$(word 3,$(targ))
f61693
+endif
f61693
+ifeq ($(strip $(filter-out i%86 x86_64 powerpc% ppc% s390% sparc% linux%, $(arch) $(osys))),)
f61693
+ifeq ($(shell $(CC) $(CFLAGS) -print-multi-os-directory),../lib64)
f61693
+DEFAULTMULTIFLAGS := -m64
f61693
+else
f61693
+ifeq ($(strip $(filter-out s390%, $(arch))),)
f61693
+DEFAULTMULTIFLAGS := -m31
f61693
+else
f61693
+DEFAULTMULTIFLAGS := -m32
f61693
+endif
f61693
+endif
f61693
+endif
f61693
+endif
f61693
+
f61693
 # exeext should not be used because it's the *host* exeext.  We're building
f61693
 # a *target* library, aren't we?!?  Likewise for CC.  Still, provide bogus
f61693
 # definitions just in case something slips through the safety net provided
f61693
 # by recursive make invocations in gcc/ada/Makefile.in
f61693
 LIBADA_FLAGS_TO_PASS = \
f61693
         "MAKEOVERRIDES=" \
f61693
-        "LDFLAGS=$(LDFLAGS)" \
f61693
+        "LDFLAGS=$(LDFLAGS) $(DEFAULTMULTIFLAGS)" \
f61693
         "LN_S=$(LN_S)" \
f61693
         "SHELL=$(SHELL)" \
f61693
-        "GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS)" \
f61693
-        "GNATLIBCFLAGS=$(GNATLIBCFLAGS) $(MULTIFLAGS)" \
f61693
-        "GNATLIBCFLAGS_FOR_C=$(GNATLIBCFLAGS_FOR_C) $(MULTIFLAGS)" \
f61693
+        "GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS)" \
f61693
+        "GNATLIBCFLAGS=$(GNATLIBCFLAGS) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS)" \
f61693
+        "GNATLIBCFLAGS_FOR_C=$(GNATLIBCFLAGS_FOR_C) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS)" \
f61693
         "PICFLAG_FOR_TARGET=$(PICFLAG)" \
f61693
         "THREAD_KIND=$(THREAD_KIND)" \
f61693
         "TRACE=$(TRACE)" \
f61693
@@ -93,7 +115,7 @@ LIBADA_FLAGS_TO_PASS = \
f61693
         "exeext=.exeext.should.not.be.used " \
f61693
 	'CC=the.host.compiler.should.not.be.needed' \
f61693
 	"GCC_FOR_TARGET=$(CC)" \
f61693
-        "CFLAGS=$(CFLAGS)"
f61693
+        "CFLAGS=$(CFLAGS) $(DEFAULTMULTIFLAGS)"
f61693
 
f61693
 .PHONY: libada gnatlib gnatlib-shared gnatlib-sjlj gnatlib-zcx osconstool
f61693
 
f61693
--- config-ml.in.jj	2019-01-09 12:50:16.646501448 +0100
f61693
+++ config-ml.in	2019-01-11 18:16:23.442726914 +0100
f61693
@@ -511,6 +511,8 @@ multi-do:
f61693
 				ADAFLAGS="$(ADAFLAGS) $${flags}" \
f61693
 				prefix="$(prefix)" \
f61693
 				exec_prefix="$(exec_prefix)" \
f61693
+				mandir="$(mandir)" \
f61693
+				infodir="$(infodir)" \
f61693
 				GOCFLAGS="$(GOCFLAGS) $${flags}" \
f61693
 				GDCFLAGS="$(GDCFLAGS) $${flags}" \
f61693
 				CXXFLAGS="$(CXXFLAGS) $${flags}" \
f61693
--- libcpp/macro.c.jj	2019-01-09 13:01:21.420552123 +0100
f61693
+++ libcpp/macro.c	2019-01-11 18:18:17.736876285 +0100
f61693
@@ -3256,8 +3256,6 @@ static cpp_macro *
f61693
 create_iso_definition (cpp_reader *pfile)
f61693
 {
f61693
   bool following_paste_op = false;
f61693
-  const char *paste_op_error_msg =
f61693
-    N_("'##' cannot appear at either end of a macro expansion");
f61693
   unsigned int num_extra_tokens = 0;
f61693
   unsigned nparms = 0;
f61693
   cpp_hashnode **params = NULL;
f61693
@@ -3382,7 +3380,9 @@ create_iso_definition (cpp_reader *pfile
f61693
 	     function-like macros, but not at the end.  */
f61693
 	  if (following_paste_op)
f61693
 	    {
f61693
-	      cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);
f61693
+	      cpp_error (pfile, CPP_DL_ERROR,
f61693
+			 "'##' cannot appear at either end of a macro "
f61693
+			 "expansion");
f61693
 	      goto out;
f61693
 	    }
f61693
 	  if (!vaopt_tracker.completed ())
f61693
@@ -3397,7 +3397,9 @@ create_iso_definition (cpp_reader *pfile
f61693
 	     function-like macros, but not at the beginning.  */
f61693
 	  if (macro->count == 1)
f61693
 	    {
f61693
-	      cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);
f61693
+	      cpp_error (pfile, CPP_DL_ERROR,
f61693
+			 "'##' cannot appear at either end of a macro "
f61693
+			 "expansion");
f61693
 	      goto out;
f61693
 	    }
f61693
 
f61693
--- libcpp/expr.c.jj	2019-01-09 13:01:22.415535734 +0100
f61693
+++ libcpp/expr.c	2019-01-11 18:16:23.444726882 +0100
f61693
@@ -803,16 +803,17 @@ cpp_classify_number (cpp_reader *pfile,
f61693
       if ((result & CPP_N_WIDTH) == CPP_N_LARGE
f61693
 	  && CPP_OPTION (pfile, cpp_warn_long_long))
f61693
         {
f61693
-          const char *message = CPP_OPTION (pfile, cplusplus) 
f61693
-				? N_("use of C++11 long long integer constant")
f61693
-		                : N_("use of C99 long long integer constant");
f61693
-
f61693
 	  if (CPP_OPTION (pfile, c99))
f61693
             cpp_warning_with_line (pfile, CPP_W_LONG_LONG, virtual_location,
f61693
-				   0, message);
f61693
+				   0, CPP_OPTION (pfile, cplusplus)
f61693
+				      ? N_("use of C++11 long long integer constant")
f61693
+				      : N_("use of C99 long long integer constant"));
f61693
           else
f61693
             cpp_pedwarning_with_line (pfile, CPP_W_LONG_LONG,
f61693
-				      virtual_location, 0, message);
f61693
+				      virtual_location, 0,
f61693
+				      CPP_OPTION (pfile, cplusplus)
f61693
+				      ? N_("use of C++11 long long integer constant")
f61693
+				      : N_("use of C99 long long integer constant"));
f61693
         }
f61693
 
f61693
       if ((result & CPP_N_SIZE_T) == CPP_N_SIZE_T