3694bef
--- libada/Makefile.in.jj	2019-01-09 13:01:18.015608205 +0100
3694bef
+++ libada/Makefile.in	2019-01-11 18:16:23.441726931 +0100
3694bef
@@ -71,18 +71,40 @@ version := $(shell @get_gcc_base_ver@ $(
3694bef
 libsubdir := $(libdir)/gcc/$(target_noncanonical)/$(version)$(MULTISUBDIR)
293a503
 ADA_RTS_DIR=$(GCC_DIR)/ada/rts$(subst /,_,$(MULTISUBDIR))
7c07471
 
7c07471
+DEFAULTMULTIFLAGS :=
7c07471
+ifeq ($(MULTISUBDIR),)
7c07471
+targ:=$(subst -, ,$(target))
7c07471
+arch:=$(word 1,$(targ))
7c07471
+ifeq ($(words $(targ)),2)
7c07471
+osys:=$(word 2,$(targ))
7c07471
+else
7c07471
+osys:=$(word 3,$(targ))
7c07471
+endif
7c07471
+ifeq ($(strip $(filter-out i%86 x86_64 powerpc% ppc% s390% sparc% linux%, $(arch) $(osys))),)
7c07471
+ifeq ($(shell $(CC) $(CFLAGS) -print-multi-os-directory),../lib64)
7c07471
+DEFAULTMULTIFLAGS := -m64
7c07471
+else
7c07471
+ifeq ($(strip $(filter-out s390%, $(arch))),)
7c07471
+DEFAULTMULTIFLAGS := -m31
7c07471
+else
7c07471
+DEFAULTMULTIFLAGS := -m32
7c07471
+endif
7c07471
+endif
7c07471
+endif
7c07471
+endif
7c07471
+
7c07471
 # exeext should not be used because it's the *host* exeext.  We're building
7c07471
 # a *target* library, aren't we?!?  Likewise for CC.  Still, provide bogus
7c07471
 # definitions just in case something slips through the safety net provided
7c07471
 # by recursive make invocations in gcc/ada/Makefile.in
7c07471
 LIBADA_FLAGS_TO_PASS = \
7c07471
         "MAKEOVERRIDES=" \
7c07471
-        "LDFLAGS=$(LDFLAGS)" \
5c29a25
+        "LDFLAGS=$(LDFLAGS) $(DEFAULTMULTIFLAGS)" \
7c07471
         "LN_S=$(LN_S)" \
7c07471
         "SHELL=$(SHELL)" \
7c07471
-        "GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS)" \
7c07471
-        "GNATLIBCFLAGS=$(GNATLIBCFLAGS) $(MULTIFLAGS)" \
462317c
-        "GNATLIBCFLAGS_FOR_C=$(GNATLIBCFLAGS_FOR_C) $(MULTIFLAGS)" \
5c29a25
+        "GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS)" \
5c29a25
+        "GNATLIBCFLAGS=$(GNATLIBCFLAGS) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS)" \
5c29a25
+        "GNATLIBCFLAGS_FOR_C=$(GNATLIBCFLAGS_FOR_C) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS)" \
5c29a25
         "PICFLAG_FOR_TARGET=$(PICFLAG)" \
7c07471
         "THREAD_KIND=$(THREAD_KIND)" \
7c07471
         "TRACE=$(TRACE)" \
3694bef
@@ -93,7 +115,7 @@ LIBADA_FLAGS_TO_PASS = \
7c07471
         "exeext=.exeext.should.not.be.used " \
7c07471
 	'CC=the.host.compiler.should.not.be.needed' \
7c07471
 	"GCC_FOR_TARGET=$(CC)" \
5c29a25
-        "CFLAGS=$(CFLAGS)"
5c29a25
+        "CFLAGS=$(CFLAGS) $(DEFAULTMULTIFLAGS)"
7c07471
 
3694bef
 .PHONY: libada gnatlib gnatlib-shared gnatlib-sjlj gnatlib-zcx osconstool
3694bef
 
3694bef
--- config-ml.in.jj	2019-01-09 12:50:16.646501448 +0100
3694bef
+++ config-ml.in	2019-01-11 18:16:23.442726914 +0100
4839e42
@@ -511,6 +511,8 @@ multi-do:
8717b1d
 				ADAFLAGS="$(ADAFLAGS) $${flags}" \
8717b1d
 				prefix="$(prefix)" \
8717b1d
 				exec_prefix="$(exec_prefix)" \
8717b1d
+				mandir="$(mandir)" \
759d907
+				infodir="$(infodir)" \
759d907
 				GOCFLAGS="$(GOCFLAGS) $${flags}" \
3694bef
 				GDCFLAGS="$(GDCFLAGS) $${flags}" \
8717b1d
 				CXXFLAGS="$(CXXFLAGS) $${flags}" \
3694bef
--- libcpp/macro.c.jj	2019-01-09 13:01:21.420552123 +0100
3694bef
+++ libcpp/macro.c	2019-01-11 18:18:17.736876285 +0100
3694bef
@@ -3256,8 +3256,6 @@ static cpp_macro *
3694bef
 create_iso_definition (cpp_reader *pfile)
3694bef
 {
7f99993
   bool following_paste_op = false;
7f99993
-  const char *paste_op_error_msg =
7f99993
-    N_("'##' cannot appear at either end of a macro expansion");
7f99993
   unsigned int num_extra_tokens = 0;
3694bef
   unsigned nparms = 0;
3694bef
   cpp_hashnode **params = NULL;
3694bef
@@ -3382,7 +3380,9 @@ create_iso_definition (cpp_reader *pfile
7f99993
 	     function-like macros, but not at the end.  */
7f99993
 	  if (following_paste_op)
7f99993
 	    {
7f99993
-	      cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);
7f99993
+	      cpp_error (pfile, CPP_DL_ERROR,
3694bef
+			 "'##' cannot appear at either end of a macro "
3694bef
+			 "expansion");
3694bef
 	      goto out;
7f99993
 	    }
3694bef
 	  if (!vaopt_tracker.completed ())
3694bef
@@ -3397,7 +3397,9 @@ create_iso_definition (cpp_reader *pfile
7f99993
 	     function-like macros, but not at the beginning.  */
7f99993
 	  if (macro->count == 1)
7f99993
 	    {
7f99993
-	      cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);
7f99993
+	      cpp_error (pfile, CPP_DL_ERROR,
3694bef
+			 "'##' cannot appear at either end of a macro "
3694bef
+			 "expansion");
3694bef
 	      goto out;
7f99993
 	    }
7f99993
 
3694bef
--- libcpp/expr.c.jj	2019-01-09 13:01:22.415535734 +0100
3694bef
+++ libcpp/expr.c	2019-01-11 18:16:23.444726882 +0100
3694bef
@@ -788,16 +788,17 @@ cpp_classify_number (cpp_reader *pfile,
7f99993
       if ((result & CPP_N_WIDTH) == CPP_N_LARGE
7f99993
 	  && CPP_OPTION (pfile, cpp_warn_long_long))
7f99993
         {
7f99993
-          const char *message = CPP_OPTION (pfile, cplusplus) 
7f99993
-				? N_("use of C++11 long long integer constant")
7f99993
-		                : N_("use of C99 long long integer constant");
7f99993
-
7f99993
 	  if (CPP_OPTION (pfile, c99))
7f99993
             cpp_warning_with_line (pfile, CPP_W_LONG_LONG, virtual_location,
7f99993
-				   0, message);
7f99993
+				   0, CPP_OPTION (pfile, cplusplus)
7f99993
+				      ? N_("use of C++11 long long integer constant")
7f99993
+				      : N_("use of C99 long long integer constant"));
7f99993
           else
7f99993
             cpp_pedwarning_with_line (pfile, CPP_W_LONG_LONG,
7f99993
-				      virtual_location, 0, message);
7f99993
+				      virtual_location, 0,
7f99993
+				      CPP_OPTION (pfile, cplusplus)
7f99993
+				      ? N_("use of C++11 long long integer constant")
7f99993
+				      : N_("use of C99 long long integer constant"));
7f99993
         }
7f99993
 
7f99993
       result |= CPP_N_INTEGER;