Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 07 Feb 2011 22:07:36 +0300
From:      Ruslan Mahmatkhanov <cvs-src@yandex.ru>
To:        Konstantin Tokarev <annulen@yandex.ru>
Cc:        FreeBSD Ports Mailing List <ports@freebsd.org>
Subject:   Re: How to not use OPTIMIZED_FLAGS properly
Message-ID:  <4D5042F8.70202@yandex.ru>
In-Reply-To: <567921297101056@web95.yandex.ru>
References:  <4D502D22.3000200@yandex.ru> <567921297101056@web95.yandex.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
07.02.2011 20:50, Konstantin Tokarev пишет:
>
>
> 07.02.2011, 20:34, "Ruslan Mahmatkhanov"<cvs-src@yandex.ru>:
>> Hello.
>>
>> I'm working on port that doesn't builds with "-O2 -pipe", that passed to
>> Makefile by default (it exits with message about virtual memory is
>> exhausted). I can avoid this by setting CFLAGS="" and CXXFLAGS="" in
>> CONFIGURE_ENV. But portlint is complaining like this:
>>
>> WARN: Makefile: CFLAGS/CXXFLAGS are not needed in CONFIGURE_ENV as they
>> are already added there in bsd.port.mk.
>> FATAL: Makefile: CFLAGS are clobbered in CONFIGURE_ENV.  Alter CFLAGS in
>> the Makefile with CFLAGS+=... instead
>> FATAL: Makefile: CXXFLAGS are clobbered in CONFIGURE_ENV.  Alter
>> CXXFLAGS in the Makefile with CXXFLAGS+=... instead
>>
>> What is the right way to do the job?
>>
>> PS. If i set -O0 in CONFIGURE_ENV, it's later redefined to "-O2 -pipe".
>
> 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.

-- 
Regards,
Ruslan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D5042F8.70202>