gcc/gcc11-hack.patch

127 lines
4.8 KiB
Diff
Raw Normal View History

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