Blame SOURCES/gcc8-hack.patch

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