[PyQt] Compiler Flags and PyQt

Hans-Peter Jansen hpj at urpla.net
Mon Jun 25 19:55:30 BST 2012


On Sunday 24 June 2012, 19:32:44 Phil Thompson wrote:
> On Sun, 24 Jun 2012 12:05:15 -0400, Scott Kitterman
> <debian at kitterman.com>
>
> wrote:
> > Passing the CCPFLAGS via CFLAGS/CXXFLAGS as discussed yesterday
> > worked great
> > for SIP4.  I it mostly working for PyQT, but it doesn't appear that
> > QtCore/QtGui and the Designer plugin aren't getting the all flags. 
> > I'm passing
> > these flags:
> >
> > CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat
> > -Wformat-
> > security -Werror=format-security -D_FORTIFY_SOURCE=2
> > CXXFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4
> > -Wformat -Wformat-
> > security -Werror=format-security -D_FORTIFY_SOURCE=2
> > LFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro
> >
> > It looks like QtCore/QtGui aren't getting the CXXFLAGS
>
> They are as far as I can see.
>
> > and the plugin
> > isn't
> > getting the LFLAGS.
>
> The Designer plugin is built using qmake and doesn't use the SIP
> build system.

One way to get around this issue is propagating the the compiler flags 
into all qt project files as QMAKE_CXXFLAGS.

@Scott: here's how I "solved" this (line 96 ff.):

https://build.opensuse.org/package/view_file?file=python-qt4.spec&package=python-qt4&project=home%3Afrispete%3APyQt&rev=6161032f9d1629c3293dd3356c02dc49

Be careful: studying sed scripts on an empty stomach may result in 
serious personal injury.

Pete


More information about the PyQt mailing list