Bug 338791

Summary: qmake-qt4 does not honour $RPM_OPT_FLAGS
Product: [Fedora] Fedora Reporter: Till Maas <opensource>
Component: qt4Assignee: Ngo Than <than>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: high    
Version: 7   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-10-18 21:52:12 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 235703    

Description Till Maas 2007-10-18 16:52:57 EDT
Description of problem:

According to Rex Dieter[1] qmake-qt4 should honour $RPM_OPT_FLAGS by default,
e.g. when the Makefile for vym is generated, it should contain the contents of
$RPM_OPT_FLAGS in (C|CXX|L)FLAGS, but it does not do this always (or maybe
never), e.g.:
http://koji.fedoraproject.org/koji/getfile?taskID=202276&name=build.log


[1] https://www.redhat.com/archives/fedora-devel-list/2007-October/msg01447.html

Version-Release number of selected component (if applicable):
4.3.2-1.fc8


How reproducible:

Always, first seen on a local Fedora 7 build.

Steps to Reproduce:
1. use qmake-qt4 on vym.pro from
http://downloads.sourceforge.net/vym/vym-1.10.0.tar.bz2
  
Actual results:

contents of $RPM_OPT_FLAGS do not appear, e.g. -fstack-protector or
-Wp,-D_FORTIFY_SOURCE=2

Expected results:
Everything should be compiled with at least these flags:

-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic
-fasynchronous-unwind-tables

Additional info:

If this is not only a problem of vym, but other packages built with using qmake,
then they should be rebuild with the correct flags, because they add protection
against some security flaws. Therefore I add F8Blocker to "Blocks".
Comment 1 Rex Dieter 2007-10-18 21:41:54 EDT
This is most likely a bug in vym, not qt4. 

I'll go take a closer look.
Comment 2 Rex Dieter 2007-10-18 21:46:33 EDT
For examples, see
/usr/lib/qt4/mkspecs/linux-g++/qmake.conf
or
/usr/lib64/qt4/mkspecs/linux-g++-64/qmake.conf
Comment 3 Rex Dieter 2007-10-18 21:52:12 EDT
vym.pro needs
CONFIG += ... release
instead of 'debug' in there somewhere to inherit the proper flags.

'debug' targets purposely omit optimization flags.