Mailinglist Archive: opensuse-packaging (183 mails)

< Previous Next >
Re: [opensuse-packaging] qmake and CFLAGS
  • From: Suman Manjunath <manjunath.suman@xxxxxxxxx>
  • Date: Sun, 7 Jun 2009 07:01:32 +0530
  • Message-id: <b3adb6c70906061831p1df29c71gcc5bc419a6571cb1@xxxxxxxxxxxxxx>
On Thu, Jun 4, 2009 at 01:49, Cristian Morales Vega<cmorve69@xxxxxxxx> wrote:
I have a program that compiles with just qmake && make.
Since here there is no macro that can set the CFLAGS one would suppose
that the "-fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2
-fstack-protector -funwind-tables -fasynchronous-unwind-tables" CFLAGS
would not be used. Somehow qmake adds them (openSUSE patch?), but I
have no idea about how that works.

OK.. So what is the problem? Does adding the CFLAGS break your package?

And it seems to add a -g even if
you aren't creating debug packages.

You can avoid debug packages by using

nodebugpackage

in your spec-file IIRC.

So, how these packages should be created? Should I rely in qmake
magic? There are any QT specific macros that I should use?

There is no magic. If your packages fail because the CFLAGS (they are
actually the RPM_OPT_FLAGS) gets added, then one way to skip them is
to use:

CFLAGS="" qmake

instead of

qmake <or whatever you are using right now>

Be advised that using the RPM_OPT_FLAGS is always the better option.

-Suman
--
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-packaging+help@xxxxxxxxxxxx

< Previous Next >