Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

compiler options

Status
Not open for further replies.

zeland

IS-IT--Management
Aug 19, 2002
569
0
0
MY
When I compile programs from source, I noticed that the compile options seem a bit random, i.e. some progs compile with -O2, some -O3 while other might be -march=i586 or -march=i686. How does the make or configure command determine what options to use? Is there a general config file like Gentoo's /etc/make.conf file on FC3? What compiler options should I use to optimize my progs to run on my Athlon-XP machine?


--== Anything can go wrong. It's just a matter of how far wrong it will go till people think its right. ==--
 
Not sure how you can predefine compiler options on a system config level, but the Linux Journal just ran a great article on what the compiler options do to optimize your code based upon desired outcome.


D.E.R. Management - IT Project Management Consulting
 
Each make file is unique and based on what the developers thought would make most sence for their application. The configure generally tests for a set of requirements (or substitutions if requirements aren't met) and builds from there. Most configure scripts allow you to supply optional arguments that should be added to the make file.

There is nothing stopping you from doing find/replaces on the confingures so that it compiles the way you want -- but remember that the developers set the compiler options as they did for a reason.



[plug=shameless]
[/plug]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top