Don't set LDFLAGS in make.conf at all if you want your system to be supported. This may change at a later date -- vapier is preparing a proposed list of permitted LDFLAGS. For now, however, don't touch them.tiwaris wrote:Do LDFLAGS help and how??
Should I use LDFLAGS="-s" in my make.conf. Does it give any significant performance gain.
Surely you mean a small list? And portage doesn't tend to warn you if you're doing something really stupid...Xaignar wrote:Why not have a list of officially supported C(XX)FLAGS, and then just make portage post a big honking "WTF are you doing?" warning if a non-supported flag are used when emerge/etc is evoked?
I know that portage will let you do stupid things (there is no such thing as 100% functional protection against stupidity), but as other has suggested, some sort of validation would be useful and could help cut down on the "if gcc runs, then it's OK"-crowd.ciaranm wrote:Surely you mean a small list? And portage doesn't tend to warn you if you're doing something really stupid...Xaignar wrote:Why not have a list of officially supported C(XX)FLAGS, and then just make portage post a big honking "WTF are you doing?" warning if a non-supported flag are used when emerge/etc is evoked?
Well, I'm trying to get this through as policy... *shrug*Xaignar wrote:I know that portage will let you do stupid things (there is no such thing as 100% functional protection against stupidity), but as other has suggested, some sort of validation would be useful and could help cut down on the "if gcc runs, then it's OK"-crowd.

By saying that you just lost any chance you had of anyone ever considering your idea further.BrightSide wrote:Gentoo has always been about choice
One of Gentoo's goals is to provide reasonable choices where such choices are possible. This does not mean that we will always provide you with a choice for absolutely everything, especially if it makes no sense to do so. It also does not mean that the phrase "Gentoo is about choice" is adequate justification for any proposal.TrueDFX wrote:Do you disagree that Gentoo is about choice, or do you feel that it's simply not relevant?
Because under certain situations, such as when you're making PROM-level code which will run without an operating system and when no ABI rules are in effect, they make sense.Xithix wrote:Why does gcc even include flags like -malign-double if they are so obviously dangerous to the point that no one in their right mind would ever use them?
to me this conjures up an image of hurried developers just searching for non-whitelisted CFLAGS in an effort to close as many bugs as they can, ignoring the issue altogther (valid or not). of course, the user shouldn't be submitting bugs before trying out sane flags in the first place, but let's stay in reality for the momentIf a package breaks with other CFLAGS, it is perfectly ok to close the bug with a WONTFIX suggesting that the user picks more sensible global CFLAGS.
now that i can agree with. INVALID seems a much better resolution - 'your bug report is invalid without sane flags' vs. 'this is indeed a bug, but there's no way to fix it'.Similarly, if you suspect that a bug is caused by insane CFLAGS, an INVALID resolution is suitable.
As for the optimizations it provides:Sets -fno-math-errno, -funsafe-math-optimizations,
-fno-trapping-math, -ffinite-math-only, -fno-rounding-math and -fno-signaling-nans.
This option causes the preprocessor macro __FAST_MATH__ to be defined.
This option should never be turned on by any -O option since it can result in incorrect output for programs which depend on an exact implementation of IEEE or ISO rules/specifications for math functions.
So, there we have all the information that is available in the Fine Manual.-fno-math-errno
Do not set ERRNO after calling math functions that are executed with a single instruction, e.g., sqrt. A program that relies on IEEE exceptions for math error handling may want to use this flag for speed while maintaining IEEE arithmetic compatibility.
This option should never be turned on by any -O option since it can result in incorrect output for programs which depend on an exact implementation of IEEE or ISO rules/specifications for math functions.
The default is -fmath-errno.
-funsafe-math-optimizations
Allow optimizations for floating-point arithmetic that (a) assume that arguments and results are valid and (b) may violate IEEE or ANSI standards. When used at link-time, it may include libraries or startup files that change the default FPU control word or other similar optimizations.
This option should never be turned on by any -O option since it can result in incorrect output for programs which depend on an exact implementation of IEEE or ISO rules/specifications for math functions.
The default is -fno-unsafe-math-optimizations.
-ffinite-math-only
Allow optimizations for floating-point arithmetic that assume that arguments and results are not NaNs or +-Infs.
This option should never be turned on by any -O option since it can result in incorrect output for programs which depend on an exact implementation of IEEE or ISO rules/specifications.
The default is -fno-finite-math-only.
-fno-trapping-math
Compile code assuming that floating-point operations cannot generate user-visible traps. These traps include division by zero, overflow, underflow, inexact result and invalid operation. This option implies -fno-signaling-nans. Setting this option may allow faster code if one relies on “non-stop” IEEE arithmetic, for example.
This option should never be turned on by any -O option since it can result in incorrect output for programs which depend on an exact implementation of IEEE or ISO rules/specifications for math functions.
The default is -ftrapping-math.
-frounding-math
Disable transformations and optimizations that assume default floating point rounding behavior. This is round-to-zero for all floating point to integer conversions, and round-to-nearest for all other arithmetic truncations. This option should be specified for programs that change the FP rounding mode dynamically, or that may be executed with a non-default rounding mode. This option disables constant folding of floating point expressions at compile-time (which may be affected by rounding mode) and arithmetic transformations that are unsafe in the presence of sign-dependent rounding modes.
The default is -fno-rounding-math.
This option is experimental and does not currently guarantee to disable all GCC optimizations that are affected by rounding mode. Future versions of GCC may provide finer control of this setting using C99's FENV_ACCESS pragma. This command line option will be used to specify the default state for FENV_ACCESS.
-fsignaling-nans
Compile code assuming that IEEE signaling NaNs may generate user-visible traps during floating-point operations. Setting this option disables optimizations that may change the number of exceptions visible with signaling NaNs. This option implies -ftrapping-math.
This option causes the preprocessor macro __SUPPORT_SNAN__ to be defined.
The default is -fno-signaling-nans.
This option is experimental and does not currently guarantee to disable all GCC optimizations that affect signaling NaN behavior.
Thanks, I wasn't aware of this. I had a very modest LDFLAGS line (-Wl,-O1), but if they can compromise system stability, I'll remove them. I have actually had Emacs crash in weird ways lately...ciaranm wrote:Don't set LDFLAGS in make.conf at all if you want your system to be supported. This may change at a later date -- vapier is preparing a proposed list of permitted LDFLAGS. For now, however, don't touch them.
Code: Select all
CFLAGS="-O3 -mcpu=athlon-xp -pipe -fomit-frame-pointer -fnitrous-oxide-inject -fgo-faster-stripes"
You should probably read this entire thread then. You 1337 system is quite the contrary...Joelio wrote:This is my set of flags for a super 1337 system..
Code: Select all
CFLAGS="-O3 -mcpu=athlon-xp -pipe -fomit-frame-pointer -fnitrous-oxide-inject -fgo-faster-stripes"