Blame SOURCES/gcc10-hack.patch

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