Bugzilla – Bug 551789
Xorg builds with -O0 flags?
Last modified: 2009-11-19 10:45:27 UTC
from https://build.opensuse.org/package/view_file?file=xorg-x11-server.spec&package=xorg-x11-server&project=openSUSE%3A11.2 line 300, we add -O0 flags to CFLAGS. from the build log: https://build.opensuse.org/package/live_build_log?arch=i586&package=xorg-x11-server&project=openSUSE%3A11.2&repository=standard Both -O2 and -O0 are using with compiling, but -O0 is behind -O2. I did a test and confirmed that when both -O2 and -O0 are indicated in CFLAGS, gcc will use the last one. It means we are using -O0 flags for building. I builded and installed Xorg without the -O0 flags, and feeled the everything is much smoother. Is there any reason why we don't use gcc's -O2 optimization?
Ouch. This definitely didn't happen by intention! Thanks, excellent catch! I'm going to fix that. Introduced by ---------------------------------------------------------------------------- r188 | mhopf | 2009-07-02 16:12:22 | 86ba9afd817be08b992cbb62aedc8fb0 | 7.4 | sr Adapt vnc patches to changes in input infrastructure (fixes bnc #508553) Matthias needed 'O0 -g' for debugging purposes and apparently forgot to remove the additional options again. Nobody to blame here. Shit happens ...
Fixed in X11:XOrg and SR'ed for openSUSE:Factory.
(In reply to comment #2) > Fixed in X11:XOrg and SR'ed for openSUSE:Factory. Could you add the fix to 11.2 as well?
Sure, that's the plan. :-)
The fix is in 11.2 now for the final release.
Thanks a lot for that finding, Ming! This would probably have gone by unnoticed. Actually, osc is to blame here - there is no way to specify different CFLAGS during compilation for debugging (like we had with the old build method) - thus, one has to modify the spec file, which may accidentally be committed. I even claimed, that one day something like that will happen. Shouldn't have been me, though :-]]]