Blame SOURCES/gcc8-hack.patch

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