summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@free.fr>2014-01-04 15:19:18 (GMT)
committerYann E. MORIN" <yann.morin.1998@free.fr>2014-01-04 15:19:18 (GMT)
commitec93451443fe6d52305241b49265265ba434547c (patch)
tree8f9028c1ccdf5f90b14cffdb9cc4cbf8f152f4b7
parent20d851ad9f2f2170e63dbf1d6e640580e323c614 (diff)
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>
-rw-r--r--config/libc/uClibc.in.215
-rw-r--r--scripts/build/libc/uClibc.sh12
2 files changed, 20 insertions, 7 deletions
diff --git a/config/libc/uClibc.in.2 b/config/libc/uClibc.in.2
index e2769e7..c1a84f9 100644
--- a/config/libc/uClibc.in.2
+++ b/config/libc/uClibc.in.2
@@ -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.
diff --git a/scripts/build/libc/uClibc.sh b/scripts/build/libc/uClibc.sh
index 87fd3f6..f0522ab 100644
--- a/scripts/build/libc/uClibc.sh
+++ b/scripts/build/libc/uClibc.sh
@@ -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