Jump to content

Building from sources and compiler flags


sherington
 Share

Recommended Posts

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.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...