From owner-freebsd-questions@freebsd.org Tue Jul 14 04:35:21 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C065999CEA1 for ; Tue, 14 Jul 2015 04:35:21 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8474C2D56 for ; Tue, 14 Jul 2015 04:35:21 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de (port-92-195-74-114.dynamic.qsc.de [92.195.74.114]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.qsc.de (Postfix) with ESMTPS id 812AD3CD0B; Tue, 14 Jul 2015 06:35:12 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id t6E4ZBof005931; Tue, 14 Jul 2015 06:35:12 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Tue, 14 Jul 2015 06:35:11 +0200 From: Polytropon To: =?UTF-8?B?0JLQsNGB0LjQu9C40Lkg0JjQstCw0L3QvtCy0LjRhw==?= Cc: freebsd-questions@freebsd.org Subject: Re: How set CFLAGS for individual port? Message-Id: <20150714063511.6e167ffb.freebsd@edvax.de> In-Reply-To: References: Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2015 04:35:21 -0000 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, ...