Blame SOURCES/gcc11-hack.patch

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