Blame SOURCES/gcc11-hack.patch

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