[5/7] configure: Simplify vararg check

Message ID 20180320094930.5424-6-diego@biurrun.de
State Committed
Commit 434b44cd6fb4bb9a2bf2bb29ef55ce1a315314b8
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, 2 insertions(+), 3 deletions(-)

Comments

James Almer March 22, 2018, 2:23 p.m. | #1
On 3/20/2018 6:49 AM, Diego Biurrun wrote:
> ---
>  configure | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/configure b/configure
> index e3c5dcae1e..9257b94631 100755
> --- a/configure
> +++ b/configure
> @@ -4240,12 +4240,11 @@ od -t x1 $TMPO | grep -q '42 *49 *47 *45' && enable bigendian
>  check_gas() {
>      log "check_gas using '$as' as AS"
>      # :vararg is used on aarch64, arm and ppc altivec
> -    test_as <<EOF || return 1
> +    check_as vararg "
>  .macro m n, y:vararg=0
>  \n: .int \y
>  .endm
> -m x
> -EOF
> +m x" || return 1
>      # .altmacro is only used in arm asm
>      ! enabled arm || check_as gnu_as ".altmacro"
>  }

Ok if tested.

Patch

diff --git a/configure b/configure
index e3c5dcae1e..9257b94631 100755
--- a/configure
+++ b/configure
@@ -4240,12 +4240,11 @@  od -t x1 $TMPO | grep -q '42 *49 *47 *45' && enable bigendian
 check_gas() {
     log "check_gas using '$as' as AS"
     # :vararg is used on aarch64, arm and ppc altivec
-    test_as <<EOF || return 1
+    check_as vararg "
 .macro m n, y:vararg=0
 \n: .int \y
 .endm
-m x
-EOF
+m x" || return 1
     # .altmacro is only used in arm asm
     ! enabled arm || check_as gnu_as ".altmacro"
 }