Setting compilation parameter for qt within portfile

KonaBlend kona8lend at
Fri Dec 2 04:30:27 PST 2011

On 2011-12-02, at 6:11 AM, Ryan Schmidt wrote:

> On Dec 2, 2011, at 02:02, Nicolas Pavillon wrote:
>> The question I would like to ask is related to ticket #30761 (, in which it appears that compilation of qtiplot hangs on Lion, and that changing optimizations options from -O2 to -O0 solves the problem. 
>> The issue is that I tried to change this option at Portfile level, but whatever I could try to adjust flags, the qmake command generates a QMAKE_COMP_QMAKE_OBJECTIVE_CFLAGS variable which defines -O2. 
>> Would someone know how to setup flags correctly to set up correctly this parameter ?
> Usually you would set the optimization level using:
> configure.optflags -O0
> I don't know if Qt uses that though. If not I'd consider it a bug though.
> Are you sure -O0 is necessary? That means all optimization will be disabled, which means the program will be slow.
> _______________________________________________
> macports-dev mailing list
> macports-dev at


Seems to me none of the flags get through. qmake spec files have their own logic and don't care to honour autotool style env vars. I'd speculate it's possible to create some qmake spec files which examine env vars, and patch port:qt4-mac accordingly.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the macports-dev mailing list