[yocto] Qt build error for Debug and Release mode

Marc Ferland ferlandm at sonatest.com
Tue Jun 18 08:27:26 PDT 2013


Navani Srivastava <navani.srivastava at gmail.com> writes:

> Hi,
>
> I am using poky-danny (Poky-8.0). I am facing problem in building Qt
> application.
>
>  When we are building Qt application with “qmake CONFIG+=debug &&
> make” it appends “-g” to build the application in debug mode but when
> we are building application in release mode by issuing following
> command  “qmake CONFIG+=debug && make”, then also it appends “-g” to
> it.
>
> So building Qt application in release mode also results in debug mode
> output.
>
> Any fix for this?
>
You could override the OE_QMAKE_CFLAGS env variable like this:
OE_QMAKE_CFLAGS="-O2 -pipe -feliminate-unused-debug-types" make

If you look in the Makefile generated by qmake you should see something
like:

CFLAGS = -pipe -pipe $(OE_QMAKE_CFLAGS) -O2 ....

This OE_QMAKE_CFLAGS variable is evaluated by make from the
environment. Also look at your environment-setup-* file from the
SDK, this is where all OE_QMAKE variables are sourced from.

Marc



More information about the yocto mailing list