Blame SOURCES/gcc10-hack.patch

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