Safe Cflags/PowerPC
From Gentoo Linux Wiki
[edit] PowerPC 601
The PowerPC 601 CPU is a mixture between POWER and PowerPC architectures and it is a must you specify -mcpu=601 for taking advantage of the POWER part of the processor and do not use unimplemented PowerPC instructions (implementation of both ISAs is incomplete on 601).
CHOST="powerpc-unknown-linux-gnu"
CFLAGS="-mcpu=601 -O2 -pipe"
CXXFLAGS="${CFLAGS}"
Note: Code created with these flags will not run in any other CPU but PowerPC 601, if you want to run on 601 and others use -mcpu=common and code will run in ANY POWER or PowerPC CPU.
[edit] PowerPC 603
CHOST="powerpc-unknown-linux-gnu"
CFLAGS="-mcpu=603 -O2 -pipe"
CXXFLAGS="${CFLAGS}"
[edit] PowerPC 603e
CHOST="powerpc-unknown-linux-gnu"
CFLAGS="-mcpu=603e -O2 -pipe"
CXXFLAGS="${CFLAGS}"
[edit] PowerPC 604
CHOST="powerpc-unknown-linux-gnu"
CFLAGS="-mcpu=604 -O2 -pipe"
CXXFLAGS="${CFLAGS}"
[edit] PowerPC 604e
CHOST="powerpc-unknown-linux-gnu"
CFLAGS="-mcpu=604e -O2 -pipe"
CXXFLAGS="${CFLAGS}"
-Os may be beneficial on older processors (of any kind, not just PowerPCs).
[edit] PowerPC 750/745/755 (G3)
CHOST="powerpc-unknown-linux-gnu"
CFLAGS="-mcpu=750 -Os -pipe"
CXXFLAGS="${CFLAGS}"
Given the smaller cache sizes, and the fact that the L2 cache is off-die on the G3, better performance may be achieved with -Os rather than -O2. This applies for all 750 series processors, including the later 750fx/750gx series. See an exception below.
[edit] PowerPC 750cx (G3e) (Nintendo Gamecube / Wii)
CHOST="powerpc-unknown-linux-gnu"
CFLAGS="-mcpu=750 -O2 -pipe"
CXXFLAGS="${CFLAGS}"
The 750cx offers more L2 cache than its predecessor, and moves it on-die for a performance boost. Better performance may be achieved with -O2.
[edit] PowerPC 7400/7410 (G4)
CHOST="powerpc-unknown-linux-gnu"
CFLAGS="-mcpu=7400 -O2 -pipe -maltivec -mabi=altivec"
CXXFLAGS="${CFLAGS}"
Note: -O3 is unstable on G4
[edit] PowerPC 744x/745x (G4 second generation)
CHOST="powerpc-unknown-linux-gnu"
CFLAGS="-mcpu=7450 -O2 -pipe -maltivec -mabi=altivec"
CXXFLAGS="${CFLAGS}"
[edit] PowerPC 970 (G5)
CHOST="powerpc64-unknown-linux-gnu"
CFLAGS="-O2 -pipe -mcpu=970"
CXXFLAGS="${CFLAGS}"
[edit] Cell Broadband Engine (Playstation 3)
CHOST="powerpc64-unknown-linux-gnu"
CFLAGS="-O2 -pipe -mcpu=cell"
CXXFLAGS="${CFLAGS}"
[edit] PowerPC (If you don't know which one)
CHOST="powerpc-unknown-linux-gnu"
CFLAGS="-O2 -pipe"
CXXFLAGS="${CFLAGS}"