Blame SOURCES/gcc10-hack.patch

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