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/testsuite/lib/target-supports.exp | |
parent | 368877a11b789a74b1ae5b878e3bd30039118c30 (diff) |
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/testsuite/lib/target-supports.exp')
-rw-r--r-- | gcc/testsuite/lib/target-supports.exp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 5b4cc02f921..80e9d6720bd 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -8990,6 +8990,24 @@ proc check_effective_target_exceptions {} { return 1 } +# Used to check if the testing configuration supports exceptions. +# Returns 0 if exceptions are unsupported or disabled (e.g. by passing +# -fno-exceptions). Returns 1 if exceptions are enabled. +proc check_effective_target_exceptions_enabled {} { + return [check_cached_effective_target exceptions_enabled { + if { [check_effective_target_exceptions] } { + return [check_no_compiler_messages exceptions_enabled assembly { + void foo (void) + { + throw 1; + } + }] + } else { + # If exceptions aren't supported, then they're not enabled. + return 0 + } + }] +} proc check_effective_target_tiny {} { return [check_cached_effective_target tiny { |