From owner-freebsd-current@FreeBSD.ORG Tue Apr 17 20:52:50 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8A3C7106566C; Tue, 17 Apr 2012 20:52:50 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 3E9C58FC17; Tue, 17 Apr 2012 20:52:50 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:920:4d88:e4b9:4d05] (unknown [IPv6:2001:7b8:3a7:0:920:4d88:e4b9:4d05]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 7692E5C37; Tue, 17 Apr 2012 22:52:49 +0200 (CEST) Message-ID: <4F8DD81D.8090802@FreeBSD.org> Date: Tue, 17 Apr 2012 22:52:45 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120410 Thunderbird/12.0 MIME-Version: 1.0 To: "Arno J. Klaassen" References: <4F520523.90406@zedat.fu-berlin.de> <4F52286E.4030608@FreeBSD.org> <4F523C1A.4060008@zedat.fu-berlin.de> <4F8BBFF3.50205@FreeBSD.org> <20120416230857.GA26957@mech-cluster241.men.bris.ac.uk> <4F8D3565.2020803@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Chris Rees , Chris , Current FreeBSD , "O. Hartmann" , Doug Barton Subject: Re: "/sys/conf/kmod.mk", line 111: Malformed conditional (${MK_CLANG_IS_CC} X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 17 Apr 2012 20:52:50 -0000 On 2012-04-17 17:59, Arno J. Klaassen wrote: ... > I verified and re-verfied : kernel and world perfectly in sync; /usr/src > is a symlink but /sys points to the right place and (before patch) > /usr/share/mk/bsd.own.mk and /usr/src/share/mk/bsd.own.mk are > indentical. > > Still I have to apply something like the following patch to get > VirtualBox kernel module compiled (no idea who/where MK_CLANG_IS_CC > gets set to "no", AFAIK not by me (I don't use src.conf and nothing > about CLANG in make.conf). I was going to say that all the MK_XXX defines get set in bsd.own.mk, but apparently there is an exception specifically for ports! It has the following fragment: [...] .if !defined(_WITHOUT_SRCCONF) # # Define MK_* variables (which are either "yes" or "no") for users # to set via WITH_*/WITHOUT_* in /etc/src.conf and override in the # make(1) environment. while bsd.port.mk has: [...] # Needed to keep bsd.own.mk from reading in /etc/src.conf # and setting MK_* variables when building ports. _WITHOUT_SRCCONF= [...] .include .include "${BSDPORTMK}" So those variables intentionally don't get set. This is bit of a pity, since particularly the information that '/usr/bin/cc' can be gcc or clang (indicated by MK_CLANG_IS_CC) is rather relevant for ports. Of course, that setting is normally configured in src.conf(5), which emphatically does *not* apply to ports, but since it influences what /usr/bin/cc will be, it is still of interest. E.g. you can't detect anymore whether someone is using clang by checking ${CC}... I'm not sure what the best solution is in this case, I would really like some feedback from ports people. :)