This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours

Bug 742780

Summary: libreoffice-sdk: settings.mk adds an extra -O when building extensions
Product: [Fedora] Fedora Reporter: Ville-Pekka Vainio <vpvainio>
Component: libreofficeAssignee: Stephan Bergmann <sbergman>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 18CC: caolanm, dtardon, ltinkl, sbergman
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libreoffice-4.0.0.3-8.fc19 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-20 12:03:47 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Ville-Pekka Vainio 2011-10-02 15:19:02 EDT
Description of problem:
settings.mk adds the -O switch to CC_FLAGS, but Fedora's $RPM_OPT_FLAGS, which should be passed to the extension build, already define -O2. This makes the -O unnecessary.

Version-Release number of selected component (if applicable):
libreoffice-sdk-3.3.3.1-6.fc15 and the 3.4 versions if F-16
Comment 1 David Tardon 2011-10-03 03:05:06 EDT
Come on, does it really bother you so much?
Comment 2 Caolan McNamara 2011-10-03 04:30:27 EDT
Well, we do generally have a policy to try and use the same flags everywhere. -O/-O2 probably isn't that big a deal, but we should be seeing -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 appear in there too, or at least be possible to insert into them when we build an c++ extension from a .spec
Comment 3 Stephan Bergmann 2012-02-21 05:42:37 EST
@vpvainio: btw, looking into this, I note that at least <http://pkgs.fedoraproject.org/gitweb/?p=libreoffice-voikko.git;a=blob;f=libreoffice-voikko.spec;h=2e38aef27f9bd7735d64ed9baa1a10ac0ec4f3c9;hb=1143e45369c65ecec8e6db0ea9eed613c1bcb8f7#l45> sets OPT_FLAGS that appears to be completely unused in libreoffice?
Comment 4 Ville-Pekka Vainio 2012-02-26 15:02:46 EST
(In reply to comment #3)
> @vpvainio: btw, looking into this, I note that at least
> <http://pkgs.fedoraproject.org/gitweb/?p=libreoffice-voikko.git;a=blob;f=libreoffice-voikko.spec;h=2e38aef27f9bd7735d64ed9baa1a10ac0ec4f3c9;hb=1143e45369c65ecec8e6db0ea9eed613c1bcb8f7#l45>
> sets OPT_FLAGS that appears to be completely unused in libreoffice?

I'm not sure I understand what you mean. The Makefile in libreoffice-voikko does use OPT_FLAGS like this:

VOIKKO_CC_FLAGS=$(OPT_FLAGS) $(WARNING_FLAGS) -Ibuild/hpp -I$(PRJ)/include/stl -I$(PRJ)/include

and when building the cpp files:
$(CC) $(CC_FLAGS) $(VOIKKO_CC_FLAGS) $(CC_DEFINES) $(VOIKKO_CC_DEFINES) $(CC_OUTPUT_SWITCH)$@ $<
Comment 5 Fedora End Of Life 2013-01-16 17:14:03 EST
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '16'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 16's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 16 is end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" and open it against that version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 6 Stephan Bergmann 2013-02-20 12:03:47 EST
libreoffice-sdk-4.0.0.3-8.fc19 will allow "make OPT_FLAGS=..." to override any optimization/debugging flags set in the SDK's settings.mk, see upstream <http://cgit.freedesktop.org/libreoffice/core/commit/?id=a14eedf997daf30379ceabc1933273360d4d3188> "rhbz#742780: Let make OPT_FLAGS=... override SDK optimization/debugging flags."