Blame SOURCES/gcc5-hack.patch

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