Bug 551789 - Xorg builds with -O0 flags?
Summary: Xorg builds with -O0 flags?
Status: RESOLVED FIXED
Alias: None
Product: openSUSE 11.2
Classification: openSUSE
Component: X.Org (show other bugs)
Version: RC 1
Hardware: i586 Other
: P2 - High : Major (vote)
Target Milestone: ---
Assignee: Stefan Dirsch
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-02 08:39 UTC by Ming Xi Wu
Modified: 2009-11-19 10:45 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ming Xi Wu 2009-11-02 08:39:24 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?
Comment 1 Stefan Dirsch 2009-11-02 08:58:35 UTC
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 ...
Comment 2 Stefan Dirsch 2009-11-02 09:09:08 UTC
Fixed in X11:XOrg and SR'ed for openSUSE:Factory.
Comment 3 Ming Xi Wu 2009-11-02 09:57:18 UTC
(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?
Comment 4 Stefan Dirsch 2009-11-02 10:07:51 UTC
Sure, that's the plan. :-)
Comment 5 Andreas Jaeger 2009-11-05 08:32:56 UTC
The fix is in 11.2 now for the final release.
Comment 6 Matthias Hopf 2009-11-19 10:45:27 UTC
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 :-]]]