LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-14-2005, 06:22 PM   #1
exodist
Senior Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Arch
Posts: 1,374

Rep: Reputation: 47
cflags


I have been using gentoo for a while, so I compile everything with my own cflags. There is onl one thing I wonder about.

the -O flag, it takes s 0 1 2 or 3

I know s means optimise for Size of binaries. and I know a higher number is more optimisation. So why do most places recommend -O2 instead of O3? isn't more optimisation good? what advantages would there be in using O2 over O3?
 
Old 01-14-2005, 06:27 PM   #2
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
The only advantage of using -02 instead of -03 is some things won't compile with -O3 because the optimizations are too aggressive.

I've noticed that most applications that have problems with -O3 in Gentoo have ebuilds that automatically lower your optimization level. So I just leave my make.conf CFLAGS set to -O3 and it has been quite some time since I've a problem because of that.
 
Old 01-14-2005, 07:44 PM   #3
exodist
Senior Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Arch
Posts: 1,374

Original Poster
Rep: Reputation: 47
thanx, that makes clear and perfect sence :-D
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
export CFLAGS GCC help TieN Programming 2 06-17-2005 03:24 AM
CFLAGS to compile kernel frzburn Linux - Software 4 03-05-2005 05:42 AM
Using CFLAGS and other options vexer Linux From Scratch 7 08-18-2004 09:04 AM
CFLAGS library -l and -i abs Programming 2 04-11-2004 10:03 PM
how to unset cflags? shanenin Linux - Software 4 01-25-2004 09:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration