Blame SOURCES/gcc9-hack.patch

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