Blame SOURCES/gcc10-hack.patch

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