Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
fa0912fe
Commit
fa0912fe
authored
15 years ago
by
Måns Rullgård
Browse files
Options
Downloads
Patches
Plain Diff
configure: group all cpu-specific tests together
Originally committed as revision 19485 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
b06da172
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
configure
+49
-52
49 additions, 52 deletions
configure
with
49 additions
and
52 deletions
configure
+
49
−
52
View file @
fa0912fe
...
@@ -1996,7 +1996,55 @@ check_cc <<EOF && enable inline_asm
...
@@ -1996,7 +1996,55 @@ check_cc <<EOF && enable inline_asm
void foo(void) { __asm__ volatile ("" ::); }
void foo(void) { __asm__ volatile ("" ::); }
EOF
EOF
if
enabled x86
;
then
if
enabled arm
;
then
check_ld
<<
EOF
&& enable vfp_args
__asm__ (".eabi_attribute 28, 1");
int main(void) { return 0; }
EOF
# We have to check if pld is a nop and disable it.
check_asm pld
'"pld [r0]"'
enabled armv5te
&&
check_asm armv5te
'"qadd r0, r0, r0"'
enabled armv6
&&
check_asm armv6
'"sadd16 r0, r0, r0"'
enabled armv6t2
&&
check_asm armv6t2
'"movt r0, #0"'
enabled armvfp
&&
check_asm armvfp
'"fadds s0, s0, s0"'
enabled iwmmxt
&&
check_asm iwmmxt
'"wunpckelub wr6, wr4"'
enabled neon
&&
check_asm neon
'"vadd.i16 q0, q0, q0"'
elif
enabled mips
;
then
check_asm loongson
'"dmult.g $1, $2, $3"'
enabled mmi
&&
check_asm mmi
'"lq $2, 0($2)"'
elif
enabled ppc
;
then
check_asm dcbzl
'"dcbzl 0, 1"'
check_asm ppc4xx
'"maclhw r10, r11, r12"'
check_asm xform_asm
'"lwzx 0, %y0" :: "Z"(*(int*)0)'
# AltiVec flags: The FSF version of GCC differs from the Apple version
if
enabled altivec
;
then
check_cflags
-maltivec
-mabi
=
altivec
&&
{
check_header altivec.h
&&
inc_altivec_h
=
"#include <altivec.h>"
;
}
||
check_cflags
-faltivec
# check if our compiler supports Motorola AltiVec C API
check_cc
<<
EOF
|| disable altivec
$inc_altivec_h
int main(void) {
vector signed int v1, v2, v3;
v1 = vec_add(v2,v3);
return 0;
}
EOF
# check if our compiler supports braces for vector declarations
check_cc
<<
EOF
|| die "You need a compiler that supports {} in AltiVec vector declarations."
$inc_altivec_h
int main (void) { (vector int) {1}; return 0; }
EOF
fi
elif
enabled sparc
;
then
enabled vis
&&
check_asm vis
'"pdist %f0, %f0, %f0"'
-mcpu
=
ultrasparc
&&
add_cflags
-mcpu
=
ultrasparc
-mtune
=
ultrasparc
elif
enabled x86
;
then
# check whether EBP is available on x86
# check whether EBP is available on x86
# As 'i' is stored on the stack, this program will crash
# As 'i' is stored on the stack, this program will crash
# if the base pointer is used to access it because the
# if the base pointer is used to access it because the
...
@@ -2041,57 +2089,6 @@ EOF
...
@@ -2041,57 +2089,6 @@ EOF
disabled yasm
||
{
check_yasm
"pabsw xmm0, xmm0"
&&
enable
yasm
;
}
disabled yasm
||
{
check_yasm
"pabsw xmm0, xmm0"
&&
enable
yasm
;
}
fi
fi
# check for assembler specific support
enabled arm
&&
check_ld
<<
EOF
&& enable vfp_args
__asm__ (".eabi_attribute 28, 1");
int main(void) { return 0; }
EOF
enabled mips
&&
check_asm loongson
'"dmult.g $1, $2, $3"'
enabled ppc
&&
check_asm dcbzl
'"dcbzl 0, 1"'
enabled ppc
&&
check_asm ppc4xx
'"maclhw r10, r11, r12"'
enabled ppc
&&
check_asm xform_asm
'"lwzx 0, %y0" :: "Z"(*(int*)0)'
# check for SIMD availability
# AltiVec flags: The FSF version of GCC differs from the Apple version
if
enabled altivec
;
then
check_cflags
-maltivec
-mabi
=
altivec
&&
{
check_header altivec.h
&&
inc_altivec_h
=
"#include <altivec.h>"
;
}
||
check_cflags
-faltivec
# check if our compiler supports Motorola AltiVec C API
check_cc
<<
EOF
|| disable altivec
$inc_altivec_h
int main(void) {
vector signed int v1, v2, v3;
v1 = vec_add(v2,v3);
return 0;
}
EOF
# check if our compiler supports braces for vector declarations
check_cc
<<
EOF
|| die "You need a compiler that supports {} in AltiVec vector declarations."
$inc_altivec_h
int main (void) { (vector int) {1}; return 0; }
EOF
fi
# We have to check if pld is a nop and disable it.
enabled arm
&&
check_asm pld
'"pld [r0]"'
enabled armv5te
&&
check_asm armv5te
'"qadd r0, r0, r0"'
enabled armv6
&&
check_asm armv6
'"sadd16 r0, r0, r0"'
enabled armv6t2
&&
check_asm armv6t2
'"movt r0, #0"'
enabled armvfp
&&
check_asm armvfp
'"fadds s0, s0, s0"'
enabled iwmmxt
&&
check_asm iwmmxt
'"wunpckelub wr6, wr4"'
enabled mmi
&&
check_asm mmi
'"lq $2, 0($2)"'
enabled neon
&&
check_asm neon
'"vadd.i16 q0, q0, q0"'
enabled vis
&&
check_asm vis
'"pdist %f0, %f0, %f0"'
-mcpu
=
ultrasparc
enabled vis
&&
add_cflags
-mcpu
=
ultrasparc
-mtune
=
ultrasparc
check_cc
<<
EOF
|| die "endian test failed"
check_cc
<<
EOF
|| die "endian test failed"
unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E';
unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E';
EOF
EOF
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment