How to not use OPTIMIZED_FLAGS properly

Ruslan Mahmatkhanov cvs-src at yandex.ru
Tue Feb 8 15:33:39 UTC 2011


07.02.2011 23:52, b. f. пишет:
> On 2/7/11, Ruslan Mahmatkhanov<cvs-src at yandex.ru>  wrote:
> ...
>> Yes. I get it wrong what Konstantin and portlint are said. Sorry.
>> CFLAGS=-O0 out of CONFIGURE_ENV works just fine. Thanks.
>
> Note that CFLAGS=-O0 is (even) more restrictive than CFLAGS+=-O0 --
> the latter just overrides the -On setting for n>  0, while the former
> also overrides all other user flags.  Generally speaking, the latter
> should be preferred, as part of our attempt to honor user-defined
> CFLAGS.

Yes. So i decide to stick with Cyrille suggestion and use
CFLAGS:=	${CFLAGS:N-O*:N-pipe}
CXXFLAGS:=	${CXXFLAGS:N-O*:N-pipe}

to avoid just -O and -pipe while keeping other user defined flags untouched.

> ...
>>> 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?
> ...
>> 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.
>
> That's a start.  But I think that this needs more investigation,
> beginning with the code that causes the base system compiler to become
> a hog.

Yes, but i'm not sure that i skilled enough in things like that, i just 
can say that it doesn't working with optimization flags, and working 
without.

There is updated (and i believe finished) version of port:
http://happy-nation.by.ru/ports/gimp-gmic-plugin.shar.txt

If anybody can test or review - that's would be great. Thanks.

-- 
Regards,
Ruslan


More information about the freebsd-ports mailing list