Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '"-fast -mcpu=7450" works on G4' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
"-fast -mcpu=7450" works on G4
Authored by: alanb1979 on Mar 03, '05 09:18:07AM

On my G4, I was sucessfully able to use
./configure CFLAGS="-fast -mcpu=7450"
This version performed just as well (~20% processor usage while transcoding) as the one with all of the flags I mentioned in my original post.

What do you mean about building a "dynamic version" of the lame libraries by using "-fPIC"? Apple's documentation mentioned that this will build the shared libraries with -fast, but I don't really understand.

For reference, I've included the following excerpt from documentation for the "-fast" compiler option taken from Apple's gcc optimization page. This explains why I wasn't able to use "-fast" alone on my G4 because it assumes a G5. However, I don't quite understand what it says about "-fPIC" -- why do we want "position independent code" for shared libraries?

-fast

Optimize for maximum performance. -fast changes the overall optimization strategy of GCC in order to produce the fastest possible running code for PPC7450 and G5 architectures. By default, -fast optimizes for G5. Programs optimized for G5 will not run on PPC7450. To optimize for PPC7450, add -mcpu=7450 on command line.

-fast currently enables the following optimization flags (for G5 and PPC7450). These flags may change in the future. You cannot override any of these options if you use -fast except by setting -mcpu=7450. Note that -ffast-math, -fstrict-aliasing and -malign-natural are unsafe in some situations. To build shared libraries with -fast, specify -fPIC on command line.

-O3
-funroll-loops
-fstrict-aliasing
-fsched-interblock
-falign-loops=16
-falign-jumps=16
-falign-functions=16
-falign-jumps-max-skip=15
-falign-loops-max-skip=15
-malign-natural
-ffast-math
-mdynamic-no-pic
-mpowerpc-gpopt
-force_cpusubtype_ALL
-fstrict-aliasing
-mtune=G5
-mcpu=G5
-mpowerpc64

---
hiedy hoo

[ Reply to This | # ]