Blame SOURCES/gcc12-hack.patch

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