diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2011-11-21 23:56:53 +0100 |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2011-11-21 23:56:53 +0100 |
commit | a2e7a536e05eb39dc3a9583bad3cfd47b8c2f46e (patch) | |
tree | dcdd1f5cddf2b2a6da16ad87bc474ae67db223f9 | |
parent | 2d5dc881e356ee44053b716a4e10a7eec0c1c60e (diff) | |
download | crosstool-ng-a2e7a536e05eb39dc3a9583bad3cfd47b8c2f46e.tar.gz crosstool-ng-a2e7a536e05eb39dc3a9583bad3cfd47b8c2f46e.tar.bz2 crosstool-ng-a2e7a536e05eb39dc3a9583bad3cfd47b8c2f46e.zip |
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" <yann.morin.1998@anciens.enib.fr>
-rw-r--r-- | scripts/build/libc/glibc-eglibc.sh-common | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/scripts/build/libc/glibc-eglibc.sh-common b/scripts/build/libc/glibc-eglibc.sh-common index 0748bb95..2533f14f 100644 --- a/scripts/build/libc/glibc-eglibc.sh-common +++ b/scripts/build/libc/glibc-eglibc.sh-common @@ -77,6 +77,7 @@ do_libc_backend() { 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 @@ do_libc_backend() { *) 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 |