Andrey Borzenkov wrote:
> On Sunday 05 of July 2009 13:31:05 Amrein-Marie Christophe wrote:
>> Le dimanche 05 juillet 2009 à 13:23 +0400, Andrey Borzenkov a écrit :
>>> I'm trying to build aqemu. It fails on printf format error, but
>>> disabling it in specs is ineffective; Makefile is generated by
>>> qmake and C(XX)FLAGS are statically set in Makefile.
>>>
>>> Unfortunately using make CFLAGS=... does not work either because
>>> CFLAGS are built from other variables as well:
>>>
>>> CXXFLAGS = -pipe -O2 -g -pipe -Wformat -Werror=format-security
>>> - Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
>>> --param=ssp- buffer-size=4 -Wall -W -D_REENTRANT $(DEFINES)
>>>
>>> I hope, that it is possible to override template CFLAGS during
>>> qmake invocation. Is it possible?
>> Use %{qmake_qt4} to create the Makefiles in your rpm .spec file.
>
> This does not work because our qmake templates *unconditionally* add
> options (have you actually tried it? Passing QMAKE_CXXFLAGS at qmake
> invocation was the first thing I tried :) )
Look at /usr/lib/qt4/mkspecs/common/g++.conf.
So, pass QMAKE_CXXFLAGS_RELEASE="%optflags" to qmake, it works :)
Probably %qmake_qt4 should also be fixed.
--
Anssi Hannula