[SCM] libav/experimental: configure: check $as first before using $gas as GNU as

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Aug 10 16:04:13 UTC 2014


The following commit has been merged in the experimental branch:
commit 15201e256035a3e8f9d3d7b96fc327467e1a8ead
Author: Janne Grunau <j at jannau.net>
Date:   Tue Aug 5 12:08:09 2014 +0200

    configure: check $as first before using $gas as GNU as
    
    llvm's integrated assembler supports the AArch64 asm on darwin since
    August 2014. So check $as first before using gas-preprocessor.pl via
    $gas. Makes the checks specific for that the architecture specific asm
    needs. PPC Altivec and AArch64 needs on ':vararg' for macro arguments.
    Arm needs in addition the '.altmacro' directive.

diff --git a/configure b/configure
index b2eb0c8..22c78e7 100755
--- a/configure
+++ b/configure
@@ -3760,22 +3760,32 @@ unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E';
 EOF
 od -t x1 $TMPO | grep -q '42 *49 *47 *45' && enable bigendian
 
-
-if enabled asm; then
-    enabled     arm         && nogas=die
-    enabled_all ppc altivec && nogas=warn
-    as=${gas:=$as}
-    check_as <<EOF && enable gnu_as || \
-        $nogas "GNU assembler not found, install gas-preprocessor"
-.macro m n
-\n: .int 0
+check_gas() {
+    log "check_gas using '$as' as AS"
+    # :vararg is used on aarch64, arm and ppc altivec
+    check_as <<EOF || return 1
+.macro m n, y:vararg=0
+\n: .int \y
 .endm
 m x
 EOF
-
-    check_as <<EOF || $nogas "GNU assembler not found, install gas-preprocessor"
+    # .altmacro is only used in arm asm
+    ! enabled arm || check_as <<EOF || return 1
 .altmacro
 EOF
+    enable gnu_as
+    return 0
+}
+
+if enabled asm; then
+    enabled     arm aarch64 && nogas=die
+    enabled_all ppc altivec && nogas=warn
+
+    if ! check_gas ; then
+        as=${gas:=$as}
+        check_gas || \
+            $nogas "GNU assembler not found, install gas-preprocessor"
+    fi
 
     check_as <<EOF && enable as_func
 .func test

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list