View previous topic :: View next topic |
Author |
Message |
charlieg Advocate
Joined: 30 Jul 2002 Posts: 2149 Location: Manchester UK
|
Posted: Sat Dec 20, 2003 1:34 am Post subject: What Gentoo/GCC needs: a 'compiler flag matrix' |
|
|
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 |
|
|
dice Guru
Joined: 21 Apr 2002 Posts: 577
|
Posted: Sat Dec 20, 2003 1:49 am Post subject: |
|
|
The difficulty is in that "speed" column. Results for many flags will vary depending on the application and target architecture. |
|
Back to top |
|
|
charlieg Advocate
Joined: 30 Jul 2002 Posts: 2149 Location: Manchester UK
|
Posted: Sat Dec 20, 2003 1:57 am Post subject: |
|
|
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 |
|
|
Lovechild Advocate
Joined: 17 May 2002 Posts: 2858 Location: Århus, Denmark
|
Posted: Sat Dec 20, 2003 3:05 am Post subject: |
|
|
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 |
|
|
|