aboutsummaryrefslogtreecommitdiff
path: root/gcc/d
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2022-07-01 17:40:18 +0200
committerIain Buclaw <ibuclaw@gdcproject.org>2022-07-06 19:51:38 +0200
commitc785204735b2cace9a676969de0967105a06438d (patch)
tree5d2b4821933fa932a08ae24e0ed52c0b2e726105 /gcc/d
parentacb696b792eeab92167f516b5236ed9242e62deb (diff)
downloadgcc-c785204735b2cace9a676969de0967105a06438d.zip
gcc-c785204735b2cace9a676969de0967105a06438d.tar.gz
gcc-c785204735b2cace9a676969de0967105a06438d.tar.bz2
d: Build the D sources in the front-end with -fno-exceptions
The D front-end does not use exceptions, but it still requires RTTI for some lowerings of convenience language features. Enforce it with by building with `-fno-exceptions'. gcc/d/ChangeLog: * Make-lang.in (NOEXCEPTION_DFLAGS): Define. (ALL_DFLAGS): Add NO_EXCEPTION_DFLAGS.
Diffstat (limited to 'gcc/d')
-rw-r--r--gcc/d/Make-lang.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/d/Make-lang.in b/gcc/d/Make-lang.in
index 9f13437..6f9b2e5 100644
--- a/gcc/d/Make-lang.in
+++ b/gcc/d/Make-lang.in
@@ -57,8 +57,12 @@ CHECKING_DFLAGS =
endif
WARN_DFLAGS = -Wall -Wdeprecated $(NOCOMMON_FLAG)
+# D front-end doesn't use exceptions, but it does require RTTI.
+NOEXCEPTION_DFLAGS = $(filter-out -fno-rtti, $(NOEXCEPTION_FLAGS))
+
ALL_DFLAGS = $(DFLAGS-$@) $(GDCFLAGS) -fversion=IN_GCC $(CHECKING_DFLAGS) \
- $(PICFLAG) $(ALIASING_FLAGS) $(COVERAGE_FLAGS) $(WARN_DFLAGS)
+ $(PICFLAG) $(ALIASING_FLAGS) $(NOEXCEPTION_DFLAGS) $(COVERAGE_FLAGS) \
+ $(WARN_DFLAGS)
DCOMPILE.base = $(GDC) $(NO_PIE_CFLAGS) -c $(ALL_DFLAGS) -o $@
DCOMPILE = $(DCOMPILE.base) -MT $@ -MMD -MP -MF $(@D)/$(DEPDIR)/$(*F).TPo