On Wednesday, 10. April 2002 21:51, you wrote:
> Hi all,
>
> In my configure.in I have:
>
> UNAME_MACHINE=`uname -m`
> CFLAGS="... -mcpu=${UNAME_MACHINE} -march=${UNAME_MACHINE}"
>
> Which seems to work fine for x86 based machines, but doesn't work for
> ppc, uname -m returns "ppc" and -mcpu wont take ppc as an argument.
>
> Does anyone know how to do this right? The -mcpu argument is important
> for PII's etc. it wins quite a lot of efficiency.

hmmm, 
go via "cat /proc/cpuinfo |head -1 |cut -f 2 -d :", but on ppc only G3 
(740 or 750 for -mcpu) or G4 (7400) is of any interest, since one knows 
altivec (G4) the others don't... Are there still people using 68k?
On my macs using gcc3 and the newest binutils brought more efficiency 
than optimising for 750 or 7400, though using altivec-optimised 
assembler-code and binutils certainly helps a lot. 
There are a few ppc-specific optimise-flags: -mpowerpc-{gfxopt,gpopt} 
(grafix/general purpose) -mhard-float -mstring that helped optimise some 
code, the other options are the same as on x86 (fast-math, 
-fexpensive-optimisations,...)

Have fun*

Niklas
-- 
__.oO###############################################Oo._

Niklas Werner

http://user.cs.tu-berlin.de/~wernern/
_                                                      _
 "%##################################################%"

Reply via email to