Re: Building world with clang ToT

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Wed, 12 Sep 2012 14:15:34 +0200
On 2012-09-12 13:45, Edward Meewis wrote:
...
> I added the following lines to each individual Makefile it stumbled on:
>
> CFLAGS+= -I/usr/obj/usr/home/emeewis/src/FreeBSD-HEAD/tmp/usr/include
>
> LDADD+=-L/usr/obj/usr/home/emeewis/src/FreeBSD-HEAD/tmp/usr/lib
> or:
> LDFLAGS+=-L/usr/obj/usr/home/emeewis/src/FreeBSD-HEAD/tmp/usr/lib
>
> I hope to find a better place to set those, but it will do for now.

Normally this should never be done, but it could work in theory.


...
>> There must be a certain setting on your system which causes this. Most
>> likely, it is again using your existing system headers, instead of those
>> in /usr/obj.
>
> I suppose so, but where?
...
> /etc/make.conf:
> ----------------------
> #
> # Clang
> #
> USE_CLANG?=no
> #
> .if ${USE_CLANG} == "yes"
> .if !defined(CC) || ${CC} == "cc"
> CC=/usr/local/bin/clang

Don't use absolute paths here, it will not work for buildworld.  This
has been discussed recently in another thread.  (Not an issue with
clang or gcc, but with the way buildworld bootstraps its compiler in
general.)


...
> /etc/src.conf
> ------------------
> # src.conf - Source build options
>
> #WITHOUT_TOOLCHAINS="yes"
>
> WITHOUT_ATM="yes"
> WITHOUT_BLUETOOTH="yes"
> WITHOUT_BSNMP="yes"
> WITHOUT_CDDL="yes"
> WITHOUT_CLANG="yes"
> WITHOUT_CTM="yes"
> WITHOUT_CVS="yes"
> WITHOUT_GCC="yes"

I don't think buildworld can ever work correctly, if you have both
WITHOUT_CLANG and WITHOUT_GCC defined, at least not with how it is
currently implemented.

At least, certainly not for a -CURRENT build on -STABLE, that is.  If
you'd build this on a fully installed -CURRENT box, it might complete,
but again, no guarantees.

Try building with gcc, while removing the WITHOUT_GCC line, or building
with clang, while removing the WITHOUT_CLANG line.
Received on Wed Sep 12 2012 - 10:15:33 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:30 UTC