Blame SOURCES/gcc12-hack.patch

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