mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-19 04:47:52 +00:00
cc/gcc: add option to enable/disable decimal floats
Decimal floats need support form the C library, namely support for fenv, which is missing in uClibc for any architecture but x86/32. Add an option (a choice) to enable or disable decimal floats. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
This commit is contained in:
parent
92f8806b2d
commit
2ee8d1d8f2
@ -255,6 +255,52 @@ config CC_GCC_LNK_HASH_STYLE
|
||||
default "gnu" if CC_GCC_LNK_HASH_STYLE_GNU
|
||||
default "both" if CC_GCC_LNK_HASH_STYLE_BOTH
|
||||
|
||||
choice CC_GCC_DEC_FLOATS_CHOICE
|
||||
bool "Decimal floats"
|
||||
default CC_GCC_DEC_FLOATS_AUTO
|
||||
help
|
||||
Choose what type of decimal floats to support.
|
||||
|
||||
Note that using decimal floats requires a C library that provides
|
||||
support for fenv (namely, the fenv.h header). This is the case
|
||||
for (e)glibc, and uClibc on x86/32. For other C libraries, or
|
||||
uClibc on other archs, this might not be the case, so you should
|
||||
disable support for decimal floats.
|
||||
|
||||
The default is to let ./configure decide.
|
||||
|
||||
config CC_GCC_DEC_FLOAT_AUTO
|
||||
bool "auto"
|
||||
help
|
||||
Let ./configure decide. If you say 'y' here, gcc will default to:
|
||||
- 'bid' for x86 (32- and 64-bit)
|
||||
- 'dpd' for powerpc
|
||||
- 'no' for the other architectures
|
||||
|
||||
config CC_GCC_DEC_FLOAT_BID
|
||||
bool "bid"
|
||||
help
|
||||
Use the 'binary integer decimal' format for decimal floats.
|
||||
|
||||
config CC_GCC_DEC_FLOAT_DPD
|
||||
bool "dpd"
|
||||
help
|
||||
Use the 'densely packed decimal' for decimal floats.
|
||||
|
||||
config CC_GCC_DEC_FLOATS_NO
|
||||
bool "no"
|
||||
help
|
||||
Do not support decimal floats. The default.
|
||||
|
||||
endchoice # CC_GCC_DEC_FLOATS_CHOICE
|
||||
|
||||
config CC_GCC_DEC_FLOATS
|
||||
string
|
||||
default "" if CC_GCC_DEC_FLOATS_AUTO
|
||||
default "bid" if CC_GCC_DEC_FLOATS_BID
|
||||
default "dpd" if CC_GCC_DEC_FLOATS_DPD
|
||||
default "no" if CC_GCC_DEC_FLOATS_NO
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
config CC_GCC_HAS_ARCH_OPTIONS
|
||||
|
@ -333,6 +333,11 @@ do_cc_core_backend() {
|
||||
*) extra_config+=( "--with-linker-hash-style=${CT_CC_GCC_LNK_HASH_STYLE}" );;
|
||||
esac
|
||||
|
||||
case "${CT_CC_GCC_DEC_FLOATS}" in
|
||||
"") ;;
|
||||
*) extra_config+=( "--enable-decimal-float=${CT_CC_GCC_DEC_FLOATS}" );;
|
||||
esac
|
||||
|
||||
case "${CT_ARCH}" in
|
||||
mips)
|
||||
case "${CT_CC_GCC_mips_llsc}" in
|
||||
@ -784,6 +789,11 @@ do_cc_backend() {
|
||||
*) extra_config+=( "--with-linker-hash-style=${CT_CC_GCC_LNK_HASH_STYLE}" );;
|
||||
esac
|
||||
|
||||
case "${CT_CC_GCC_DEC_FLOATS}" in
|
||||
"") ;;
|
||||
*) extra_config+=( "--enable-decimal-float=${CT_CC_GCC_DEC_FLOATS}" );;
|
||||
esac
|
||||
|
||||
if [ "${CT_CC_GCC_ENABLE_PLUGINS}" = "y" ]; then
|
||||
extra_config+=( --enable-plugin )
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user