2009/6/7 Suman Manjunath
On Thu, Jun 4, 2009 at 01:49, Cristian Morales Vega
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?
No, I was just asking myself why qmake was adding those CFLAGS.
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.
But the packages would still be compiled with with debug information. The only difference is that this debug info would not end splitted in a different package.
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.
I tried - CFLAGS="" CXXFLAGS="" CPPFLAGS="" qmake - qmake CFLAGS="" CXXFLAGS="" CPPFLAGS="" and that makes no difference. The thing is that I though somebody patched qmake to add those CFLAGS, and I didn't understood exactly why. I looked at the qt package and I saw no patch to add the flags, so I suppose qmake, as in upstream, creates Makefiles with the CFLAGS that where used to compile qmake itself. Then, since I suppose nobody from openSUSE added those flags expecting the packager to use them I felt free to override them. Finally I used qmake make CXXFLAGS='%{optflags}' ...note that CXXFLAGS='%{optflags}' make neither will work. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org