Hi,
I am trying to build a RPM,
I've found that optflags value is -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4
Is it allowed to override "-O2" and use instead "-O3"? I see that those flags overrides those CXXFLAGS from Makefile sources.
Thanks in advance!
"SB" == Sergio Belkin sebelk@gmail.com writes:
SB> Is it allowed to override "-O2" and use instead "-O3"? I see that SB> those flags overrides those CXXFLAGS from Makefile sources.
Of course for your personal packages you can do whatever you like. In Fedora, though, the answer is that you should use the provided optflags unless you have specific justification for a change. In order to change -O2 to -O3 I'd want to see benchmarking and other such evidence that indicates that the change actually makes a difference. Otherwise it's just a case of "adding -O99 for uber mega speedz0rs!!!11!!1one".
- J<
2011/1/22 Jason L Tibbitts III tibbs@math.uh.edu:
"SB" == Sergio Belkin sebelk@gmail.com writes:
SB> Is it allowed to override "-O2" and use instead "-O3"? I see that SB> those flags overrides those CXXFLAGS from Makefile sources.
Of course for your personal packages you can do whatever you like. In Fedora, though, the answer is that you should use the provided optflags unless you have specific justification for a change. In order to change -O2 to -O3 I'd want to see benchmarking and other such evidence that indicates that the change actually makes a difference. Otherwise it's just a case of "adding -O99 for uber mega speedz0rs!!!11!!1one".
- J<
packaging mailing list
Thanks for the answer, could you tell me (I'm really no ironic) could you tell me when I can find that such a evidence.
Let's say that I forget the "-O3" issue. Can I use that CXXFLAGS
"-ansi -Wall -Wno-deprecated" ?
Thanks in advance!
On 01/22/2011 11:28 PM, Sergio Belkin wrote:
2011/1/22 Jason L Tibbitts IIItibbs@math.uh.edu:
> "SB" == Sergio Belkinsebelk@gmail.com writes:
SB> Is it allowed to override "-O2" and use instead "-O3"? I see that SB> those flags overrides those CXXFLAGS from Makefile sources.
Of course for your personal packages you can do whatever you like. In Fedora, though, the answer is that you should use the provided optflags unless you have specific justification for a change. In order to change -O2 to -O3 I'd want to see benchmarking and other such evidence that indicates that the change actually makes a difference. Otherwise it's just a case of "adding -O99 for uber mega speedz0rs!!!11!!1one".
- J<
-- packaging mailing list
Thanks for the answer, could you tell me (I'm really no ironic) could you tell me when I can find that such a evidence.
Well, I am not sure if I understand correctly.
The problem with -O3 vs. -O2 is -O3 turning on, less-tested agressive features, which * may trip over bugs inside of the compiler (e.g. compiler ICEs). * may cause mis-compiled/defective binaries. * may break interaction with other tools (e.g. break debuginfos)
Also, "-O2 vs. -O3" benchmarks are of little significance, because individual upstreams have little possibility to know about the generality and significance of such benchmarks. I.e. though an upstream may be able to prove "-O3 is 5% faster for application XXX on Ubuntu-Y-x86_64", this figure doesn't tell much about the impact of "-O3 on fedora-X-powerpc".
Let's say that I forget the "-O3" issue. Can I use that CXXFLAGS
"-ansi -Wall -Wno-deprecated" ?
-ansi normally doesn't affect code generation, so it's mostly harmless. -ansi however is somewhat problematic when it comes to portability, because the impact of -ansi is not consistent across different OSes.
Adding further warning flags (-W*; not -Wno-* == suppressing warnings) is harmless.
Ralf
On Saturday 22 January 2011, Sergio Belkin wrote:
Is it allowed to override "-O2" and use instead "-O3"? I see that those flags overrides those CXXFLAGS from Makefile sources.
http://fedoraproject.org/wiki/Packaging/Guidelines#Compiler_flags
On 01/23/2011 06:22 PM, Ville Skyttä wrote:
On Saturday 22 January 2011, Sergio Belkin wrote:
Is it allowed to override "-O2" and use instead "-O3"? I see that those flags overrides those CXXFLAGS from Makefile sources.
http://fedoraproject.org/wiki/Packaging/Guidelines#Compiler_flags
IMO, we need to revisit this, because it leaves too much room and is too unspecific (c.f. this thread)
Ralf
packaging@lists.fedoraproject.org