# HG changeset patch # User "Yann E. MORIN" # Date 1321916213 -3600 # Node ID fc0afaf5c81758d670a2f526f76cb212ca2221d7 # Parent 8a836b6d6e8ceff69aa19e5be94673feacea8013 libc/glibc: set the float option according to extra CFLAGS When building a multilib, some extra CFLAGS can override the default config option. This is the case for the floating point selection. Signed-off-by: "Yann E. MORIN" diff -r 8a836b6d6e8c -r fc0afaf5c817 scripts/build/libc/glibc-eglibc.sh-common --- a/scripts/build/libc/glibc-eglibc.sh-common Mon Nov 21 23:33:08 2011 +0100 +++ b/scripts/build/libc/glibc-eglibc.sh-common Mon Nov 21 23:56:53 2011 +0100 @@ -77,6 +77,7 @@ local -a extra_config local -a extra_make_args local glibc_cflags + local float_extra while [ $# -ne 0 ]; do eval "${1// /\\ }" @@ -135,10 +136,19 @@ *) extra_config+=("--disable-shared");; esac - case "${CT_ARCH_FLOAT}" in + float_extra="$( echo "${extra_flags}" \ + |${sed} -r -e '/^(.*[[:space:]])?-m(hard|soft)-float([[:space:]].*)?$/!d;' \ + -e 's//\2/;' \ + )" + case "${float_extra}" in hard) extra_config+=("--with-fp");; soft) extra_config+=("--without-fp");; - softfp) extra_config+=("--with-fp");; + "") + case "${CT_ARCH_FLOAT}" in + hard|softfp) extra_config+=("--with-fp");; + soft) extra_config+=("--without-fp");; + esac + ;; esac if [ "${CT_LIBC_DISABLE_VERSIONING}" = "y" ]; then