From e939cedd9d8513b09a767b9e4060adc03fd6a604 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5ns=20Rullg=C3=A5rd?= Date: Mon, 18 Jan 2010 21:05:01 +0000 Subject: [PATCH] configure: simplify $arch handling Originally committed as revision 21295 to svn://svn.ffmpeg.org/ffmpeg/trunk --- configure | 139 +++++++++++++++++++++++------------------------------- 1 file changed, 60 insertions(+), 79 deletions(-) diff --git a/configure b/configure index ea249e12b4..62f9bf2544 100755 --- a/configure +++ b/configure @@ -1113,6 +1113,7 @@ ppc4xx_deps="ppc" vis_deps="sparc" +x86_64_select="cmov fast_cmov" amd3dnow_deps="mmx" amd3dnowext_deps="amd3dnow" mmx_deps="x86" @@ -1120,7 +1121,9 @@ mmx2_deps="mmx" sse_deps="mmx" ssse3_deps="sse" +fast_64bit_if_any="alpha ia64 mips64 parisc64 ppc64 sparc64 x86_64" fast_clz_if_any="alpha armv5te avr32 mips ppc x86" +fast_unaligned_if_any="armv6 ppc x86" need_memalign="altivec neon sse" inline_asm_deps="!tms470" @@ -1767,6 +1770,49 @@ if test "$cpu" = host; then test "${cpu:-host}" = host && die "--cpu=host not supported with compiler $cc" fi +# Deal with common $arch aliases +case "$arch" in + arm*) + arch="arm" + ;; + mips|mipsel|IP*) + arch="mips" + ;; + mips64) + arch="mips" + subarch="mips64" + ;; + parisc|hppa) + arch="parisc" + ;; + parisc64|hppa64) + arch="parisc" + subarch="parisc64" + ;; + "Power Macintosh"|ppc|powerpc) + arch="ppc" + ;; + ppc64) + arch="ppc" + subarch="ppc64" + ;; + s390|s390x) + arch="s390" + ;; + sh4|sh) + arch="sh4" + ;; + sun4u|sparc64) + arch="sparc" + subarch="sparc64" + ;; + i[3-6]86|i86pc|BePC|x86_64|amd64) + arch="x86" + ;; +esac + +is_in $arch $ARCH_LIST || echo "WARNING: unknown arch $arch" + # Add processor-specific flags case $cpu in 601|ppc601|PowerPC601) @@ -1820,11 +1866,9 @@ case $cpu in ;; arm11*|cortex*) cpuflags="-mcpu=$cpu" - enable fast_unaligned ;; armv[67]*) cpuflags="-march=$cpu" - enable fast_unaligned ;; armv*) cpuflags="-march=$cpu" @@ -1892,90 +1936,18 @@ EOF check_host_cflags -std=c99 case "$arch" in - alpha) - arch="alpha" - enable fast_64bit - check_cflags -mieee - spic=$shared - ;; - arm|armv[4567]*l) - arch="arm" - ;; - avr32) - ;; - bfin) - arch="bfin" - ;; - ia64) - arch="ia64" - enable fast_64bit - spic=$shared - # HACK: currently fails to build if .bss is > 4MB and shared libs are built - enabled shared && enable_weak hardcoded_tables - ;; - m68k) - arch="m68k" - ;; - mips|mipsel|IP*) - arch="mips" - spic=$shared - ;; - mips64) - arch="mips" - subarch="mips64" - enable fast_64bit - spic=$shared - ;; - parisc|hppa) - arch="parisc" - spic=$shared - ;; - parisc64|hppa64) - arch="parisc" - enable fast_64bit - spic=$shared - ;; - "Power Macintosh"|ppc|powerpc) - arch="ppc" - enable fast_unaligned - ;; - ppc64) - arch="ppc" - subarch="ppc64" - enable fast_64bit - enable fast_unaligned - ;; - s390|s390x) - arch="s390" - ;; - sh4|sh) - arch="sh4" - ;; - sparc) - arch="sparc" + alpha|ia64|mips|parisc|sparc) spic=$shared ;; - sun4u|sparc64) - arch="sparc" - subarch="sparc64" - enable fast_64bit - spic=$shared - ;; - i386|i486|i586|i686|i86pc|BePC|x86_64|amd64) - arch="x86" + x86) subarch="x86_32" - enable fast_unaligned - check_cc < 4MB and shared libs are built + enabled shared && enable_weak hardcoded_tables + elif enabled mips; then check_asm loongson '"dmult.g $1, $2, $3"' -- GitLab