diff options
author | Jozef Lawrynowicz <jozefl@gcc.gnu.org> | 2019-12-11 19:19:50 +0000 |
---|---|---|
committer | Jozef Lawrynowicz <jozefl@gcc.gnu.org> | 2019-12-11 19:19:50 +0000 |
commit | a9046e9853024206bec092dd63e21e152cb5cbca (patch) | |
tree | 051719319b73e772a57ca7103c0df5acaf847094 /gcc/config | |
parent | 368877a11b789a74b1ae5b878e3bd30039118c30 (diff) | |
download | gcc-a9046e9853024206bec092dd63e21e152cb5cbca.zip gcc-a9046e9853024206bec092dd63e21e152cb5cbca.tar.gz gcc-a9046e9853024206bec092dd63e21e152cb5cbca.tar.bz2 |
MSP430: Add -fno-exceptions multilib
ChangeLog:
2019-12-11 Jozef Lawrynowicz <jozef.l@mittosystems.com>
* config-ml.in (msp430-*-*): Support --disable-no-exceptions configure
flag.
gcc/ChangeLog:
2019-12-11 Jozef Lawrynowicz <jozef.l@mittosystems.com>
* config/msp430/msp430.h (STARTFILE_SPEC) [!fexceptions]: Use
crtbegin_no_eh.o if building for the C language.
[fno-exceptions]: Use crtbegin_no_eh.o if building for any language
except C.
(ENDFILE_SPEC) [!fexceptions]: Use crtend_no_eh.o if building for
the C language.
[fno-exceptions]: Use crtend_no_eh.o if building for any language
except C.
* config/msp430/t-msp430: Add -fno-exceptions multilib.
* doc/install.texi: Document --disable-no-exceptions multilib configure
option.
* doc/sourcebuild.texi: Document exceptions_enabled effective target.
gcc/testsuite/ChangeLog:
2019-12-11 Jozef Lawrynowicz <jozef.l@mittosystems.com>
* lib/gcc-dg.exp: Add dg-prune messages for when exception handling is
disabled.
* lib/target-supports.exp (check_effective_target_exceptions_enabled):
New.
libgcc/ChangeLog:
2019-12-11 Jozef Lawrynowicz <jozef.l@mittosystems.com>
* config.host: Add crt{begin,end}_no_eh.o to "extra_parts".
* config.host (msp430*-*-elf): Add crt{begin,end}_no_eh.o to
"extra_parts".
From-SVN: r279246
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/msp430/msp430.h | 11 | ||||
-rw-r--r-- | gcc/config/msp430/t-msp430 | 9 |
2 files changed, 14 insertions, 6 deletions
diff --git a/gcc/config/msp430/msp430.h b/gcc/config/msp430/msp430.h index 0ea6b0a..7b94918 100644 --- a/gcc/config/msp430/msp430.h +++ b/gcc/config/msp430/msp430.h @@ -44,13 +44,20 @@ extern bool msp430x; } \ while (0) +/* For the "c" language where exceptions are implicitly disabled, use + crt*_no_eh.o unless -fexceptions is passed. For other languages, only use + crt*_no_eh.o if -fno-exceptions is explicitly passed. */ #undef STARTFILE_SPEC #define STARTFILE_SPEC "%{pg:gcrt0.o%s}" \ - "%{!pg:%{minrt:crt0-minrt.o%s}%{!minrt:crt0.o%s}} %{!minrt:crtbegin.o%s}" + "%{!pg:%{minrt:crt0-minrt.o%s}%{!minrt:crt0.o%s}} " \ + "%{!minrt:%{,c:%{!fexceptions:crtbegin_no_eh.o%s; :crtbegin.o%s}; " \ + ":%{fno-exceptions:crtbegin_no_eh.o%s; :crtbegin.o%s}}}" /* -lgcc is included because crtend.o needs __mspabi_func_epilog_1. */ #undef ENDFILE_SPEC -#define ENDFILE_SPEC "%{!minrt:crtend.o%s} " \ +#define ENDFILE_SPEC \ + "%{!minrt:%{,c:%{!fexceptions:crtend_no_eh.o%s; :crtend.o%s}; " \ + ":%{fno-exceptions:crtend_no_eh.o%s; :crtend.o%s}}} " \ "%{minrt:%:if-exists(crtn-minrt.o%s)}%{!minrt:%:if-exists(crtn.o%s)} -lgcc" #define ASM_SPEC "-mP " /* Enable polymorphic instructions. */ \ diff --git a/gcc/config/msp430/t-msp430 b/gcc/config/msp430/t-msp430 index f8ba775..e180ce3 100644 --- a/gcc/config/msp430/t-msp430 +++ b/gcc/config/msp430/t-msp430 @@ -28,8 +28,8 @@ msp430-devices.o: $(srcdir)/config/msp430/msp430-devices.c \ # Enable multilibs: -MULTILIB_OPTIONS = mcpu=msp430 mlarge mdata-region=none -MULTILIB_DIRNAMES = 430 large full-memory-range +MULTILIB_OPTIONS = mcpu=msp430 mlarge mdata-region=none fno-exceptions +MULTILIB_DIRNAMES = 430 large full-memory-range no-exceptions # Match -mcpu=430 MULTILIB_MATCHES = mcpu?msp430=mcpu?430 @@ -41,9 +41,10 @@ MULTILIB_MATCHES += mdata-region?none=mdata-region?either # hard-coded data here, because DRIVER_SELF_SPECS will place the correct # -mcpu option for a given mcu onto the command line. -MULTILIB_REQUIRED = mcpu=msp430 -MULTILIB_REQUIRED += mlarge +MULTILIB_REQUIRED = mcpu=msp430 mlarge +MULTILIB_REQUIRED += fno-exceptions mcpu=msp430/fno-exceptions mlarge/fno-exceptions MULTILIB_REQUIRED += mlarge/mdata-region=none +MULTILIB_REQUIRED += mlarge/mdata-region=none/fno-exceptions MULTILIB_EXTRA_OPTS = |