sherington Posted February 4, 2004 Report Share Posted February 4, 2004 Hi, Usually when I build packages from source, I just do: configure make su -c "make install" No problem with that. What I'd like to make sure though, is that when I build from sources that I am getting the full benefit of compiler optimisations for my CPU - I'm not sure that configure and/or make is detecting my Athlon CPU and making the best possible optimisations. I know that I can do something like this when I build, specifying flags such as... -march=athlon ...but how do I know which marchitecture to choose? From the gcc man page: "The choices for cpu-type are i386, i486, i586, i686, pentium, pentium-mmx, pentiumpro, pentium2, pentium3, pentium4, k6, k6-2, k6-3, athlon, athlon-tbird, athlon-4, athlon-xp, athlon-mp, winchip-c6, winchip2 and c3." Does it matter which of the athlon-xxx options I specify? How do I know which one I should use? Is there a tool I can use to give me definitive processor information? I have no idea which particular type of Athlon I have. Any hints would be appreciated. Quote Link to comment Share on other sites More sharing options...
Qchem Posted February 4, 2004 Report Share Posted February 4, 2004 cat /proc/cpuinfo is probably you're friend here. Quote Link to comment Share on other sites More sharing options...
mtweidmann Posted February 4, 2004 Report Share Posted February 4, 2004 I would just use whatever is in your machine, but generally speaking things are backward compatible but not forwards. So an AthlonXP should run code compiled for for an athlon, i586, i386, etc..... Quote Link to comment Share on other sites More sharing options...
bvc Posted February 4, 2004 Report Share Posted February 4, 2004 (edited) if athlon-xp CHOST="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer" CXXFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer" http://gcc.gnu.org/onlinedocs/ Edited February 4, 2004 by bvc Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.