Red Hat Bugzilla – Bug 489528
Strange assignment in linux-g++/qmake.conf
Last modified: 2009-03-12 11:10:36 EDT
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
These are the default compiler flags by which all of fedora is compiled with.
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).
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.
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.
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.
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.
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.
We also configure qmake not to strip by default for the same reason we have it use -g by default.