Date: Tue, 14 Jul 2015 06:35:11 +0200 From: Polytropon <freebsd@edvax.de> To: =?UTF-8?B?0JLQsNGB0LjQu9C40Lkg0JjQstCw0L3QvtCy0LjRhw==?= <vasya.pupkin.bsd@gmail.com> Cc: freebsd-questions@freebsd.org Subject: Re: How set CFLAGS for individual port? Message-ID: <20150714063511.6e167ffb.freebsd@edvax.de> In-Reply-To: <CAG0PcJV_SYNLLi=2zzDfArFpDBd7rSnBwc%2BHshiyoCDTto%2B4UA@mail.gmail.com> References: <CAG0PcJV_SYNLLi=2zzDfArFpDBd7rSnBwc%2BHshiyoCDTto%2B4UA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 14 Jul 2015 09:08:18 +0500, Василий Иванович wrote: > 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? Try this: .if ${.CURDIR:M*/devel/gettext-tools*} CFLAGS= -O0 -pipe .endif This will apply CFLAGS as intended (and therefore discard any other CFLAGS setting) for the port at its top level as well as any subdirectories. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150714063511.6e167ffb.freebsd>