Blame SOURCES/gcc12-hack.patch

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