libc/uClibc: add option to enable fenv

Support for fenv.h is a little bit more tricky that enabling it only
for x86-32 is not right.

Add an option for the user to choose whther to install fenv.h or not.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
This commit is contained in:
Yann E. MORIN" 2014-01-04 16:19:18 +01:00
parent 20d851ad9f
commit ec93451443
2 changed files with 20 additions and 7 deletions

View File

@ -65,3 +65,18 @@ config LIBC_UCLIBC_WCHAR
Say y if you want uClibc to support WCHAR.
Maybe this is needed, if you're building a C++-Compiler
config LIBC_UCLIBC_FENV
bool
prompt "Add support for fenv.h"
default y if ARCH_x86
help
fenv.h provides functions to control the floating point environment,
such as rounding mode, exceptions...
For some architectures, fenv.h is incomplete, so is not installed
by default. x86 is known to have a rather complete fenv.h, so it is
installed by default only for x86.
If you need fenv.h on other architectures, say 'y' here, but you may
encounter some issues.

View File

@ -315,13 +315,6 @@ mungeuClibcConfig() {
;;
esac
;;
x86)
if [ "${CT_ARCH_BITNESS}" = "32" ]; then
cat <<-ENDSED
s/.*(UCLIBC_HAS_FENV).*/\\1=y/
ENDSED
fi
;;
esac
# Accomodate for old and new uClibc versions, where the
@ -374,6 +367,11 @@ mungeuClibcConfig() {
ENDSED
;;
esac
if [ "${CT_LIBC_UCLIBC_FENV}" = "y" ]; then
cat <<-ENDSED
s/.*(UCLIBC_HAS_FENV).*/\\1=y/
ENDSED
fi
# We always want ctor/dtor
cat <<-ENDSED