respect CFLAGS: should I override optimizations?
krion at voodoo.oberon.net
Tue Jun 1 00:47:11 PDT 2004
On Tue, Jun 01, 2004 at 01:31:06AM +0200, Roman Neuhauser wrote:
> I'm updating biology/migrate, the upstream Makefile.in includes
> CFLAGS = @CFLAGS@ ...
> and configure says:
> case "$GCC" in
> yes) CFLAGS="-O3 -Wall -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations -D$CPUTYPE" ;;
> If I was to take Porter's Hang^Hdbook literally, I would change the
> set (=) to append (+=) and be done with it, but is that really what
> I'm expected to do? Or should I filter out the -O3 on the assumption
> that optimization levels are make.conf's business?
If you need to switch on some optimizations, you can use
WITH_OPTIMIZED_CFLAGS knob and define CFLAGS+=$optimized_cflags
Porters Handbook expresses clearly:
"The port should respect the CFLAGS variable. What we mean by
this is that the port should not set the value of this variable
absolutely, overriding the existing value; instead, it should
append whatever values it needs to the existing value. This is
so that build options that affect all ports can be set
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20040601/620be13b/attachment.bin
More information about the freebsd-ports