Blame SOURCES/gcc10-hack.patch

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