$CFLAGES and $C++FLAGES what do I set these for to get the most out of my CPU
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Depends to some extent on the version of gcc you use. Look at the gcc online docs, for the version of gcc you are using, --> http://gcc.gnu.org/onlinedocs/ in the section title "Intel 386 and AMD x86-64 Options" for processor-specific settings.
With a quick search of Google, I can't find any reference to a family 6, model 22 Celeron so I don't know which microarchitecture yours is based on. --mtune=native or --march=native (if you are not building binaries for another machine) works. You can force the -mmmx, -msse, -msse2, and -msse3 since you have those registers. A reasonable optimization level is -O2. You could use -pipe so the compilation process uses pipe instead of intermediate files. Other than that, there's not much else unless you really know what the option is going to do to the resulting binary.
I also recommend against using '-O3' because it WILL break some programs. I've had this happen to me and it took a while to debug, and then I found out that changing '-O3' to '-O2' fixed the problem. You can take your chances with '-O3', maybe newer gcc versions will no longer break programs when given this option, but I wouldn't use it if you want to keep your system as stable as possible.
@H_TeXMeX_H, I'm a Gentoo user and I completely forgot about that page. Thanks!
@ErV, let me join H_TeXMeX_H in strongly discouraging the use of -O3. Some things will, without a doubt, break and you won't notice a difference over using -O2.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.