Blame SOURCES/gcc6-hack.patch

52122c
--- libada/Makefile.in.jj	2009-01-14 12:07:35.000000000 +0100
52122c
+++ libada/Makefile.in	2009-01-15 14:25:33.000000000 +0100
52122c
@@ -66,18 +66,40 @@ libsubdir := $(libdir)/gcc/$(target_nonc
52122c
 ADA_RTS_DIR=$(GCC_DIR)/ada/rts$(subst /,_,$(MULTISUBDIR))
52122c
 ADA_RTS_SUBDIR=./rts$(subst /,_,$(MULTISUBDIR))
52122c
 
52122c
+DEFAULTMULTIFLAGS :=
52122c
+ifeq ($(MULTISUBDIR),)
52122c
+targ:=$(subst -, ,$(target))
52122c
+arch:=$(word 1,$(targ))
52122c
+ifeq ($(words $(targ)),2)
52122c
+osys:=$(word 2,$(targ))
52122c
+else
52122c
+osys:=$(word 3,$(targ))
52122c
+endif
52122c
+ifeq ($(strip $(filter-out i%86 x86_64 powerpc% ppc% s390% sparc% linux%, $(arch) $(osys))),)
52122c
+ifeq ($(shell $(CC) $(CFLAGS) -print-multi-os-directory),../lib64)
52122c
+DEFAULTMULTIFLAGS := -m64
52122c
+else
52122c
+ifeq ($(strip $(filter-out s390%, $(arch))),)
52122c
+DEFAULTMULTIFLAGS := -m31
52122c
+else
52122c
+DEFAULTMULTIFLAGS := -m32
52122c
+endif
52122c
+endif
52122c
+endif
52122c
+endif
52122c
+
52122c
 # exeext should not be used because it's the *host* exeext.  We're building
52122c
 # a *target* library, aren't we?!?  Likewise for CC.  Still, provide bogus
52122c
 # definitions just in case something slips through the safety net provided
52122c
 # by recursive make invocations in gcc/ada/Makefile.in
52122c
 LIBADA_FLAGS_TO_PASS = \
52122c
         "MAKEOVERRIDES=" \
52122c
-        "LDFLAGS=$(LDFLAGS)" \
52122c
+        "LDFLAGS=$(LDFLAGS) $(DEFAULTMULTIFLAGS)" \
52122c
         "LN_S=$(LN_S)" \
52122c
         "SHELL=$(SHELL)" \
52122c
-        "GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS)" \
52122c
-        "GNATLIBCFLAGS=$(GNATLIBCFLAGS) $(MULTIFLAGS)" \
52122c
-        "GNATLIBCFLAGS_FOR_C=$(GNATLIBCFLAGS_FOR_C) $(MULTIFLAGS)" \
52122c
+        "GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS)" \
52122c
+        "GNATLIBCFLAGS=$(GNATLIBCFLAGS) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS)" \
52122c
+        "GNATLIBCFLAGS_FOR_C=$(GNATLIBCFLAGS_FOR_C) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS)" \
52122c
         "PICFLAG_FOR_TARGET=$(PICFLAG)" \
52122c
         "THREAD_KIND=$(THREAD_KIND)" \
52122c
         "TRACE=$(TRACE)" \
52122c
@@ -88,7 +110,7 @@ LIBADA_FLAGS_TO_PASS = \
52122c
         "exeext=.exeext.should.not.be.used " \
52122c
 	'CC=the.host.compiler.should.not.be.needed' \
52122c
 	"GCC_FOR_TARGET=$(CC)" \
52122c
-        "CFLAGS=$(CFLAGS)"
52122c
+        "CFLAGS=$(CFLAGS) $(DEFAULTMULTIFLAGS)"
52122c
 
52122c
 # Rules to build gnatlib.
52122c
 .PHONY: gnatlib gnatlib-plain gnatlib-sjlj gnatlib-zcx gnatlib-shared osconstool
52122c
--- gcc/ada/sem_util.adb	(revision 161677)
52122c
+++ gcc/ada/sem_util.adb	(working copy)
52122c
@@ -5487,7 +5487,7 @@ package body Sem_Util is
52122c
             Exp           : Node_Id;
52122c
             Assn          : Node_Id;
52122c
             Choice        : Node_Id;
52122c
-            Comp_Type     : Entity_Id;
52122c
+            Comp_Type     : Entity_Id := Empty;
52122c
             Is_Array_Aggr : Boolean;
52122c
 
52122c
          begin
52122c
--- config-ml.in.jj	2010-06-30 09:50:44.000000000 +0200
52122c
+++ config-ml.in	2010-07-02 21:24:17.994211151 +0200
52122c
@@ -516,6 +516,8 @@ multi-do:
52122c
 				ADAFLAGS="$(ADAFLAGS) $${flags}" \
52122c
 				prefix="$(prefix)" \
52122c
 				exec_prefix="$(exec_prefix)" \
52122c
+				mandir="$(mandir)" \
52122c
+				infodir="$(infodir)" \
52122c
 				GCJFLAGS="$(GCJFLAGS) $${flags}" \
52122c
 				GOCFLAGS="$(GOCFLAGS) $${flags}" \
52122c
 				CXXFLAGS="$(CXXFLAGS) $${flags}" \
52122c
--- libjava/Makefile.am.jj	2010-07-09 11:17:33.729604090 +0200
52122c
+++ libjava/Makefile.am	2010-07-09 13:16:41.894375641 +0200
52122c
@@ -710,7 +710,8 @@ if USE_LIBGCJ_BC
52122c
 ## later.
52122c
 	@echo Installing dummy lib libgcj_bc.so.1.0.0; \
52122c
 	rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \
52122c
-	mv $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0 $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \
52122c
+	$(INSTALL) $(INSTALL_STRIP_FLAG) $(here)/.libs/libgcj_bc.so $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \
52122c
+	rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0; \
52122c
 	$(libgcj_bc_dummy_LINK) -xc /dev/null -Wl,-soname,libgcj_bc.so.1 \
52122c
 	-o $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0 -lgcj || exit; \
52122c
 	rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1; \
52122c
--- libjava/Makefile.in.jj	2010-07-09 11:17:34.000000000 +0200
52122c
+++ libjava/Makefile.in	2010-07-09 13:18:07.542572270 +0200
52122c
@@ -12665,7 +12665,8 @@ install-exec-hook: install-binPROGRAMS i
52122c
 	install-libexecsubPROGRAMS
52122c
 @USE_LIBGCJ_BC_TRUE@	@echo Installing dummy lib libgcj_bc.so.1.0.0; \
52122c
 @USE_LIBGCJ_BC_TRUE@	rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \
52122c
-@USE_LIBGCJ_BC_TRUE@	mv $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0 $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \
52122c
+@USE_LIBGCJ_BC_TRUE@	$(INSTALL) $(INSTALL_STRIP_FLAG) $(here)/.libs/libgcj_bc.so $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \
52122c
+@USE_LIBGCJ_BC_TRUE@	rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0; \
52122c
 @USE_LIBGCJ_BC_TRUE@	$(libgcj_bc_dummy_LINK) -xc /dev/null -Wl,-soname,libgcj_bc.so.1 \
52122c
 @USE_LIBGCJ_BC_TRUE@	-o $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0 -lgcj || exit; \
52122c
 @USE_LIBGCJ_BC_TRUE@	rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1; \
52122c
--- libcpp/macro.c.jj	2015-01-14 11:01:34.000000000 +0100
52122c
+++ libcpp/macro.c	2015-01-14 14:22:19.286949884 +0100
52122c
@@ -2947,8 +2947,6 @@ create_iso_definition (cpp_reader *pfile
52122c
   cpp_token *token;
52122c
   const cpp_token *ctoken;
52122c
   bool following_paste_op = false;
52122c
-  const char *paste_op_error_msg =
52122c
-    N_("'##' cannot appear at either end of a macro expansion");
52122c
   unsigned int num_extra_tokens = 0;
52122c
 
52122c
   /* Get the first token of the expansion (or the '(' of a
52122c
@@ -3059,7 +3057,8 @@ create_iso_definition (cpp_reader *pfile
52122c
 	     function-like macros, but not at the end.  */
52122c
 	  if (following_paste_op)
52122c
 	    {
52122c
-	      cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);
52122c
+	      cpp_error (pfile, CPP_DL_ERROR,
52122c
+			 "'##' cannot appear at either end of a macro expansion");
52122c
 	      return false;
52122c
 	    }
52122c
 	  break;
52122c
@@ -3072,7 +3071,8 @@ create_iso_definition (cpp_reader *pfile
52122c
 	     function-like macros, but not at the beginning.  */
52122c
 	  if (macro->count == 1)
52122c
 	    {
52122c
-	      cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);
52122c
+	      cpp_error (pfile, CPP_DL_ERROR,
52122c
+			 "'##' cannot appear at either end of a macro expansion");
52122c
 	      return false;
52122c
 	    }
52122c
 
52122c
--- libcpp/expr.c.jj	2015-01-14 11:01:34.000000000 +0100
52122c
+++ libcpp/expr.c	2015-01-14 14:35:52.851002344 +0100
52122c
@@ -672,16 +672,17 @@ cpp_classify_number (cpp_reader *pfile,
52122c
       if ((result & CPP_N_WIDTH) == CPP_N_LARGE
52122c
 	  && CPP_OPTION (pfile, cpp_warn_long_long))
52122c
         {
52122c
-          const char *message = CPP_OPTION (pfile, cplusplus) 
52122c
-				? N_("use of C++11 long long integer constant")
52122c
-		                : N_("use of C99 long long integer constant");
52122c
-
52122c
 	  if (CPP_OPTION (pfile, c99))
52122c
             cpp_warning_with_line (pfile, CPP_W_LONG_LONG, virtual_location,
52122c
-				   0, message);
52122c
+				   0, CPP_OPTION (pfile, cplusplus)
52122c
+				      ? N_("use of C++11 long long integer constant")
52122c
+				      : N_("use of C99 long long integer constant"));
52122c
           else
52122c
             cpp_pedwarning_with_line (pfile, CPP_W_LONG_LONG,
52122c
-				      virtual_location, 0, message);
52122c
+				      virtual_location, 0,
52122c
+				      CPP_OPTION (pfile, cplusplus)
52122c
+				      ? N_("use of C++11 long long integer constant")
52122c
+				      : N_("use of C99 long long integer constant"));
52122c
         }
52122c
 
52122c
       result |= CPP_N_INTEGER;