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
d0c6d424
Commit
d0c6d424
authored
Jul 18, 2012
by
Mans Rullgard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
configure: move flag filtering functions out of if/else blocks
Signed-off-by:
Mans Rullgard
<
mans@mansr.com
>
parent
b2668c85
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
69 additions
and
66 deletions
+69
-66
configure
configure
+69
-66
No files found.
configure
View file @
d0c6d424
...
...
@@ -1960,6 +1960,75 @@ EOF
die
"Sanity test failed."
fi
pgi_flags
(){
for
flag
;
do
case
$flag
in
-fomit-frame-pointer
)
echo
-Mnoframe
;;
-g
)
echo
-gopt
;;
*
)
echo
$flag
;;
esac
done
}
suncc_flags
(){
for
flag
;
do
case
$flag
in
-march
=
*
|
-mcpu
=
*
)
case
"
${
flag
#*=
}
"
in
native
)
echo
-xtarget
=
native
;;
v9|niagara
)
echo
-xarch
=
sparc
;;
ultrasparc
)
echo
-xarch
=
sparcvis
;;
ultrasparc3|niagara2
)
echo
-xarch
=
sparcvis2
;;
i586|pentium
)
echo
-xchip
=
pentium
;;
i686|pentiumpro|pentium2
)
echo
-xtarget
=
pentium_pro
;;
pentium3
*
|
c3-2
)
echo
-xtarget
=
pentium3
;;
pentium-m
)
echo
-xarch
=
sse2
-xchip
=
pentium3
;;
pentium4
*
)
echo
-xtarget
=
pentium4
;;
prescott|nocona
)
echo
-xarch
=
sse3
-xchip
=
pentium4
;;
*
-sse3
)
echo
-xarch
=
sse3
;;
core2
)
echo
-xarch
=
ssse3
-xchip
=
core2
;;
amdfam10|barcelona
)
echo
-xarch
=
sse4_1
;;
athlon-4|athlon-[mx]p
)
echo
-xarch
=
ssea
;;
k8|opteron|athlon64|athlon-fx
)
echo
-xarch
=
sse2a
;;
athlon
*
)
echo
-xarch
=
pentium_proa
;;
esac
;;
-std
=
c99
)
echo
-xc99
;;
-fomit-frame-pointer
)
echo
-xregs
=
frameptr
;;
-fPIC
)
echo
-KPIC
-xcode
=
pic32
;;
-W
*
,
*
)
echo
$flag
;;
-f
*
-
*
|
-W
*
)
;;
*
)
echo
$flag
;;
esac
done
}
tms470_flags
(){
for
flag
;
do
case
$flag
in
-march
=
*
|
-mcpu
=
*
)
case
"
${
flag
#*=
}
"
in
armv7-a|cortex-a
*
)
echo
-mv
=
7a8
;;
armv7-r|cortex-r
*
)
echo
-mv
=
7r4
;;
armv7-m|cortex-m
*
)
echo
-mv
=
7m3
;;
armv6
*
|
arm11
*
)
echo
-mv
=
6
;;
armv5
*
e|arm[79]
*
e
*
|
arm9[24]6
*
|
arm96
*
|
arm102[26]
)
echo
-mv
=
5e
;;
armv4
*
|
arm7
*
|
arm9[24]
*
)
echo
-mv
=
4
;;
esac
;;
-mfpu
=
neon
)
echo
--float_support
=
vfpv3
--neon
;;
-mfpu
=
vfp
)
echo
--float_support
=
vfpv2
;;
-mfpu
=
vfpv3
)
echo
--float_support
=
vfpv3
;;
-msoft-float
)
echo
--float_support
=
vfplib
;;
-O
[
0-3]|-mf
=
*
)
echo
$flag
;;
-g
)
echo
-g
-mn
;;
-pds
=
*
)
echo
$flag
;;
esac
done
}
if
$cc
-v
2>&1 |
grep
-q
'^gcc.*LLVM'
;
then
cc_type
=
llvm_gcc
gcc_extra_ver
=
$(
expr
"
$(
$cc
--version
|
head
-n1
)
"
:
'.*\((.*)\)'
)
...
...
@@ -2035,30 +2104,6 @@ elif $cc -version 2>/dev/null | grep -q TMS470; then
cflags_speed
=
'-O3 -mf=5'
cflags_size
=
'-O3 -mf=2'
cflags_filter
=
tms470_flags
tms470_flags
(){
for
flag
;
do
case
$flag
in
-march
=
*
|
-mcpu
=
*
)
case
"
${
flag
#*=
}
"
in
armv7-a|cortex-a
*
)
echo
-mv
=
7a8
;;
armv7-r|cortex-r
*
)
echo
-mv
=
7r4
;;
armv7-m|cortex-m
*
)
echo
-mv
=
7m3
;;
armv6
*
|
arm11
*
)
echo
-mv
=
6
;;
armv5
*
e|arm[79]
*
e
*
|
arm9[24]6
*
|
arm96
*
|
arm102[26]
)
echo
-mv
=
5e
;;
armv4
*
|
arm7
*
|
arm9[24]
*
)
echo
-mv
=
4
;;
esac
;;
-mfpu
=
neon
)
echo
--float_support
=
vfpv3
--neon
;;
-mfpu
=
vfp
)
echo
--float_support
=
vfpv2
;;
-mfpu
=
vfpv3
)
echo
--float_support
=
vfpv3
;;
-msoft-float
)
echo
--float_support
=
vfplib
;;
-O
[
0-3]|-mf
=
*
)
echo
$flag
;;
-g
)
echo
-g
-mn
;;
-pds
=
*
)
echo
$flag
;;
esac
done
}
elif
$cc
-v
2>&1 |
grep
-q
clang
;
then
cc_type
=
clang
cc_ident
=
$(
$cc
--version
|
head
-n1
)
...
...
@@ -2075,39 +2120,6 @@ elif $cc -V 2>&1 | grep -q Sun; then
cflags_speed
=
'-O5'
cflags_size
=
'-O5 -xspace'
cflags_filter
=
suncc_flags
suncc_flags
(){
for
flag
;
do
case
$flag
in
-march
=
*
|
-mcpu
=
*
)
case
"
${
flag
#*=
}
"
in
native
)
echo
-xtarget
=
native
;;
v9|niagara
)
echo
-xarch
=
sparc
;;
ultrasparc
)
echo
-xarch
=
sparcvis
;;
ultrasparc3|niagara2
)
echo
-xarch
=
sparcvis2
;;
i586|pentium
)
echo
-xchip
=
pentium
;;
i686|pentiumpro|pentium2
)
echo
-xtarget
=
pentium_pro
;;
pentium3
*
|
c3-2
)
echo
-xtarget
=
pentium3
;;
pentium-m
)
echo
-xarch
=
sse2
-xchip
=
pentium3
;;
pentium4
*
)
echo
-xtarget
=
pentium4
;;
prescott|nocona
)
echo
-xarch
=
sse3
-xchip
=
pentium4
;;
*
-sse3
)
echo
-xarch
=
sse3
;;
core2
)
echo
-xarch
=
ssse3
-xchip
=
core2
;;
amdfam10|barcelona
)
echo
-xarch
=
sse4_1
;;
athlon-4|athlon-[mx]p
)
echo
-xarch
=
ssea
;;
k8|opteron|athlon64|athlon-fx
)
echo
-xarch
=
sse2a
;;
athlon
*
)
echo
-xarch
=
pentium_proa
;;
esac
;;
-std
=
c99
)
echo
-xc99
;;
-fomit-frame-pointer
)
echo
-xregs
=
frameptr
;;
-fPIC
)
echo
-KPIC
-xcode
=
pic32
;;
-W
*
,
*
)
echo
$flag
;;
-f
*
-
*
|
-W
*
)
;;
*
)
echo
$flag
;;
esac
done
}
elif
$cc
-v
2>&1 |
grep
-q
'PathScale\|Path64'
;
then
cc_type
=
pathscale
cc_ident
=
$(
$cc
-v
2>&1 |
head
-n1
|
tr
-d
:
)
...
...
@@ -2132,15 +2144,6 @@ elif $cc -V 2>&1 | grep -q Portland; then
cflags_size
=
"-O2 -Munroll=c:1
$opt_common
"
cflags_noopt
=
"-O1"
cflags_filter
=
pgi_flags
pgi_flags
(){
for
flag
;
do
case
$flag
in
-fomit-frame-pointer
)
echo
-Mnoframe
;;
-g
)
echo
-gopt
;;
*
)
echo
$flag
;;
esac
done
}
fi
test
-n
"
$cc_type
"
&&
enable
$cc_type
||
...
...
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