Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Apr 2012 22:52:45 +0200
From:      Dimitry Andric <dim@FreeBSD.org>
To:        "Arno J. Klaassen" <arno@heho.snv.jussieu.fr>
Cc:        Chris Rees <crees@freebsd.org>, Chris <behrnetworks@gmail.com>, Current FreeBSD <freebsd-current@freebsd.org>, "O. Hartmann" <ohartman@zedat.fu-berlin.de>, Doug Barton <dougb@freebsd.org>
Subject:   Re: "/sys/conf/kmod.mk", line 111: Malformed conditional (${MK_CLANG_IS_CC}
Message-ID:  <4F8DD81D.8090802@FreeBSD.org>
In-Reply-To: <wp1unmxsbm.fsf@heho.snv.jussieu.fr>
References:  <4F520523.90406@zedat.fu-berlin.de> <CADLo838ZKXXS4mVcjG3cnRp=aQdx5Cpas6DLiSsGQO1acqHnwQ@mail.gmail.com> <4F52286E.4030608@FreeBSD.org> <4F523C1A.4060008@zedat.fu-berlin.de> <CAFYLaXPveMM0RCoHSLpG8i2-i6cStWSPrf4FkzZu63Eg--UE%2Bw@mail.gmail.com> <4F8BBFF3.50205@FreeBSD.org> <CAFYLaXNfYD0E6UbXHO9gBYY0x3eNACQDstubaPZSL_6x4tMzSw@mail.gmail.com> <20120416230857.GA26957@mech-cluster241.men.bris.ac.uk> <4F8D3565.2020803@FreeBSD.org> <wp1unmxsbm.fsf@heho.snv.jussieu.fr>

next in thread | previous in thread | raw e-mail | index | archive | help
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. :)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F8DD81D.8090802>