Blame SOURCES/gcc9-hack.patch

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