Originally committed as revision 21295 to svn://svn.ffmpeg.org/ffmpeg/trunk
Måns Rullgård authored on 2010/01/19 06:05:01... | ... |
@@ -1113,6 +1113,7 @@ ppc4xx_deps="ppc" |
1113 | 1113 |
|
1114 | 1114 |
vis_deps="sparc" |
1115 | 1115 |
|
1116 |
+x86_64_select="cmov fast_cmov" |
|
1116 | 1117 |
amd3dnow_deps="mmx" |
1117 | 1118 |
amd3dnowext_deps="amd3dnow" |
1118 | 1119 |
mmx_deps="x86" |
... | ... |
@@ -1120,7 +1121,9 @@ mmx2_deps="mmx" |
1120 | 1120 |
sse_deps="mmx" |
1121 | 1121 |
ssse3_deps="sse" |
1122 | 1122 |
|
1123 |
+fast_64bit_if_any="alpha ia64 mips64 parisc64 ppc64 sparc64 x86_64" |
|
1123 | 1124 |
fast_clz_if_any="alpha armv5te avr32 mips ppc x86" |
1125 |
+fast_unaligned_if_any="armv6 ppc x86" |
|
1124 | 1126 |
|
1125 | 1127 |
need_memalign="altivec neon sse" |
1126 | 1128 |
inline_asm_deps="!tms470" |
... | ... |
@@ -1767,6 +1770,49 @@ if test "$cpu" = host; then |
1767 | 1767 |
test "${cpu:-host}" = host && die "--cpu=host not supported with compiler $cc" |
1768 | 1768 |
fi |
1769 | 1769 |
|
1770 |
+# Deal with common $arch aliases |
|
1771 |
+case "$arch" in |
|
1772 |
+ arm*) |
|
1773 |
+ arch="arm" |
|
1774 |
+ ;; |
|
1775 |
+ mips|mipsel|IP*) |
|
1776 |
+ arch="mips" |
|
1777 |
+ ;; |
|
1778 |
+ mips64) |
|
1779 |
+ arch="mips" |
|
1780 |
+ subarch="mips64" |
|
1781 |
+ ;; |
|
1782 |
+ parisc|hppa) |
|
1783 |
+ arch="parisc" |
|
1784 |
+ ;; |
|
1785 |
+ parisc64|hppa64) |
|
1786 |
+ arch="parisc" |
|
1787 |
+ subarch="parisc64" |
|
1788 |
+ ;; |
|
1789 |
+ "Power Macintosh"|ppc|powerpc) |
|
1790 |
+ arch="ppc" |
|
1791 |
+ ;; |
|
1792 |
+ ppc64) |
|
1793 |
+ arch="ppc" |
|
1794 |
+ subarch="ppc64" |
|
1795 |
+ ;; |
|
1796 |
+ s390|s390x) |
|
1797 |
+ arch="s390" |
|
1798 |
+ ;; |
|
1799 |
+ sh4|sh) |
|
1800 |
+ arch="sh4" |
|
1801 |
+ ;; |
|
1802 |
+ sun4u|sparc64) |
|
1803 |
+ arch="sparc" |
|
1804 |
+ subarch="sparc64" |
|
1805 |
+ ;; |
|
1806 |
+ i[3-6]86|i86pc|BePC|x86_64|amd64) |
|
1807 |
+ arch="x86" |
|
1808 |
+ ;; |
|
1809 |
+esac |
|
1810 |
+ |
|
1811 |
+is_in $arch $ARCH_LIST || echo "WARNING: unknown arch $arch" |
|
1812 |
+ |
|
1770 | 1813 |
# Add processor-specific flags |
1771 | 1814 |
case $cpu in |
1772 | 1815 |
601|ppc601|PowerPC601) |
... | ... |
@@ -1820,11 +1866,9 @@ case $cpu in |
1820 | 1820 |
;; |
1821 | 1821 |
arm11*|cortex*) |
1822 | 1822 |
cpuflags="-mcpu=$cpu" |
1823 |
- enable fast_unaligned |
|
1824 | 1823 |
;; |
1825 | 1824 |
armv[67]*) |
1826 | 1825 |
cpuflags="-march=$cpu" |
1827 |
- enable fast_unaligned |
|
1828 | 1826 |
;; |
1829 | 1827 |
armv*) |
1830 | 1828 |
cpuflags="-march=$cpu" |
... | ... |
@@ -1892,90 +1936,18 @@ EOF |
1892 | 1892 |
check_host_cflags -std=c99 |
1893 | 1893 |
|
1894 | 1894 |
case "$arch" in |
1895 |
- alpha) |
|
1896 |
- arch="alpha" |
|
1897 |
- enable fast_64bit |
|
1898 |
- check_cflags -mieee |
|
1899 |
- spic=$shared |
|
1900 |
- ;; |
|
1901 |
- arm|armv[4567]*l) |
|
1902 |
- arch="arm" |
|
1903 |
- ;; |
|
1904 |
- avr32) |
|
1905 |
- ;; |
|
1906 |
- bfin) |
|
1907 |
- arch="bfin" |
|
1908 |
- ;; |
|
1909 |
- ia64) |
|
1910 |
- arch="ia64" |
|
1911 |
- enable fast_64bit |
|
1912 |
- spic=$shared |
|
1913 |
- # HACK: currently fails to build if .bss is > 4MB and shared libs are built |
|
1914 |
- enabled shared && enable_weak hardcoded_tables |
|
1915 |
- ;; |
|
1916 |
- m68k) |
|
1917 |
- arch="m68k" |
|
1918 |
- ;; |
|
1919 |
- mips|mipsel|IP*) |
|
1920 |
- arch="mips" |
|
1921 |
- spic=$shared |
|
1922 |
- ;; |
|
1923 |
- mips64) |
|
1924 |
- arch="mips" |
|
1925 |
- subarch="mips64" |
|
1926 |
- enable fast_64bit |
|
1927 |
- spic=$shared |
|
1928 |
- ;; |
|
1929 |
- parisc|hppa) |
|
1930 |
- arch="parisc" |
|
1931 |
- spic=$shared |
|
1932 |
- ;; |
|
1933 |
- parisc64|hppa64) |
|
1934 |
- arch="parisc" |
|
1935 |
- enable fast_64bit |
|
1936 |
- spic=$shared |
|
1937 |
- ;; |
|
1938 |
- "Power Macintosh"|ppc|powerpc) |
|
1939 |
- arch="ppc" |
|
1940 |
- enable fast_unaligned |
|
1941 |
- ;; |
|
1942 |
- ppc64) |
|
1943 |
- arch="ppc" |
|
1944 |
- subarch="ppc64" |
|
1945 |
- enable fast_64bit |
|
1946 |
- enable fast_unaligned |
|
1947 |
- ;; |
|
1948 |
- s390|s390x) |
|
1949 |
- arch="s390" |
|
1950 |
- ;; |
|
1951 |
- sh4|sh) |
|
1952 |
- arch="sh4" |
|
1953 |
- ;; |
|
1954 |
- sparc) |
|
1955 |
- arch="sparc" |
|
1895 |
+ alpha|ia64|mips|parisc|sparc) |
|
1956 | 1896 |
spic=$shared |
1957 | 1897 |
;; |
1958 |
- sun4u|sparc64) |
|
1959 |
- arch="sparc" |
|
1960 |
- subarch="sparc64" |
|
1961 |
- enable fast_64bit |
|
1962 |
- spic=$shared |
|
1963 |
- ;; |
|
1964 |
- i386|i486|i586|i686|i86pc|BePC|x86_64|amd64) |
|
1965 |
- arch="x86" |
|
1898 |
+ x86) |
|
1966 | 1899 |
subarch="x86_32" |
1967 |
- enable fast_unaligned |
|
1968 |
- check_cc <<EOF && enable fast_64bit && subarch="x86_64" && spic=$shared |
|
1900 |
+ check_cc <<EOF && subarch="x86_64" |
|
1969 | 1901 |
int test[(int)sizeof(char*) - 7]; |
1970 | 1902 |
EOF |
1971 | 1903 |
if test "$subarch" = "x86_64"; then |
1972 |
- enable cmov |
|
1973 |
- enable fast_cmov |
|
1904 |
+ spic=$shared |
|
1974 | 1905 |
fi |
1975 | 1906 |
;; |
1976 |
- *) |
|
1977 |
- arch="unknown" |
|
1978 |
- ;; |
|
1979 | 1907 |
esac |
1980 | 1908 |
|
1981 | 1909 |
enable $arch $subarch |
... | ... |
@@ -2242,7 +2214,11 @@ unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E'; |
2242 | 2242 |
EOF |
2243 | 2243 |
od -A n -t x1 $TMPO | grep -q '42 *49 *47 *45' && enable bigendian |
2244 | 2244 |
|
2245 |
-if enabled arm; then |
|
2245 |
+if enabled alpha; then |
|
2246 |
+ |
|
2247 |
+ check_cflags -mieee |
|
2248 |
+ |
|
2249 |
+elif enabled arm; then |
|
2246 | 2250 |
|
2247 | 2251 |
check_cflags -marm |
2248 | 2252 |
|
... | ... |
@@ -2263,6 +2239,11 @@ EOF |
2263 | 2263 |
|
2264 | 2264 |
enabled_all armv6t2 shared !pic && enable_pic |
2265 | 2265 |
|
2266 |
+elif enabled ia64; then |
|
2267 |
+ |
|
2268 |
+ # HACK: currently fails to build if .bss is > 4MB and shared libs are built |
|
2269 |
+ enabled shared && enable_weak hardcoded_tables |
|
2270 |
+ |
|
2266 | 2271 |
elif enabled mips; then |
2267 | 2272 |
|
2268 | 2273 |
check_asm loongson '"dmult.g $1, $2, $3"' |