Can't update CLang-based system
Dimitry Andric
dim at FreeBSD.org
Mon Feb 28 12:06:34 UTC 2011
On 2011-02-28 04:30, Tim Kientzle wrote:
> I have a FreeBSD-CURRENT AMD64 system here that was last updated at r215029.
>
> I'm trying to update it to r219079, but the build fails in lib/libz when it tries to compile gvmat64.S. It looks like the Makefile here has a workaround for clang on AMD64, but it doesn't seem to actually be working in this case.
For this to work, you must put the following fragment in /etc/make.conf,
*not* in /etc/src.conf.
.if !defined(CC) || ${CC} == "cc"
CC=clang
.endif
.if !defined(CXX) || ${CXX} == "c++"
CXX=clang++
.endif
# Don't die on warnings
NO_WERROR=
WERROR=
The problem with src.conf is that is only read when make encounters a
.include <bsd.lib.mk> or <bsd.prog.mk> statement, which usually is at
the end of a Makefile. Thus, any checks done on ${CC} or ${CXX} in the
beginning of a Makefile pick up only the default value.
More information about the freebsd-current
mailing list