atom feed18 messages in org.freebsd.freebsd-currentRe: "/sys/conf/kmod.mk", line 111: Ma...
FromSent OnAttachments
O. HartmannMar 3, 2012 3:48 am 
Chris ReesMar 3, 2012 5:23 am 
Dimitry AndricMar 3, 2012 6:18 am 
Florian SmeetsMar 3, 2012 6:19 am 
Dimitry AndricMar 3, 2012 6:25 am 
O. HartmannMar 3, 2012 7:42 am 
ChrisApr 15, 2012 6:03 pm 
Dimitry AndricApr 15, 2012 11:44 pm 
ChrisApr 16, 2012 3:41 pm 
Anton ShterenlikhtApr 16, 2012 4:08 pm 
Dimitry AndricApr 17, 2012 2:18 am 
Anton ShterenlikhtApr 17, 2012 2:36 am 
Dimitry AndricApr 17, 2012 2:49 am 
Anton ShterenlikhtApr 17, 2012 3:52 am 
Arno J. KlaassenApr 17, 2012 8:59 am 
Mark LinimonApr 17, 2012 9:03 am 
Kevin ObermanApr 17, 2012 12:27 pm 
Dimitry AndricApr 17, 2012 1:52 pm 
Subject:Re: "/sys/conf/kmod.mk", line 111: Malformed conditional (${MK_CLANG_IS_CC}
From:Dimitry Andric (di@FreeBSD.org)
Date:Apr 17, 2012 1:52:22 pm
List:org.freebsd.freebsd-current

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 <bsd.own.mk> .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. :)