Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
31a53ab3
Commit
31a53ab3
authored
Oct 20, 2017
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
configure: Add check_as() helper function to simplify some expressions
parent
18dc1ff0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
19 deletions
+18
-19
configure
configure
+18
-19
No files found.
configure
View file @
31a53ab3
...
@@ -811,6 +811,17 @@ check_cmd(){
...
@@ -811,6 +811,17 @@ check_cmd(){
test_cmd
$@
&&
enable
$cmd
test_cmd
$@
&&
enable
$cmd
}
}
check_as
(){
log check_as
"
$@
"
name
=
$1
code
=
$2
shift
2
disable
$name
test_as
$@
<<
EOF
&& enable
$name
$code
EOF
}
check_inline_asm
(){
check_inline_asm
(){
log check_inline_asm
"
$@
"
log check_inline_asm
"
$@
"
name
=
"
$1
"
name
=
"
$1
"
...
@@ -825,7 +836,7 @@ EOF
...
@@ -825,7 +836,7 @@ EOF
check_insn
(){
check_insn
(){
log check_insn
"
$@
"
log check_insn
"
$@
"
check_inline_asm
${
1
}
_inline
"
$2
"
check_inline_asm
${
1
}
_inline
"
$2
"
echo
"
$2
"
| test_as
&&
enable
${
1
}
_external
||
disable
${
1
}
_external
check_as
${
1
}
_external
"
$2
"
}
}
test_x86asm
(){
test_x86asm
(){
...
@@ -4213,11 +4224,7 @@ check_gas() {
...
@@ -4213,11 +4224,7 @@ check_gas() {
m x
m x
EOF
EOF
# .altmacro is only used in arm asm
# .altmacro is only used in arm asm
!
enabled arm
||
test_as
<<
EOF
|| return 1
!
enabled arm
||
check_as gnu_as
".altmacro"
.altmacro
EOF
enable
gnu_as
return
0
}
}
if
enabled_any arm aarch64
||
enabled_all ppc altivec
&&
enabled asm
;
then
if
enabled_any arm aarch64
||
enabled_all ppc altivec
&&
enabled asm
;
then
...
@@ -4243,10 +4250,8 @@ if enabled_any arm aarch64 || enabled_all ppc altivec && enabled asm; then
...
@@ -4243,10 +4250,8 @@ if enabled_any arm aarch64 || enabled_all ppc altivec && enabled asm; then
$nogas
"GNU assembler not found, install/update gas-preprocessor"
$nogas
"GNU assembler not found, install/update gas-preprocessor"
fi
fi
test_as
<<
EOF
&& enable as_func
check_as as_func
".func test
.func test
.endfunc"
.endfunc
EOF
fi
fi
check_inline_asm inline_asm_labels
'"1:\n"'
check_inline_asm inline_asm_labels
'"1:\n"'
...
@@ -4297,18 +4302,12 @@ EOF
...
@@ -4297,18 +4302,12 @@ EOF
check_inline_asm asm_mod_q
'"add r0, %Q0, %R0" :: "r"((long long)0)'
check_inline_asm asm_mod_q
'"add r0, %Q0, %R0" :: "r"((long long)0)'
test_as
<<
EOF
&& enable as_arch_directive
check_as as_arch_directive
".arch armv7-a"
.arch armv7-a
check_as as_fpu_directive
".fpu neon"
EOF
test_as
<<
EOF
&& enable as_fpu_directive
.fpu neon
EOF
# llvm's integrated assembler supports .object_arch from llvm 3.5
# llvm's integrated assembler supports .object_arch from llvm 3.5
[
"
$objformat
"
=
elf32
]
||
[
"
$objformat
"
=
elf64
]
&&
[
"
$objformat
"
=
elf32
]
||
[
"
$objformat
"
=
elf64
]
&&
test_as
<<
EOF
&& enable as_object_arch
check_as as_object_arch
".object_arch armv4"
.object_arch armv4
EOF
# MS armasm fails to assemble our PIC constructs
# MS armasm fails to assemble our PIC constructs
[
$target_os
!=
win32
]
&&
enabled_all armv6t2 shared
!
pic
&&
enable_weak_pic
[
$target_os
!=
win32
]
&&
enabled_all armv6t2 shared
!
pic
&&
enable_weak_pic
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment