Blame SOURCES/gcc8-hack.patch

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