summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-08-05 19:31:08 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-08-05 19:31:08 +0200
commit00d234688512c83f3e62b6781676469b78f4ab2b (patch)
tree51dd1839347e11b44b9420dd23b629c99fa25ed7 /configure
parent0160fe454c38a507eaf53ec9012e07244597f672 (diff)
parent15201e256035a3e8f9d3d7b96fc327467e1a8ead (diff)
Merge commit '15201e256035a3e8f9d3d7b96fc327467e1a8ead'
* commit '15201e256035a3e8f9d3d7b96fc327467e1a8ead': configure: check $as first before using $gas as GNU as Conflicts: configure Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure32
1 files changed, 21 insertions, 11 deletions
diff --git a/configure b/configure
index ae677165ae..3c13e4f95e 100755
--- a/configure
+++ b/configure
@@ -4345,22 +4345,32 @@ if [ "$cpu" = "power7" ] || [ "$cpu" = "power8" ] ;then
fi
fi
-
-if enabled asm; then
- enabled arm && nogas=die
- enabled_all ppc altivec && [ $target_os_default != aix ] && 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 && [ $target_os_default != aix ] && 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