Blame SOURCES/gcc10-hack.patch

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