Blame SOURCES/gcc11-hack.patch

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