From owner-freebsd-ports@FreeBSD.ORG Sun Nov 25 15:04:39 2012 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0B1EC710 for ; Sun, 25 Nov 2012 15:04:39 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) by mx1.freebsd.org (Postfix) with ESMTP id B7F368FC14 for ; Sun, 25 Nov 2012 15:04:38 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:506f:2496:5d7d:d4f3] (unknown [IPv6:2001:7b8:3a7:0:506f:2496:5d7d:d4f3]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 546A55C59; Sun, 25 Nov 2012 16:04:36 +0100 (CET) Message-ID: <50B23382.3030600@FreeBSD.org> Date: Sun, 25 Nov 2012 16:04:34 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Tobias Rehbein Subject: Re: How to handle WITH_CLANG_IS_CC in ports References: <20121125114918.GA35966@oshi.local> In-Reply-To: <20121125114918.GA35966@oshi.local> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Nikolai Lifanov , freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Nov 2012 15:04:39 -0000 On 2012-11-25 12:49, Tobias Rehbein wrote: > I am the maintainer of ganes/stonesoup. This port builds fine with gcc. > It also builds with clang, if the MAKE_ARGS are tweaked. > > Currently I can check for > > ${CC:T:M*clang*} > > to know if I have to change the MAKE_ARGS for building with clang or > not. > > In CURRENT cc is clang and the environment variable CC is no longer set. > This lets the build of games/stonesoup fail. My question is how to > correctly check if cc is clang or not. My first guess was something > along the lines of > > ${CC:T:M*clang*} || (defined(WITH_CLANG_IS_CC) && ${CC:T:Mcc}) > > but I guess there is some kind of official way to handle this (ideally > warpped in some Mk macro. Just check if OSVERSION >= 1000024, maybe? Or add some logic to bsd.port.mk that handles this, like was done with pkgng. For example, introducing a PORTS_COMPILER_TYPE macro like in base.