LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 06-29-2006, 03:59 PM   #1
Daws
Member
 
Registered: May 2006
Location: UK
Distribution: Debian, Linux From Scratch
Posts: 416
Blog Entries: 1

Rep: Reputation: 32
GCC optimizations: What does -O4 do?


I compiled mplayer svn recently and noticed that it used the -O4 flag. I was under the impression that -O3 was the highest gcc would go. I read through the gcc manual and there is no mention -O4. Well I was just wondering if anyone knew what it does, specifically what it does that -O3 does not do?
 
Old 06-29-2006, 04:26 PM   #2
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
Hmmm. There's definitely no -O4 listed in the docs.
http://gcc.gnu.org/onlinedocs/gcc/Op...timize-Options

I've just tried it with a small app of my own, and the executable created is exactly the same size as with -O3. I'd imagine it does the same thing.

Odd though.

Dave
 
Old 06-29-2006, 07:28 PM   #3
Hammett
Senior Member
 
Registered: Aug 2003
Location: Barcelona, Catalunya
Distribution: Gentoo
Posts: 1,037

Rep: Reputation: 54
You can use -Os to get smaller binaries....I have checked it and haven't found any improvements though
 
Old 06-29-2006, 08:19 PM   #4
Daws
Member
 
Registered: May 2006
Location: UK
Distribution: Debian, Linux From Scratch
Posts: 416
Blog Entries: 1

Original Poster
Rep: Reputation: 32
Quote:
You can use -Os to get smaller binaries....I have checked it and haven't found any improvements though
I hear from the gentoo folks that this is very effective for firefox, haven't tried it myself, I quite like konqueror.
 
Old 06-30-2006, 01:13 PM   #5
Daws
Member
 
Registered: May 2006
Location: UK
Distribution: Debian, Linux From Scratch
Posts: 416
Blog Entries: 1

Original Poster
Rep: Reputation: 32
Well I found the answer if anyone is interested. -O4 at the moment is the same as -O3, -O4 is for further optimisations that may be introduced in future versions of gcc. Mplayer uses them just in case they are actually introduced (you know what their release cycle is like).

I was hoping the answer would be more interesting than that. Oh well.
 
Old 06-30-2006, 01:46 PM   #6
daihard
Member
 
Registered: Jul 2003
Location: Seattle, WA
Distribution: Kubuntu 12.04
Posts: 913

Rep: Reputation: 33
Quote:
Originally Posted by Daws
I hear from the gentoo folks that this is very effective for firefox, haven't tried it myself, I quite like konqueror.
As far as I know, -Os is what Fedora uses as the standard optimization flag for its Firefox RPM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Fresh 10 install, Optimizations RedShirt Suse/Novell 5 10-30-2005 12:39 PM
distro optimizations Nightfrost Linux - Distributions 12 04-19-2005 02:51 PM
Slack optimizations? bluenirve Slackware 4 09-20-2004 07:58 AM
Have any optimizations in Linux? Arc4ne Linux - General 4 06-23-2004 11:11 PM
Memory Optimizations ? tjm Linux - Software 3 07-08-2003 06:11 PM


All times are GMT -5. The time now is 02:24 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration