[MPlayer-dev-eng] [PATCH] improve PowerPC detection and CFLAGS in configure

Dominik 'Rathann' Mierzejewski dominik at rangers.eu.org
Sat Feb 24 20:23:20 CET 2007


Please consider the following patch. It is currently awaiting testing by
Patrice Bouchand in mplayer-users.

I have checked GCC docs and found that only GCC 3.4.x and above support
this target.

What do you think about adding "generic" optimization flags, like
-mcpu=common for unknown PPC CPUs? Obviously this would need to be
benchmarked first. I'm also thinking of (undocumented) -mtune=generic for
GCC 4.1.x instead of -mtune=i686 as a generic/fallback case.

Regards,
R.

-- 
MPlayer developer and RPMs maintainer: http://mplayerhq.hu http://rpm.livna.org
There should be a science of discontent. People need hard times and
oppression to develop psychic muscles.
	-- from "Collected Sayings of Muad'Dib" by the Princess Irulan
-------------- next part --------------
Index: configure
===================================================================
--- configure	(revision 22335)
+++ configure	(working copy)
@@ -1937,6 +1937,14 @@
 		*) ;;
 	    esac
 	fi
+	# gcc 3.4 and up supports 440*
+	if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "4" || test "$_cc_major" -ge "4"; then
+	    case "$proc" in
+                440EP) _march='-mcpu=440fp' _mcpu='-mtune=440fp' ;;
+                440G*) _march='-mcpu=440' _mcpu='-mtune=440' ;;
+		*) ;;
+	    esac
+	fi
 	# gcc 4.0 and up supports POWER5
 	if test "$_cc_major" -ge "4"; then
 	    case "$proc" in


More information about the MPlayer-dev-eng mailing list