Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
What Gentoo/GCC needs: a 'compiler flag matrix'
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
charlieg
Advocate
Advocate


Joined: 30 Jul 2002
Posts: 2149
Location: Manchester UK

PostPosted: Sat Dec 20, 2003 1:34 am    Post subject: What Gentoo/GCC needs: a 'compiler flag matrix' Reply with quote

I was looking for a suitable Gentoo wiki but couldn't find one so I could put up an example, but an explanation will have to do instead:

What we should do is put together (in the good old community spirit) a matrix of compiler options and the supposed effect that they have. A giant table, of sorts.

eg:
Code:
                    |         Effect on binary...          |
Flag                |   Speed   |   Size   |   Stability   |   Notes
--------------------+-----------+----------+---------------+--------------------
fomit-frame-pointer | Increase  | Decrease | No effect     | May make debugging impossible
--------------------+-----------+----------+---------------+--------------------
etcetera etcetera...


Worth the time/effort?
_________________
Want Free games?
Free Gamer - open source games list & commentary

Open source web-enabled rich UI platform: Vexi
Back to top
View user's profile Send private message
dice
Guru
Guru


Joined: 21 Apr 2002
Posts: 577

PostPosted: Sat Dec 20, 2003 1:49 am    Post subject: Reply with quote

The difficulty is in that "speed" column. Results for many flags will vary depending on the application and target architecture.
Back to top
View user's profile Send private message
charlieg
Advocate
Advocate


Joined: 30 Jul 2002
Posts: 2149
Location: Manchester UK

PostPosted: Sat Dec 20, 2003 1:57 am    Post subject: Reply with quote

dice wrote:
The difficulty is in that "speed" column. Results for many flags will vary depending on the application and target architecture.


Well, we're not limited to one word answers. "Faster for larger applications." Plus there is the 'notes' section.

I forgot 2 columns:
  • implied by: for stating flags that are implied by meta-flags like Ox and march=x
  • disabled by: for listing meta-flags that disable the flag in question

_________________
Want Free games?
Free Gamer - open source games list & commentary

Open source web-enabled rich UI platform: Vexi
Back to top
View user's profile Send private message
Lovechild
Advocate
Advocate


Joined: 17 May 2002
Posts: 2858
Location: Århus, Denmark

PostPosted: Sat Dec 20, 2003 3:05 am    Post subject: Reply with quote

Besides that being an impossible task as codegeneration and optimization can have widely different effects on different archs and different code fragments.


GCC currently enables -fomit-frame-pointer for all archs that have "DEBUG_WITHOUT_FP" set. btw. so that's a bad option to use for your example.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum