[6/7] configure: Simplify vfp_args check

Message ID 20180320094930.5424-7-diego@biurrun.de
State Superseded
Headers show
Series
  • [1/7] configure: Document available options for the --toolchain parameter
Related show

Commit Message

Diego Biurrun March 20, 2018, 9:49 a.m.
---
 configure | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

James Almer March 22, 2018, 2:24 p.m. | #1
On 3/20/2018 6:49 AM, Diego Biurrun wrote:
> ---
>  configure | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/configure b/configure
> index 9257b94631..830f754412 100755
> --- a/configure
> +++ b/configure
> @@ -4303,10 +4303,7 @@ elif enabled arm; then
>      elif ! test_cpp_condition stddef.h "defined __ARM_PCS || defined __SOFTFP__" && [ $target_os != darwin ]; then
>          case "${cross_prefix:-$cc}" in
>              *hardfloat*) enable vfp_args; fpabi=vfp ;;
> -            *) check_ld vfp_args <<EOF && fpabi=vfp || fpabi=soft ;;
> -__asm__ (".eabi_attribute 28, 1");
> -int main(void) { return 0; }
> -EOF
> +            *) check_ld vfp_args '_asm__ (".eabi_attribute 28, 1"); int main(void) { return 0; }' && fpabi=vfp || fpabi=soft ;;
>          esac
>          warn "Compiler does not indicate floating-point ABI, guessing $fpabi."
>      fi

Ok if tested.

Patch

diff --git a/configure b/configure
index 9257b94631..830f754412 100755
--- a/configure
+++ b/configure
@@ -4303,10 +4303,7 @@  elif enabled arm; then
     elif ! test_cpp_condition stddef.h "defined __ARM_PCS || defined __SOFTFP__" && [ $target_os != darwin ]; then
         case "${cross_prefix:-$cc}" in
             *hardfloat*) enable vfp_args; fpabi=vfp ;;
-            *) check_ld vfp_args <<EOF && fpabi=vfp || fpabi=soft ;;
-__asm__ (".eabi_attribute 28, 1");
-int main(void) { return 0; }
-EOF
+            *) check_ld vfp_args '_asm__ (".eabi_attribute 28, 1"); int main(void) { return 0; }' && fpabi=vfp || fpabi=soft ;;
         esac
         warn "Compiler does not indicate floating-point ABI, guessing $fpabi."
     fi