# HG changeset patch # User Michael Hope # Date 1318991252 -46800 # Node ID b5179235b925ea501f5ed2796ff57616fa8d88cb # Parent f09ed6dd71a3f00ced50eedd966318d1cc9da207 scripts: introduce float type as a string With the upcoming softfp support, the case..esac test would become a bit convoluted if it were to test three different booleans. Introduce a new blind string config option that defaults to the selected floating point type used. Signed-off-by: Michael Hope [yann.morin.1998@anciens.enib.fr: split the original patch] Signed-off-by: "Yann E. MORIN" diff -r f09ed6dd71a3 -r b5179235b925 config/target.in --- a/config/target.in Fri Nov 04 19:22:29 2011 +0100 +++ b/config/target.in Wed Oct 19 15:27:32 2011 +1300 @@ -296,6 +296,11 @@ Leave blank if you don't know better. +config ARCH_FLOAT + string + default "hard" if ARCH_FLOAT_HW + default "soft" if ARCH_FLOAT_SW + source "config.gen/arch.in.2" endmenu diff -r f09ed6dd71a3 -r b5179235b925 scripts/build/libc/glibc-eglibc.sh-common --- a/scripts/build/libc/glibc-eglibc.sh-common Fri Nov 04 19:22:29 2011 +0100 +++ b/scripts/build/libc/glibc-eglibc.sh-common Wed Oct 19 15:27:32 2011 +1300 @@ -132,9 +132,9 @@ *) extra_config+=("--disable-shared");; esac - case "${CT_ARCH_FLOAT_HW},${CT_ARCH_FLOAT_SW}" in - y,) extra_config+=("--with-fp");; - ,y) extra_config+=("--without-fp");; + case "${CT_ARCH_FLOAT}" in + hard) extra_config+=("--with-fp");; + soft) extra_config+=("--without-fp");; esac if [ "${CT_LIBC_DISABLE_VERSIONING}" = "y" ]; then diff -r f09ed6dd71a3 -r b5179235b925 scripts/functions --- a/scripts/functions Fri Nov 04 19:22:29 2011 +0100 +++ b/scripts/functions Wed Oct 19 15:27:32 2011 +1300 @@ -983,7 +983,13 @@ [ "${CT_ARCH_CPU}" ] && { CT_ARCH_CPU_CFLAG="-mcpu=${CT_ARCH_CPU}"; CT_ARCH_WITH_CPU="--with-cpu=${CT_ARCH_CPU}"; } [ "${CT_ARCH_TUNE}" ] && { CT_ARCH_TUNE_CFLAG="-mtune=${CT_ARCH_TUNE}"; CT_ARCH_WITH_TUNE="--with-tune=${CT_ARCH_TUNE}"; } [ "${CT_ARCH_FPU}" ] && { CT_ARCH_FPU_CFLAG="-mfpu=${CT_ARCH_FPU}"; CT_ARCH_WITH_FPU="--with-fpu=${CT_ARCH_FPU}"; } - [ "${CT_ARCH_FLOAT_SW}" ] && { CT_ARCH_FLOAT_CFLAG="-msoft-float"; CT_ARCH_WITH_FLOAT="--with-float=soft"; } + + case "${CT_ARCH_FLOAT}" in + soft) + CT_ARCH_FLOAT_CFLAG="-msoft-float" + CT_ARCH_WITH_FLOAT="--with-float=soft" + ;; + esac # Build the default kernel tuple part CT_TARGET_KERNEL="${CT_KERNEL}"