[Qt-interest] How can I remove CFLAGS -O2 using project file?

phil prentice philp.cheer at talktalk.net
Thu Nov 11 13:21:26 CET 2010


Hi
  I now understand.  Basically I can turn optimisation off by setting
  QMAKE_CFLAGS_RELEASE = -O0

  That now fixes my problem. I did not realise that QMAKE_CFLAGS_RELEASE  
modifies the -O flag according to whats set in QMAKE_CFLAGS_RELEASE. I also 
did not realise that -O0 turns off optimsation.

Thanks

Phil
On Thursday 11 November 2010 11:20, phil prentice wrote:
> Hi
>
>   I have built a Qt application which runs happily (with the -O2 set for
> the CFLAGS) on one machine, but fails on a different machine.  It works
> fine when -O2 is removed.
>
>   I discovered that if I added a dummy function call between a couple of
> statements that it fixed the problem.  I believe that it is a compiler
> problem and simply would like to remove the -O2 option from the Makefile
> (just for this project).
>
>   I've tried doing
>
> QMAKE_CFLAGS_RELEASE =  -Wall -W -D_REENTRANT  $(DEFINES)
>
> but it simply adds to what was there before.  I just want to remove the
> -O2.
>
> Whats the easiest way to do this??  I would like to be able to just do it
> for this project?  Leaving all other projects as is.
>
> Thanks
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest



More information about the Qt-interest-old mailing list