GCC Flags Matrix

From Gentoo Linux Wiki

Jump to: navigation, search
This article is part of the Tips & Tricks series.
Terminals / Shells Network X Window System Portage System Filesystems Kernel Other


[edit] LEGEND

CategoryVersionNameDescriptionBenefitsDrawbacksExample
The category is based on where the flag is located in the gcc manual (e.g -fomit-frame-pointer would be Optimization options) Version is the gcc version the flag in question applies to Name is a name of the flag Description is an easy to understand version of what the gcc manual states Benefits are the benefits the flag brings Drawbacks are the drawbacks the flag brings Use a diff style output meaning compile without first then with the flag second and diff said asm output



CategoryVersionNameDescriptionBenefitsDrawbacksExample
386/x86-64  ? -maccumulate-outgoing-args Allocate stack usage(?) before executing a function *Faster *Less memory usage due to stack boundry *Increased code size Need one
Optimization options <4.2.x -frtl-abstract-sequences Find identical pieces of code turn them into a subroutine *Decreases code size * Increases run time. Need one
Optimization options  ? -funsafe-loop-optimizations Assume loops are finite, etc *Allows loops to be optimized more *May break although doubtful Need one
Optimization options  ? -fno-trapping-math Assume floats wont be divided by zero, etc *Faster math in some cases *May break although doubtful Need one
Options for code generation conventions  ? -fno-ident Don't put compiler identification information within the binary *Very tiny decrease in size *None Need one

This article is still a Stub. You can help Gentoo-Wiki by expanding it.

Personal tools