Bug 489528

Summary: Strange assignment in linux-g++/qmake.conf
Product: [Fedora] Fedora Reporter: Ivan Efremov <iefremov>
Component: qtAssignee: Than Ngo <than>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 10CC: kevin, rdieter, than
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-03-12 14:09:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ivan Efremov 2009-03-10 15:57:09 UTC
Description of problem:

linux-g++/qmake.conf contains the following line:

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

The question is: Why does CFLAGS_RELEASE variable contains '-g' debugging flag? Right after '-O2'? There shouldnt be any debuginfo when building in release mode.

Version-Release number of selected component (if applicable): 4.4.3

Comment 1 Rex Dieter 2009-03-10 17:55:16 UTC
These are the default compiler flags by which all of fedora is compiled with.

Comment 2 Rex Dieter 2009-03-10 17:59:15 UTC
well, I'll discuss it with my fellow qt/kde maintainers, maybe we could consider kicking out -g (but that would likely have ill side-effects building other qt-related packages in fedora... which we may or may not be willing to deal with).

Comment 3 Kevin Kofler 2009-03-10 19:04:39 UTC
We build our release binaries with debugging information in Fedora and then have RPM split it into separate files which land in separate -debuginfo packages.

Comment 4 Ivan Efremov 2009-03-11 06:41:28 UTC
OK, I understand, but it really looks like a some kind of hack, because other major linux distributions (AFAIK, including fedora 9) don't use such _global_ assignments.

Comment 5 Ivan Efremov 2009-03-11 06:45:53 UTC
In fact it really affects applications which have qmake-based build system. It looks very strange when you build application (and create binary packages) in a _standard_ way on number of linuxes, and resulting _release_ binaries on fedora 10 are ten times bigger than others because of debug information.

Comment 6 Than Ngo 2009-03-12 14:09:10 UTC
It's the default compiler flag in fedora what is needed to get the debug infos. The user still can strip the binary with install -s that is supported in Makefiles by install, if they don't want the debug information.

Comment 7 Ivan Efremov 2009-03-12 14:21:23 UTC
Yes sure, but installation instructions in makefiles are also generated by qmake. And when I use everything by default it doesn't include strip to Makefile. It's specific problem only of fedora 10.

Comment 8 Kevin Kofler 2009-03-12 15:10:36 UTC
We also configure qmake not to strip by default for the same reason we have it use -g by default.