mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-21 05:43:09 +00:00
cc/gcc: make sjlj config option a tristate
A tristate fits better here than a choice.
This commit is contained in:
parent
e5f3082b3d
commit
61ebaa97ca
@ -30,40 +30,24 @@ config CC_GCC_DISABLE_PCH
|
|||||||
need to be disabled. Please see:
|
need to be disabled. Please see:
|
||||||
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40974
|
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40974
|
||||||
|
|
||||||
choice
|
config CC_GCC_SJLJ_EXCEPTIONS
|
||||||
bool
|
tristate
|
||||||
prompt "Use sjlj for exceptions"
|
prompt "Use sjlj for exceptions"
|
||||||
default CC_SJLJ_EXCEPTIONS_CONFIGURE
|
default m
|
||||||
depends on ! BARE_METAL
|
|
||||||
|
|
||||||
# This config option is used nowhere in the code on purpose.
|
|
||||||
# It only serves as a choice entry to force neither using nor not using sjlj
|
|
||||||
config CC_SJLJ_EXCEPTIONS_CONFIGURE
|
|
||||||
bool
|
|
||||||
prompt "Let configure decide"
|
|
||||||
help
|
help
|
||||||
Let configure decide if setjmp/longjmp should be used to handle
|
'sjlj' is short for setjmp/longjmp.
|
||||||
exceptions.
|
|
||||||
|
|
||||||
Choose that if you trust configure to detect the correct settings.
|
On some architectures, stack unwinding during exception handling
|
||||||
This is the default choice.
|
works perfectly well without using sjlj, while on some others,
|
||||||
|
use of sjlj is required for proper stack unwinding.
|
||||||
config CC_SJLJ_EXCEPTIONS_USE
|
|
||||||
bool
|
|
||||||
prompt "Force using sjlj"
|
|
||||||
help
|
|
||||||
Do use setjmp/longjmp for exceptions.
|
|
||||||
This is gcc's --enable-sjlj-exceptions configure switch.
|
|
||||||
|
|
||||||
Choose that if you want to use setjmp/longjmp to handle exceptions.
|
Option | sjlj use | Associated ./configure switch
|
||||||
|
---------+--------------------+--------------------------------
|
||||||
config CC_SJLJ_EXCEPTIONS_DONT_USE
|
Y | forcibly used | --enable-sjlj-exceptions
|
||||||
bool
|
M | auto | (none, ./configure decides)
|
||||||
prompt "Force not using sjlj"
|
N | forcibly not used | --disable-sjlj-exceptions
|
||||||
help
|
|
||||||
Do not use setjmp/longjmp for exceptions.
|
|
||||||
This is gcc's --disable-sjlj-exceptions configure switch.
|
|
||||||
|
|
||||||
Choose that if you want to not use setjmp/longjmp to handle exceptions.
|
It should be safe to say 'M' or 'N'.
|
||||||
|
|
||||||
endchoice
|
It can happen that ./configure is wrong in some cases. Known
|
||||||
|
case is for ARM big endian, where you should say 'N'.
|
||||||
|
@ -327,8 +327,11 @@ do_cc() {
|
|||||||
[ "${CT_SHARED_LIBS}" = "y" ] || extra_config+=("--disable-shared")
|
[ "${CT_SHARED_LIBS}" = "y" ] || extra_config+=("--disable-shared")
|
||||||
[ -n "${CT_CC_PKGVERSION}" ] && extra_config+=("--with-pkgversion=${CT_CC_PKGVERSION}")
|
[ -n "${CT_CC_PKGVERSION}" ] && extra_config+=("--with-pkgversion=${CT_CC_PKGVERSION}")
|
||||||
[ -n "${CT_CC_BUGURL}" ] && extra_config+=("--with-bugurl=${CT_CC_BUGURL}")
|
[ -n "${CT_CC_BUGURL}" ] && extra_config+=("--with-bugurl=${CT_CC_BUGURL}")
|
||||||
[ "${CT_CC_SJLJ_EXCEPTIONS_USE}" = "y" ] && extra_config+=("--enable-sjlj-exceptions")
|
case "${CT_CC_GCC_SJLJ_EXCEPTIONS}" in
|
||||||
[ "${CT_CC_SJLJ_EXCEPTIONS_DONT_USE}" = "y" ] && extra_config+=("--disable-sjlj-exceptions")
|
y) extra_config+=("--enable-sjlj-exceptions");;
|
||||||
|
m) ;;
|
||||||
|
"") extra_config+=("--disable-sjlj-exceptions");;
|
||||||
|
esac
|
||||||
if [ "${CT_CC_CXA_ATEXIT}" = "y" ]; then
|
if [ "${CT_CC_CXA_ATEXIT}" = "y" ]; then
|
||||||
extra_config+=("--enable-__cxa_atexit")
|
extra_config+=("--enable-__cxa_atexit")
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user