Commit 51bf3f5d authored by mru's avatar mru

configure: split $cpu handling by arch

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@21296 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 3aaf7788
...@@ -1812,8 +1812,11 @@ case "$arch" in ...@@ -1812,8 +1812,11 @@ case "$arch" in
esac esac
is_in $arch $ARCH_LIST || echo "WARNING: unknown arch $arch" is_in $arch $ARCH_LIST || echo "WARNING: unknown arch $arch"
enable $arch
# Add processor-specific flags # Add processor-specific flags
if enabled ppc; then
case $cpu in case $cpu in
601|ppc601|PowerPC601) 601|ppc601|PowerPC601)
cpuflags="-mcpu=601" cpuflags="-mcpu=601"
...@@ -1840,6 +1843,11 @@ case $cpu in ...@@ -1840,6 +1843,11 @@ case $cpu in
cpuflags="-mcpu=cell" cpuflags="-mcpu=cell"
enable ldbrx enable ldbrx
;; ;;
esac
elif enabled x86; then
case $cpu in
i[345]86|pentium) i[345]86|pentium)
cpuflags="-march=$cpu" cpuflags="-march=$cpu"
disable mmx disable mmx
...@@ -1861,9 +1869,19 @@ case $cpu in ...@@ -1861,9 +1869,19 @@ case $cpu in
enable cmov enable cmov
disable fast_cmov disable fast_cmov
;; ;;
esac
elif enabled sparc; then
case $cpu in
sparc64) sparc64)
cpuflags="-mcpu=v9" cpuflags="-mcpu=v9"
;; ;;
esac
elif enabled arm; then
case $cpu in
arm11*|cortex*) arm11*|cortex*)
cpuflags="-mcpu=$cpu" cpuflags="-mcpu=$cpu"
;; ;;
...@@ -1876,15 +1894,35 @@ case $cpu in ...@@ -1876,15 +1894,35 @@ case $cpu in
arm*) arm*)
cpuflags="-mcpu=$cpu" cpuflags="-mcpu=$cpu"
;; ;;
esac
elif enabled alpha; then
case $cpu in
ev4|ev45|ev5|ev56|pca56|ev6|ev67) ev4|ev45|ev5|ev56|pca56|ev6|ev67)
enabled ccc && cpuflags="-arch $cpu" || cpuflags="-mcpu=$cpu" enabled ccc && cpuflags="-arch $cpu" || cpuflags="-mcpu=$cpu"
;; ;;
esac
elif enabled bfin; then
case $cpu in
bf*) bf*)
cpuflags="-mcpu=$cpu" cpuflags="-mcpu=$cpu"
;; ;;
esac
elif enabled mips; then
case $cpu in
mips*|[45]k*|[237]4k*|m4k|r*000|loongson2[ef]) mips*|[45]k*|[237]4k*|m4k|r*000|loongson2[ef])
cpuflags="-march=$cpu" cpuflags="-march=$cpu"
;; ;;
esac
elif enabled avr32; then
case $cpu in
ap7[02]0[0-2]) ap7[02]0[0-2])
subarch="avr32_ap" subarch="avr32_ap"
cpuflags="-mpart=$cpu" cpuflags="-mpart=$cpu"
...@@ -1901,13 +1939,16 @@ case $cpu in ...@@ -1901,13 +1939,16 @@ case $cpu in
subarch="avr32_uc" subarch="avr32_uc"
cpuflags="-march=$cpu" cpuflags="-march=$cpu"
;; ;;
generic)
;;
*)
echo "WARNING: Unknown CPU \"$cpu\", ignored."
;;
esac esac
else
if test "$cpu" != generic; then
echo "WARNING: Unknown CPU \"$cpu\", ignored."
fi
fi
add_cflags $cpuflags add_cflags $cpuflags
add_asflags $cpuflags add_asflags $cpuflags
...@@ -1950,7 +1991,7 @@ EOF ...@@ -1950,7 +1991,7 @@ EOF
;; ;;
esac esac
enable $arch $subarch enable $subarch
enabled spic && enable pic enabled spic && enable pic
check_cpp_condition stdlib.h "defined(__PIC__) || defined(__pic__) || defined(PIC)" && enable pic check_cpp_condition stdlib.h "defined(__PIC__) || defined(__pic__) || defined(PIC)" && enable pic
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment