New: Toolchains qmake causes DEBUG builds with -O2
https://bugs.busybox.net/show_bug.cgi?id=4303
Summary: Toolchains qmake causes DEBUG builds with -O2
Product: buildroot
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: minor
Priority: P5
Component: Other
AssignedTo: unassigned at buildroot.uclibc.org
ReportedBy: buildroot at bluespirit.la
CC: buildroot at uclibc.org
Estimated Hours: 0.0
Created attachment 3637
--> https://bugs.busybox.net/attachment.cgi?id=3637
.config file of buildroot 2011.08
When compiling/installing Qt with buildroot, also the qmake.conf is correct. When buildroot is compiled with the "-O2" flag, the QMAKE_CXXFLAGS of qmake.conf also includes the "-O2" flag, which causes that all builds (even the DEBUG ones) are compiled with "-O2", and thus the debugger goes crazy ;)
I would suggest, that when writing the QMAKE_CXXFLAGS (and QMAKE_CFLAGS) to qmake.conf, we should filter the flags (e.g. -pipe is ok).
############ Result ##############
#
# qmake configuration for building with arm-linux-g++ #
include(../../common/g++.conf)
include(../../common/linux.conf)
include(../../common/qws.conf)QMAKE_LFLAGS =QMAKE_CXXFLAGS = -pipe -O2 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64QMAKE_CFLAGS = -pipe -O2 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64QMAKE_STRIP = /opt/damian/toolchain-arm/usr/bin/arm-none-linux-gnueabi-stripQMAKE_RANLIB =/opt/damian/toolchain-arm/usr/bin/arm-none-linux-gnueabi-ranlib QMAKE_OBJCOPY = /opt/damian/toolchain-arm/usr/bin/arm-none-linux-gnueabi-objcopyQMAKE_AR = /opt/damian/toolchain-arm/usr/bin/arm-none-linux-gnueabi-ar
cqsQMAKE_LINK_SHLIB = /opt/damian/toolchain-arm/usr/bin/arm-none-linux-gnueabi-g++
QMAKE_LINK = /opt/damian/toolchain-arm/usr/bin/arm-none-linux-gnueabi-g++ QMAKE_CXX = /opt/damian/toolchain-arm/usr/bin/arm-none-linux-gnueabi-g++ QMAKE_CC = /opt/damian/toolchain-arm/usr/bin/arm-none-linux-gnueabi-gcc
# modifications to g++.conf
# modifications to linux.conf
load(qt_config)
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
[Buildroot] [Bug 4303] Toolchains qmake causes DEBUG builds with -O2
https://bugs.busybox.net/show_bug.cgi?id=4303
Thomas Petazzoni <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WONTFIX--- Comment #1 from Thomas Petazzoni <[email protected]> 2012-01-31 22:21:05 UTC --- Why should we make a special case for Qt here ? If you tell Buildroot to use
-O2, then it sounds quite logical to have -O2 in the qmake CXXFLAGS, no ? If
you don't want -O2 in the qmake CXXFLAGS, then tell Buildroot to not use -O2,
and you're all set.
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
[Buildroot] [Bug 4303] Toolchains qmake causes DEBUG builds with -O2
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=4303
--- Comment #2 from Will Wagner <[email protected]> 2012-02-01 08:45:47 UTC --- (In reply to comment #1)
Quoted 4 lines
Why should we make a special case for Qt here ? If you tell Buildroot to use -O2, then it sounds quite logical to have -O2 in the qmake CXXFLAGS, no ? If you don't want -O2 in the qmake CXXFLAGS, then tell Buildroot to not use -O2, and you're all set.
The reason Qt is different from other packages is that there is a menu option on whether you want to build debug or release. If you were to select debug it doesn't seem unreasonable that it should be built with -O0.
That said, I'm not too bothered about seeing this fixed.
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.