Blame SOURCES/gcc11-hack.patch

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