[MPlayer-dev-eng] [PATCH] Add support for -m{arch,cpu}=pentium{3,4} in GCC 3.1

Luca Barbieri ldb at ldb.ods.org
Mon Jun 10 20:41:18 CEST 2002


GCC 3.1 supports pentium3 and pentium4 as arguments to -march and -mcpu
(it also supports pentium-mmx and several AMD processors, but it isn't
obvious how to detect them from /proc/cpuinfo).
We might also want to consider using the new optimization options like
-mfpmath.

--- /usr/local/src/MPlayer-0.90pre5/configure	Sat Jun  8 00:41:25 2002
+++ MPlayer-0.90pre5/configure	Mon Jun 10 14:36:54 2002
@@ -584,7 +584,10 @@
     3) proc=i386 iproc=386 ;;
     4) proc=i486 iproc=486 ;;
     5) proc=pentium iproc=586 ;;
-    6|15) proc=i686 iproc=686 ;;
+    6|15) proc=i686 iproc=686
+	if expr "$pname" : " *\(Pentium III\( .*\)\?\)$" >/dev/null; then proc=pentium3; fi
+	if expr "$pname" : " *\(Pentium IV\( .*\)\?\)$" >/dev/null || expr "$pname" : " *\(Pentium 4\( .*\)\?\)$" >/dev/null; then proc=pentium4; fi
+    ;;
     *) proc=pentium iproc=586 ;;
     esac
     ;;
@@ -620,6 +623,12 @@
     if test "$proc" = "k5" ; then
       cc_check -march=$proc -mcpu=$proc  || proc=pentium
     fi
+    if test "$proc" = "pentium3" ; then
+      cc_check -march=$proc -mcpu=$proc  || proc=pentiumpro
+    fi
+    if test "$proc" = "pentium4" ; then
+      cc_check -march=$proc -mcpu=$proc  || proc=pentiumpro
+    fi            
     if test "$proc" = "i686" ; then
       cc_check -march=$proc -mcpu=$proc  || proc=pentiumpro
     fi

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20020610/ce005924/attachment.pgp>


More information about the MPlayer-dev-eng mailing list