From owner-freebsd-current@FreeBSD.ORG Mon Feb 28 12:34:10 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 6926D1065672; Mon, 28 Feb 2011 12:34:10 +0000 (UTC) Date: Mon, 28 Feb 2011 12:34:10 +0000 From: Alexander Best To: Dimitry Andric Message-ID: <20110228123410.GA85987@freebsd.org> References: <11C58791-9103-4C0E-8B35-EE46A4A6D3D4@kientzle.com> <4D6B8FCA.5050203@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4D6B8FCA.5050203@FreeBSD.org> Cc: FreeBSD-current Current Subject: Re: Can't update CLang-based system X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Feb 2011 12:34:10 -0000 On Mon Feb 28 11, Dimitry Andric wrote: > 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. ... or one could use something like this: diff --git a/share/mk/sys.mk b/share/mk/sys.mk index 1760573..3a817a5 100644 --- a/share/mk/sys.mk +++ b/share/mk/sys.mk @@ -355,6 +355,13 @@ __MAKE_CONF?=/etc/make.conf .include "${__MAKE_CONF}" .endif +.if !defined(_WITHOUT_SRCCONF) +SRCCONF?=/etc/src.conf +.if exists(${SRCCONF}) +.include "${SRCCONF}" +.endif +.endif + .if defined(__MAKE_SHELL) && !empty(__MAKE_SHELL) SHELL= ${__MAKE_SHELL} .SHELL: path=${__MAKE_SHELL} cheers. alex > > .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 or 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. -- a13x