Blame SOURCES/gcc11-hack.patch

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