Blame SOURCES/gcc12-hack.patch

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