From owner-freebsd-current@freebsd.org Sat Mar 4 01:21:55 2017 Return-Path: Delivered-To: freebsd-current@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 43B01CF75DB for ; Sat, 4 Mar 2017 01:21:55 +0000 (UTC) (envelope-from FreeBSD@shaneware.biz) Received: from ipmail04.adl6.internode.on.net (ipmail04.adl6.internode.on.net [150.101.137.141]) by mx1.freebsd.org (Postfix) with ESMTP id 807D61BF4; Sat, 4 Mar 2017 01:21:53 +0000 (UTC) (envelope-from FreeBSD@shaneware.biz) Received: from 124-169-241-186.dyn.iinet.net.au (HELO leader.local) ([124.169.241.186]) by ipmail04.adl6.internode.on.net with ESMTP; 04 Mar 2017 11:46:43 +1030 Subject: Re: CFLAGS for certain ports To: Julian Elischer , Dimitry Andric , Mingo Rrubioer References: Cc: freebsd-current@freebsd.org From: Shane Ambler Message-ID: Date: Sat, 4 Mar 2017 11:46:40 +1030 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Mar 2017 01:21:55 -0000 On 04/03/2017 02:17, Julian Elischer wrote: > On 2/3/17 8:58 pm, Dimitry Andric wrote: >> On 2 Mar 2017, at 12:02, Mingo Rrubioer wrote: >>> I would like to see how well FreeBSD does as a workstation OS in the >>> HPC world due to its stability and reliability, as well as LLVM/clang. >>> I would like to know if FreeBSD has something similar to Gentoo's >>> /etc/portage/make.conf file and /etc/portage/package.use/* files in >>> order to compile certain ports with certain compiler flags. >> It doesn't, though it would certainly be nice to have something like it >> at some point. The current idiom is to put something similar to the >> following in your /etc/make.conf: >> >> .if ${.CURDIR:M/usr/ports/foo/bar} >> CFLAGS+= [... flags for the foo/bar port ...] >> .endif >> >> .if ${.CURDIR:M/usr/ports/what/ever} >> CFLAGS+= [... flags for the what/ever port ...] >> .endif >> We can also put a Makefile.local in the port directory. There can also be arch and system specific makefiles. See /usr/ports/Mk/bsd.port.mk from about line 1211 https://svnweb.freebsd.org/ports/head/Mk/bsd.port.mk?view=markup#l1211 -- FreeBSD - the place to B...Software Developing Shane Ambler