Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Upgrading my CPU -- Do I recompile?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
mikix
n00b
n00b


Joined: 10 Dec 2002
Posts: 13

PostPosted: Tue Jan 07, 2003 5:25 am    Post subject: Upgrading my CPU -- Do I recompile? Reply with quote

Hello. I would appreciate any assistance:

I'm upgrading my processor from an AMD Athlon 800 to an AMD Athlon XP 2100. I currently have
Quote:
-march=athlon
in my CFLAGS. Do I need to recompile my system with
Quote:
-mcpu=athlon
or whatever before I make the switch? (And then presumably compile again with the new more agressive optimizations.)

Also, how will the kernel take it? Will it let me make the switch and then I can recompile afterward, or do I have to recompile it beforehand too to prep for the switch?
Back to top
View user's profile Send private message
elzbal
Guru
Guru


Joined: 31 Aug 2002
Posts: 364
Location: Seattle, WA, USA

PostPosted: Tue Jan 07, 2003 7:48 am    Post subject: Reply with quote

Your old flags will work fine for your new CPU, as will any apps compiled using those flags. You can update your flags at your leisure, and recompile at your leisure.

I wouldn't use the 'mcpu' flag - I think that's mostly used for cross-compiling. I don't think it would hurt, but I wouldn't use it either.

I have an AthlonXP, and I use the following:
Code:
CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer"


I don't think that's too agressive compared to what some of the folks here do, but it works very well for me. Note that those flags assume you are using gcc 3.2 (in other words, some version of Gentoo 1.4).

I recommend you look at http://www.freehackers.org/gentoo/gccflags/flag_gcc2.html (for Gentoo 1.2) and http://www.freehackers.org/gentoo/gccflags/flag_gcc3.html (for Gentoo 1.4).
Back to top
View user's profile Send private message
heijs
Apprentice
Apprentice


Joined: 12 Jun 2002
Posts: 174
Location: Groningen

PostPosted: Tue Jan 07, 2003 11:39 am    Post subject: Reply with quote

I don't think it is worth the trouble of recompiling EVERY package (you won't notice a speed-up anyway), but perhaps you should recompile glibc, gcc, binutils with the flags suggested above.
Back to top
View user's profile Send private message
Gnufsh
Guru
Guru


Joined: 28 Dec 2002
Posts: 400
Location: Portland, OR

PostPosted: Tue Jan 07, 2003 6:06 pm    Post subject: Reply with quote

According to the GCC docs, -mcpu compiles for that cpu without breaking the code on other (x86) cpus. -march does break on other cpus, but atrhlon code will run on athlon-xp. It won't, however, take advantage of SSE. Also -march implies -mcpu
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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