How to not use OPTIMIZED_FLAGS properly

Ruslan Mahmatkhanov cvs-src at
Mon Feb 7 20:15:50 UTC 2011

07.02.2011 22:28, b. f. пишет:
>>> Have you tried CFLAGS+=-O0 as portlint suggested?
>> As i said before i tried that. If i'm using +=-O0 then it changes to -O2
>> -pipe. If i'm using =-O0, then all builds fine, but this make portlint
>> complaining.
> CFLAGS and CXXFLAGS are already passed by default in do-configure, as
> portlint states.  Why aren't you simply defining them, by themselves
> and not as a part of CONFIGURE_ENV, in the port Makefile?:

Yes. I get it wrong what Konstantin and portlint are said. Sorry.
CFLAGS=-O0 out of CONFIGURE_ENV works just fine. Thanks.

> This seems pessimistic, by the way.  Have you tried adding other
> compiler flags, like those to control the compiler's memory usage? Or
> using another compiler via USE_GCC, or patching the source code?
> b.

Yes, i tried different flags that affect gcc memory usage, but w/o any 
success. I'm actually started from patching source code - removing 
optimization flags from distribution Makefiles.


More information about the freebsd-ports mailing list