summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShivraj Patil <shivraj.patil@imgtec.com>2016-03-07 19:49:10 +0530
committerMichael Niedermayer <michael@niedermayer.cc>2016-03-08 17:36:46 +0100
commitb59d06d5f4155c27d6c3aa14be8379723aaf0a08 (patch)
treed8324eec2fb3e75531dc9b39277a6f0f026d25dc
parent8a90e0fd21f77e81abc1b5abab0eda05cc89f59b (diff)
configure: add check_inline_asm_flags()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rwxr-xr-xconfigure19
1 files changed, 19 insertions, 0 deletions
diff --git a/configure b/configure
index 3299b1bd11..c895b5035b 100755
--- a/configure
+++ b/configure
@@ -918,6 +918,25 @@ void foo(void){ __asm__ volatile($code); }
EOF
}
+check_inline_asm_flags(){
+ log check_inline_asm_flags "$@"
+ name="$1"
+ code="$2"
+ flags=''
+ shift 2
+ while [ "$1" != "" ]; do
+ append flags $1
+ shift
+ done;
+ disable $name
+ cat > $TMPC <<EOF
+void foo(void){ __asm__ volatile($code); }
+EOF
+ log_file $TMPC
+ check_cmd $cc $CPPFLAGS $CFLAGS $flags "$@" $CC_C $(cc_o $TMPO) $TMPC &&
+ enable $name && add_cflags $flags && add_asflags $flags && add_ldflags $flags
+}
+
check_insn(){
log check_insn "$@"
check_inline_asm ${1}_inline "\"$2\""