Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Aug 2011 18:20:35 +0200
From:      Dimitry Andric <dim@FreeBSD.org>
To:        "Hartmann, O." <ohartman@zedat.fu-berlin.de>
Cc:        freebsd-current <freebsd-current@freebsd.org>
Subject:   Re: CLANG; still cc in use when building the WORLD with CLANG?
Message-ID:  <4E5D0DD3.20606@FreeBSD.org>
In-Reply-To: <4E5CB1E9.9080801@zedat.fu-berlin.de>
References:  <4E5CB1E9.9080801@zedat.fu-berlin.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2011-08-30 11:48, Hartmann, O. wrote:
>     I'm building world with CLANG  (or I pretend to do so).
>     In my /etc/make.conf I use these lines:
>     ###
>     ###     CLANG
>     ###
>     .if defined(USE_CLANG)
>     .if !empty(.CURDIR:M/usr/src*)

You should add "|| !empty(.CURDIR:M:/usr/obj*)" to this .if statement,
because the build build process changes to directories inside /usr/obj
for various steps.  Alternatively, use the simpler:

.if empty(.CURDIR:N/usr/src*:N/usr/obj*)

Alternatively, just remove the statement, and use clang for everything,
and help fix bugs in ports. :)


>     CFLAGS= -O3 -march=native -mtune=native -fno-strict-aliasing -pipe
>     COPTFLAGS= -O3 -march=native -mtune=native -pipe

Take care when using clang and -march=native, there are still some
issues with it (search this mailing list for specifics).  If anything
goes wrong, first revert to the default CFLAGS and COPTFLAGS (e.g.
comment them out), and try again.



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