The port must respect the CFLAGS
variable. What we mean by this is that the port must not
set the value of this variable absolutely, overriding the
existing value; instead, it may append whatever values it
needs to the existing value. This is so that build options
that affect all ports can be set globally.
If it does not, please add NO_PACKAGE=ignores
cflags to the
Makefile.
An example of a Makefile respecting
the CFLAGS variable follows. Note the
+=:
Here is an example which does not respect the
CFLAGS variable:
The CFLAGS variable is defined on
FreeBSD systems in /etc/make.conf. The
first example appends additional flags to the
CFLAGS variable, preserving any system-wide
definitions. The second example clobbers anything previously
defined.
You should remove optimization flags from the third party
Makefiles. System
CFLAGS contains system-wide optimization
flags. An example from an unmodified
Makefile:
Using system optimization flags, the
Makefile would look similar to the
following example:
This, and other documents, can be downloaded from ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/
For questions about FreeBSD, read the
documentation before
contacting <questions@FreeBSD.org>.
For questions about this documentation, e-mail <doc@FreeBSD.org>.