Blame SOURCES/gcc8-hack.patch

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