Blame SOURCES/gcc12-hack.patch

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