View previous topic :: View next topic |
Author |
Message |
mikix n00b

Joined: 10 Dec 2002 Posts: 13
|
Posted: Tue Jan 07, 2003 5:25 am Post subject: Upgrading my CPU -- Do I recompile? |
|
|
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 in my CFLAGS. Do I need to recompile my system with 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 |
|
 |
elzbal Guru


Joined: 31 Aug 2002 Posts: 364 Location: Seattle, WA, USA
|
Posted: Tue Jan 07, 2003 7:48 am Post subject: |
|
|
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 |
|
 |
heijs Apprentice


Joined: 12 Jun 2002 Posts: 174 Location: Groningen
|
Posted: Tue Jan 07, 2003 11:39 am Post subject: |
|
|
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 |
|
 |
Gnufsh Guru


Joined: 28 Dec 2002 Posts: 400 Location: Portland, OR
|
Posted: Tue Jan 07, 2003 6:06 pm Post subject: |
|
|
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 |
|
 |
|