[OE-core] [PATCH] Yocto: qt4: Let qmake control some compiler/linker flags

Otavio Salvador otavio at ossystems.com.br
Mon Aug 11 00:49:16 UTC 2014


Hello Marek,

On Thu, Aug 7, 2014 at 12:25 PM, Marek Vasut <marex at denx.de> wrote:
> In the case of building an Qt application outside of the Yocto
> build system, we want to make sure that a "debug" configuration
> of the application does contain debug symbols and is has the
> compiler optimalization unset. On the other hand, we want to
> have a "release" build which does not contain the debug symbols
> and has the compiler optimalization turned on.
>
> The OE_QMAKE_* flags serve to pass all kinds of flags into the
> qmake-generated Makefile. Currently, we set OE_QMAKE_CFLAGS to
> be ${CFLAGS} and ditto for CXXFLAGS and LDFLAGS in the SDK
> toolchain environment script. This poses a problem, since the
> CFLAGS can contain optimization options (-O*) and even flags to
> produce debugging info (-g). The LDFLAGS may also contain some
> harmful flags.
>
> The easy way out is to let qmake's army of configuration files
> handle the proper configuration of CFLAGS, CXXFLAGS and LDFLAGS
> for the generated Makefile and don't interfere with qmake's
> decisions by adding arbitrary flags. This patch completely
> scrubs OE_QMAKE_C{,XX}FLAGS and leaves only harmless flags in
> OE_QMAKE_LDFLAGS. With this patch, the behavior is as it is
> explained in the first paragraph.
>
> Signed-off-by: Marek Vasut <marex at denx.de>
> Cc: Eric Bénard <eric at eukrea.com>

I understand your problem however I don't think the solution you found
is optimal. It does fix the issue you refer in the commit log however
it also makes difficult for user to "reuse" default SDK flags to test
the application.

Please also when preparing commit logs please follow the guidelines[1].

1. http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines

All your patches need to be adapted to follow those guidelines on the
commit messages. Please prepare a v2 for them.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750



More information about the Openembedded-core mailing list