How to not use OPTIMIZED_FLAGS properly
Anonymous
swell.k at gmail.com
Mon Feb 7 21:40:02 UTC 2011
Cyrille Lefevre <cyrille.lefevre-lists at laposte.net> writes:
> Le 07/02/2011 18:34, Ruslan Mahmatkhanov a écrit :
>>
>> 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:
>>
>> What is the right way to do the job?
>
> how about CFLAGS := ${CFLAGS:N-O*:N-pipe} -O
One can also define WITH_DEBUG in the port's makefile until -On is fixed.
# from Mk/bsd.port.mk
.if defined(WITH_DEBUG) && !defined(WITHOUT_DEBUG)
STRIP= #none
STRIP_CMD= ${TRUE}
DEBUG_FLAGS?= -g
CFLAGS:= ${CFLAGS:N-O*:N-fno-strict*} ${DEBUG_FLAGS}
.endif
More information about the freebsd-ports
mailing list