Blame SOURCES/gcc9-hack.patch

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