Mercurial > mplayer.hg
comparison configure @ 24351:5a92d4b9f1fb
Use -march=native (avail. since gcc 4.2) when possible
author | zuxy |
---|---|
date | Sat, 08 Sep 2007 18:04:47 +0000 |
parents | 23e69a6846ee |
children | 9ee30cbeff75 |
comparison
equal
deleted
inserted
replaced
24350:eb7b1f3327aa | 24351:5a92d4b9f1fb |
---|---|
1768 echocheck "GCC & CPU optimization abilities" | 1768 echocheck "GCC & CPU optimization abilities" |
1769 cat > $TMPC << EOF | 1769 cat > $TMPC << EOF |
1770 int main(void) { return 0; } | 1770 int main(void) { return 0; } |
1771 EOF | 1771 EOF |
1772 if test "$_runtime_cpudetection" = no ; then | 1772 if test "$_runtime_cpudetection" = no ; then |
1773 cc_check -march=native && proc=native | |
1773 if test "$proc" = "k8"; then | 1774 if test "$proc" = "k8"; then |
1774 cc_check -march=$proc $cpuopt=$proc || proc=athlon-xp | 1775 cc_check -march=$proc $cpuopt=$proc || proc=athlon-xp |
1775 fi | 1776 fi |
1776 if test "$proc" = "athlon-xp"; then | 1777 if test "$proc" = "athlon-xp"; then |
1777 cc_check -march=$proc $cpuopt=$proc || proc=athlon | 1778 cc_check -march=$proc $cpuopt=$proc || proc=athlon |
1913 cat > $TMPC << EOF | 1914 cat > $TMPC << EOF |
1914 int main(void) { return 0; } | 1915 int main(void) { return 0; } |
1915 EOF | 1916 EOF |
1916 # This is a stripped-down version of the i386 fallback. | 1917 # This is a stripped-down version of the i386 fallback. |
1917 if test "$_runtime_cpudetection" = no ; then | 1918 if test "$_runtime_cpudetection" = no ; then |
1919 cc_check -march=native && proc=native | |
1918 # --- AMD processors --- | 1920 # --- AMD processors --- |
1919 if test "$proc" = "k8"; then | 1921 if test "$proc" = "k8"; then |
1920 cc_check -march=$proc $cpuopt=$proc || proc=athlon-xp | 1922 cc_check -march=$proc $cpuopt=$proc || proc=athlon-xp |
1921 fi | 1923 fi |
1922 # This will fail if gcc version < 3.3, which is ok because earlier | 1924 # This will fail if gcc version < 3.3, which is ok because earlier |