Blame SOURCES/gcc11-hack.patch

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