# HG changeset patch # User "Yann E. MORIN" # Date 1388848758 -3600 # Node ID 22239d19ad65d57d5602e613a6a717b35bae536c # Parent eacd3115e674fd232e429d6c3772682c4740906c 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" diff -r eacd3115e674 -r 22239d19ad65 config/libc/uClibc.in.2 --- a/config/libc/uClibc.in.2 Mon Jan 06 20:05:14 2014 +0100 +++ b/config/libc/uClibc.in.2 Sat Jan 04 16:19:18 2014 +0100 @@ -65,3 +65,18 @@ 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 -r eacd3115e674 -r 22239d19ad65 scripts/build/libc/uClibc.sh --- a/scripts/build/libc/uClibc.sh Mon Jan 06 20:05:14 2014 +0100 +++ b/scripts/build/libc/uClibc.sh Sat Jan 04 16:19:18 2014 +0100 @@ -315,13 +315,6 @@ ;; 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 @@ 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