Blame SOURCES/gcc8-hack.patch

fa2d27
--- libada/Makefile.in.jj	2009-01-14 12:07:35.000000000 +0100
fa2d27
+++ libada/Makefile.in	2009-01-15 14:25:33.000000000 +0100
fa2d27
@@ -66,18 +66,40 @@ libsubdir := $(libdir)/gcc/$(target_nonc
fa2d27
 ADA_RTS_DIR=$(GCC_DIR)/ada/rts$(subst /,_,$(MULTISUBDIR))
fa2d27
 ADA_RTS_SUBDIR=./rts$(subst /,_,$(MULTISUBDIR))
fa2d27
 
fa2d27
+DEFAULTMULTIFLAGS :=
fa2d27
+ifeq ($(MULTISUBDIR),)
fa2d27
+targ:=$(subst -, ,$(target))
fa2d27
+arch:=$(word 1,$(targ))
fa2d27
+ifeq ($(words $(targ)),2)
fa2d27
+osys:=$(word 2,$(targ))
fa2d27
+else
fa2d27
+osys:=$(word 3,$(targ))
fa2d27
+endif
fa2d27
+ifeq ($(strip $(filter-out i%86 x86_64 powerpc% ppc% s390% sparc% linux%, $(arch) $(osys))),)
fa2d27
+ifeq ($(shell $(CC) $(CFLAGS) -print-multi-os-directory),../lib64)
fa2d27
+DEFAULTMULTIFLAGS := -m64
fa2d27
+else
fa2d27
+ifeq ($(strip $(filter-out s390%, $(arch))),)
fa2d27
+DEFAULTMULTIFLAGS := -m31
fa2d27
+else
fa2d27
+DEFAULTMULTIFLAGS := -m32
fa2d27
+endif
fa2d27
+endif
fa2d27
+endif
fa2d27
+endif
fa2d27
+
fa2d27
 # exeext should not be used because it's the *host* exeext.  We're building
fa2d27
 # a *target* library, aren't we?!?  Likewise for CC.  Still, provide bogus
fa2d27
 # definitions just in case something slips through the safety net provided
fa2d27
 # by recursive make invocations in gcc/ada/Makefile.in
fa2d27
 LIBADA_FLAGS_TO_PASS = \
fa2d27
         "MAKEOVERRIDES=" \
fa2d27
-        "LDFLAGS=$(LDFLAGS)" \
fa2d27
+        "LDFLAGS=$(LDFLAGS) $(DEFAULTMULTIFLAGS)" \
fa2d27
         "LN_S=$(LN_S)" \
fa2d27
         "SHELL=$(SHELL)" \
fa2d27
-        "GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS)" \
fa2d27
-        "GNATLIBCFLAGS=$(GNATLIBCFLAGS) $(MULTIFLAGS)" \
fa2d27
-        "GNATLIBCFLAGS_FOR_C=$(GNATLIBCFLAGS_FOR_C) $(MULTIFLAGS)" \
fa2d27
+        "GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS)" \
fa2d27
+        "GNATLIBCFLAGS=$(GNATLIBCFLAGS) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS)" \
fa2d27
+        "GNATLIBCFLAGS_FOR_C=$(GNATLIBCFLAGS_FOR_C) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS)" \
fa2d27
         "PICFLAG_FOR_TARGET=$(PICFLAG)" \
fa2d27
         "THREAD_KIND=$(THREAD_KIND)" \
fa2d27
         "TRACE=$(TRACE)" \
fa2d27
@@ -88,7 +110,7 @@ LIBADA_FLAGS_TO_PASS = \
fa2d27
         "exeext=.exeext.should.not.be.used " \
fa2d27
 	'CC=the.host.compiler.should.not.be.needed' \
fa2d27
 	"GCC_FOR_TARGET=$(CC)" \
fa2d27
-        "CFLAGS=$(CFLAGS)"
fa2d27
+        "CFLAGS=$(CFLAGS) $(DEFAULTMULTIFLAGS)"
fa2d27
 
fa2d27
 # Rules to build gnatlib.
fa2d27
 .PHONY: gnatlib gnatlib-plain gnatlib-sjlj gnatlib-zcx gnatlib-shared osconstool
fa2d27
--- config-ml.in.jj	2010-06-30 09:50:44.000000000 +0200
fa2d27
+++ config-ml.in	2010-07-02 21:24:17.994211151 +0200
fa2d27
@@ -511,6 +511,8 @@ multi-do:
fa2d27
 				ADAFLAGS="$(ADAFLAGS) $${flags}" \
fa2d27
 				prefix="$(prefix)" \
fa2d27
 				exec_prefix="$(exec_prefix)" \
fa2d27
+				mandir="$(mandir)" \
fa2d27
+				infodir="$(infodir)" \
fa2d27
 				GOCFLAGS="$(GOCFLAGS) $${flags}" \
fa2d27
 				CXXFLAGS="$(CXXFLAGS) $${flags}" \
fa2d27
 				LIBCFLAGS="$(LIBCFLAGS) $${flags}" \
fa2d27
--- libcpp/macro.c.jj	2015-01-14 11:01:34.000000000 +0100
fa2d27
+++ libcpp/macro.c	2015-01-14 14:22:19.286949884 +0100
fa2d27
@@ -2947,8 +2947,6 @@ create_iso_definition (cpp_reader *pfile
fa2d27
   cpp_token *token;
fa2d27
   const cpp_token *ctoken;
fa2d27
   bool following_paste_op = false;
fa2d27
-  const char *paste_op_error_msg =
fa2d27
-    N_("'##' cannot appear at either end of a macro expansion");
fa2d27
   unsigned int num_extra_tokens = 0;
fa2d27
 
fa2d27
   /* Get the first token of the expansion (or the '(' of a
fa2d27
@@ -3059,7 +3057,8 @@ create_iso_definition (cpp_reader *pfile
fa2d27
 	     function-like macros, but not at the end.  */
fa2d27
 	  if (following_paste_op)
fa2d27
 	    {
fa2d27
-	      cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);
fa2d27
+	      cpp_error (pfile, CPP_DL_ERROR,
fa2d27
+			 "'##' cannot appear at either end of a macro expansion");
fa2d27
 	      return false;
fa2d27
 	    }
fa2d27
 	  break;
fa2d27
@@ -3072,7 +3071,8 @@ create_iso_definition (cpp_reader *pfile
fa2d27
 	     function-like macros, but not at the beginning.  */
fa2d27
 	  if (macro->count == 1)
fa2d27
 	    {
fa2d27
-	      cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);
fa2d27
+	      cpp_error (pfile, CPP_DL_ERROR,
fa2d27
+			 "'##' cannot appear at either end of a macro expansion");
fa2d27
 	      return false;
fa2d27
 	    }
fa2d27
 
fa2d27
--- libcpp/expr.c.jj	2015-01-14 11:01:34.000000000 +0100
fa2d27
+++ libcpp/expr.c	2015-01-14 14:35:52.851002344 +0100
fa2d27
@@ -672,16 +672,17 @@ cpp_classify_number (cpp_reader *pfile,
fa2d27
       if ((result & CPP_N_WIDTH) == CPP_N_LARGE
fa2d27
 	  && CPP_OPTION (pfile, cpp_warn_long_long))
fa2d27
         {
fa2d27
-          const char *message = CPP_OPTION (pfile, cplusplus) 
fa2d27
-				? N_("use of C++11 long long integer constant")
fa2d27
-		                : N_("use of C99 long long integer constant");
fa2d27
-
fa2d27
 	  if (CPP_OPTION (pfile, c99))
fa2d27
             cpp_warning_with_line (pfile, CPP_W_LONG_LONG, virtual_location,
fa2d27
-				   0, message);
fa2d27
+				   0, CPP_OPTION (pfile, cplusplus)
fa2d27
+				      ? N_("use of C++11 long long integer constant")
fa2d27
+				      : N_("use of C99 long long integer constant"));
fa2d27
           else
fa2d27
             cpp_pedwarning_with_line (pfile, CPP_W_LONG_LONG,
fa2d27
-				      virtual_location, 0, message);
fa2d27
+				      virtual_location, 0,
fa2d27
+				      CPP_OPTION (pfile, cplusplus)
fa2d27
+				      ? N_("use of C++11 long long integer constant")
fa2d27
+				      : N_("use of C99 long long integer constant"));
fa2d27
         }
fa2d27
 
fa2d27
       result |= CPP_N_INTEGER;