Blame SOURCES/gcc12-hack.patch

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