Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
cflags
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
nss
Guru
Guru


Joined: 04 Oct 2004
Posts: 389

PostPosted: Sun Jan 08, 2006 9:28 am    Post subject: cflags Reply with quote

/proc/cpuinfo
Code:
processor       : 0
cpu             : 7455, altivec supported
clock           : 1000MHz
revision        : 0.3 (pvr 8001 0303)
bogomips        : 997.90
machine         : PowerBook3,5
motherboard     : PowerBook3,5 MacRISC2 MacRISC Power Macintosh
detected as     : 80 (PowerBook Titanium IV)
pmac flags      : 0000001b
L2 cache        : 256K unified
memory          : 1024MB
pmac-generation : NewWorld

My CFLAGS are currently
Code:
CFLAGS="-O2 -pipe -mcpu=7400 -maltivec -mabi=altivec"

I use this machine as a general laptop. I surf the net, I watch movies (at least I hope to, I haven't gotten mplayer working), and I am just starting to learn to program.
Are there any other cflags I should include. After looking at the Wiki, I am considering the following:
CFLAGS="-mcpu=7450 -O2 -pipe -fno-strict-aliasing -maltivec -mabi=altivec -mpowerpc-gfxopt"
Is 7450 safe to use?
_________________
gentoo good to be true
Back to top
View user's profile Send private message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Sun Jan 08, 2006 9:34 am    Post subject: Reply with quote

-mpowerpc-gfxopt is implied by your mcpu setting, it's useless to add it again. Using 7450 is okay, but you won't see much of a difference, it really only changes some instruction orders and tunes for the pipeline length afaik.
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml
Back to top
View user's profile Send private message
namo
n00b
n00b


Joined: 29 Jun 2004
Posts: 28
Location: Berkeley

PostPosted: Mon Jul 03, 2006 3:02 pm    Post subject: Reply with quote

Quote:
cat /proc/cpuinfo
processor : 0
cpu : 7447A, altivec supported
clock : 1499.999000MHz
revision : 0.2 (pvr 8003 0102)
bogomips : 73.47
timebase : 18432000
platform : PowerMac
machine : PowerBook5,6
motherboard : PowerBook5,6 MacRISC3 Power Macintosh
detected as : 287 (PowerBook G4 15")


So should I use mcpu=7400 or mcpu=7450 ? (rounding below seems more logical, but you never know :) )

Thanks !
Back to top
View user's profile Send private message
Pylon
Retired Dev
Retired Dev


Joined: 17 Jan 2003
Posts: 279
Location: Cologne

PostPosted: Mon Jul 03, 2006 4:27 pm    Post subject: Reply with quote

namo wrote:
So should I use mcpu=7400 or mcpu=7450 ? (rounding below seems more logical, but you never know :) )


Use -mcpu=G4. That's stable an recommended.
_________________
hacking is not a crime
Back to top
View user's profile Send private message
timotheus25
Apprentice
Apprentice


Joined: 27 Dec 2005
Posts: 162
Location: *upstate* New York, USA

PostPosted: Tue Jul 04, 2006 7:36 am    Post subject: Reply with quote

JoseJX wrote:
-mpowerpc-gfxopt is implied by your mcpu setting, it's useless to add it again. Using 7450 is okay, but you won't see much of a difference, it really only changes some instruction orders and tunes for the pipeline length afaik.


Actually, the gfxopt switches are not only implied, but could hurt your performance. If an emerge overrides mcpu, but the gfx switch(es) are kept, you could end up with slower code. See the comments in /etc/make.conf.example from ~portage-2.1 .

You do want to specify both mcpu and mtune, even though the former implies the latter.
From http://tstotts.net/linux/gentoopb.html:
Quote:

Note that for custom CFLAGS, both the mcpu and mtune flags should be present, even though it is redundant as mcpu infers mtune. The purpose is that Makefiles often override the mcpu to a more generic CPU model, and then the tuning flag will maintain scheduling of the generic code in favor of the desired specific CPU.


Also, if you want your kernel to compile for the 7450 model specifically, and safely, you can find a small patch at the above mentioned document. I use it to gain small boot time speedup on my 1.25GHz G4 when using gcc-4* and a mostly non-modular kernel configuration.
_________________
http://tstotts.net/linux/gentoopb.html
http://tstotts.net/linux/gentooinsp640m.html
Back to top
View user's profile Send private message
timotheus25
Apprentice
Apprentice


Joined: 27 Dec 2005
Posts: 162
Location: *upstate* New York, USA

PostPosted: Tue Jul 04, 2006 7:41 am    Post subject: Reply with quote

namo wrote:
Quote:

cpu : 7447A, altivec supported
clock : 1499.999000MHz


So should I use mcpu=7400 or mcpu=7450 ?


I have a lower processor/motherboard model than yours and use 7450 without problems, and with (slightly) increased performance over 7400.
I am mostly certain that the 7450 cpu option applies to 7447/7457 models, as well as anything else above 7450, should they exist.

On my system, the kernel displays the CPU as 7447/7457 because it can't even tell which one it is. (I'm fairly certain that it is 7447 like yours.)
_________________
http://tstotts.net/linux/gentoopb.html
http://tstotts.net/linux/gentooinsp640m.html
Back to top
View user's profile Send private message
_savage
Guru
Guru


Joined: 06 Jun 2004
Posts: 308
Location: Redmond, WA

PostPosted: Mon Jul 10, 2006 4:52 am    Post subject: Reply with quote

You've got pretty much the same laptop as me; except my revision number is 0.2 (pvr 8001 0302). My cflags are
Code:
CFLAGS="-O3 -mcpu=7450 -mtune=7450 -maltivec -mabi=altivec -pipe -fomit-frame-pointer -fno-strict-aliasing"

and I've been using them with no problems for a long time. One humble word of advise though: avoid the ~ppc keyword, use stable packages instead! It's a pain to keep (re)compiling every minior revision of packages.
Pylon wrote:
Use -mcpu=G4. That's stable an recommended.

I was using the G4 flag for a while, but then came across a few configure scripts that failed on it. The problem (back then!) was that this option was handed down to my gcc and the inlined call to gcc didn't know that option and thus failed. Maybe now gcc understands the G4 option, I haven't checked that.

Also, I'd be curious to see your kernel .config file for the latest 2.6.16/17 kernel? I've got one almost running but I'm not too happy with it yet.
_________________
Jens Troeger
http://savage.light-speed.de/
Back to top
View user's profile Send private message
Shan
Guru
Guru


Joined: 04 Nov 2003
Posts: 558
Location: /dev/null

PostPosted: Sat Jul 22, 2006 6:52 pm    Post subject: Reply with quote

According to This page, those of us with 7440, 7441, 7447 and 7447a machines (EG Most G4's >533Mhz) are essentially 7450's without the L3 Cache; meaning we should use mcpu=7450. As previously noted however, the difference between 7400 and 7450 is marginal performance wise so if you've already got a machine setup for 7400 rebuilding to 7450 is probably worthless and certainly overkill.

As a side note however, I DO notice a slight (potentially placibic) difference between the standard PPC Firefox binaries and those offered from Furbism
_________________
{ NO -U } { STRIP }
{ TINY }
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum