Blame SOURCES/gcc8-hack.patch

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