Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
I want to change my mcpu setting, what else do I need to do?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
sugar
Guru
Guru


Joined: 07 Aug 2004
Posts: 579
Location: Morrinsville, New Zealand

PostPosted: Sat May 27, 2006 3:05 am    Post subject: I want to change my mcpu setting, what else do I need to do? Reply with quote

I just realised that when I set this computer up AGES ago, I used -mcpu=i386 instead of -mcpu=pentium2. If I change it, what should I do afterwards. I assume revdep-rebuild(?). Is there anything else?
Back to top
View user's profile Send private message
SAngeli
l33t
l33t


Joined: 16 Apr 2004
Posts: 904
Location: Italy

PostPosted: Sat May 27, 2006 4:32 am    Post subject: Reply with quote

On top of my head you should rebuild your toolkit. Meaning you should emerge glibc binutils gcc portage
Then you should emrge -e system too.
Why? I assume because all your packages have been compiled with i386 cpu settings rather than pentium2.

This is what I would.
Spiro
Back to top
View user's profile Send private message
sugar
Guru
Guru


Joined: 07 Aug 2004
Posts: 579
Location: Morrinsville, New Zealand

PostPosted: Sat May 27, 2006 4:44 am    Post subject: Reply with quote

Sounds reasonable.

cheers mate
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9538
Location: beyond the rim

PostPosted: Sat May 27, 2006 9:02 am    Post subject: Reply with quote

You don't have to do anything.
Back to top
View user's profile Send private message
SAngeli
l33t
l33t


Joined: 16 Apr 2004
Posts: 904
Location: Italy

PostPosted: Sun May 28, 2006 5:45 am    Post subject: Reply with quote

Hi Genone,

could you please explain your reason for not doing anything? As far as I know, toolkit is compiled based on make.conf settings. Whywould you advice not to do anything if toolkit is then used to compile other apps?
Please explain.

Thanks,
Spiro
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9538
Location: beyond the rim

PostPosted: Sun May 28, 2006 7:07 am    Post subject: Reply with quote

Because -mcpu settings don't really affect anything, it's just minor local optimization. Same for most other CFLAGS. Recompiling something with an "optimized" toolchain in this case doesn't change anything.
Back to top
View user's profile Send private message
sugar
Guru
Guru


Joined: 07 Aug 2004
Posts: 579
Location: Morrinsville, New Zealand

PostPosted: Sun May 28, 2006 9:13 am    Post subject: Reply with quote

Ok. Maybe I'll emerge -e world next time I update this computer. Its a bit much recompiling all 400 or so packages that are on this computer.

So, Genome, what do you think is the percentage preformace increase from going from i386 to pentium2. Less than 1?
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9538
Location: beyond the rim

PostPosted: Sun May 28, 2006 9:19 am    Post subject: Reply with quote

As always this depends on the app and how exactly gcc performs the optimization (like using alternate code paths which could speed things up quite a bit).
My main point was that CFLAGS generally only have local effects, they won't change the IO behavior (doesn't matter if the toolchain was compiled with -mcpu=i386 or -mcpu=686, it will still output the exact same binary).
Back to top
View user's profile Send private message
sugar
Guru
Guru


Joined: 07 Aug 2004
Posts: 579
Location: Morrinsville, New Zealand

PostPosted: Mon May 29, 2006 8:10 am    Post subject: Reply with quote

Genone wrote:
As always this depends on the app and how exactly gcc performs the optimization (like using alternate code paths which could speed things up quite a bit).
My main point was that CFLAGS generally only have local effects, they won't change the IO behavior (doesn't matter if the toolchain was compiled with -mcpu=i386 or -mcpu=686, it will still output the exact same binary).


Ok, I see what you're saying. Thanks for the reply :)
Back to top
View user's profile Send private message
RedBeard0531
Guru
Guru


Joined: 21 Sep 2002
Posts: 415
Location: maryland

PostPosted: Mon May 29, 2006 3:34 pm    Post subject: Reply with quote

While rebuilding gcc and binutils would be silly, you might want to rebuild glibc. Because everything links to it if it gets faster so do your programs. However, dont expect a noticeable difference, especially with -mcpu. You might want to consider using -march=pentium2 which allows it to use the enhanced i686 instruction set. Still will probably be only a few percent (aka unnoticeably) faster.

PS- since you are using a p2 im guessing you dont have much ram or a fast hard-drive. If this is the case you will get better performance with -Os than -O2 or -O3 because of the smaller binaries.
_________________
OH MY GOD! Kenny just killed Kenny!
That Basterd!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat 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