How set CFLAGS for individual port?

Василий Иванович vasya.pupkin.bsd at gmail.com
Tue Jul 14 04:08:21 UTC 2015


Hi!

I have a -CURRENT i386 machine. And my make.conf have build options:
CFLAGS= -Os -pipe
But some ports not builds by clang 3.6.1 with any optimizations except -O0
(for example devel/gettext-tools), and solution for older BSD versions:
.if ${.CURDIR} == "/usr/ports/devel/gettext-tools"
    CFLAGS= -O0 -pipe
.endif

not works now. It give that error:
make: "/etc/make.conf" line 26: Unassociated shell command "CFLAGS      =
-O0 -pipe -march=pentium-m"
make: Fatal errors encountered -- cannot continuemake: "/etc/make.conf"
line 26: Unassociated shell command "CFLAGS     = -O0 -pipe
-march=pentium-m"
make: Fatal errors encountered -- cannot continue===>>> Launching 'make
checksum' for devel/gettext-tools in background
make: make: ""/etc/make.conf/etc/make.conf" line 26: " line 26:
Unassociated shell command "CFLAGS      = -O0 -pipe
-march=pentium-m"Unassociated shell command "CFLAGS = -O0 -pipe
-march=pentium-m"

make: Fatal errors encountered -- cannot continuemake: Fatal errors
encountered -- cannot continue
make: stopped in /usr/ports/devel/gettext-tools
===>>> Gathering dependency list for devel/gettext-tools from ports
make: "/etc/make.conf" line 26: Unassociated shell command "CFLAGS      =
-O0 -pipe -march=pentium-m"
make: Fatal errors encountered -- cannot continue
===>>> Cannot cd to make:
===>>> Aborting update

How can i set various build options for individual ports?


More information about the freebsd-questions mailing list