Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 May 2013 23:19:24 +0200
From:      Dimitry Andric <dim@FreeBSD.org>
To:        David Wolfskill <david@catwhisker.org>
Cc:        toolchain@freebsd.org
Subject:   Re: Should "make -DNOCLEAN buildworld" always rebuild clang?
Message-ID:  <2DA92EEE-4ED9-416F-B7BD-FAB9F8A54FED@FreeBSD.org>
In-Reply-To: <20130530204914.GN1334@albert.catwhisker.org>
References:  <20130530204914.GN1334@albert.catwhisker.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On May 30, 2013, at 22:49, David Wolfskill <david@catwhisker.org> wrote:
> As some of you may be aware, I track stable/9 daily.  (A recent history
> of "uname -vp" outputs for stable/9 on my laptop may be seen at
> <http://www.catwhisker.org/~david/FreeBSD/history/laptop_i386_9.txt>.)
> 
> And lest this message is misinterpreted: I am not complaining.  In
> particular, I am not complaining about clang: I switched to using clang
> for the system-build compiler shortly after BSDCan 2012, and I've never
> looked back.  I'm very happy to have an alternative to gcc.
> 
> Yesterday, I had built r251096M; this morning, I updated to r251113M
> and rebuilt with "touch /sys/conf/newvers.sh && make -j4 -DNOCLEAN
> buildworld".  (Copy of typescript file available at
> <http://www.catwhisker.org/~david/FreeBSD/stable_9/bw.txt>.)
> 
> As shown in the typescript, the sole change showed up as:
> 
> Script started on Thu May 30 04:22:12 2013
> svn update /usr/src
> Updating '/usr/src':
> U    /usr/src/usr.sbin/newsyslog/newsyslog.c
> Updated to revision 251129.
> 
> Script done on Thu May 30 04:22:18 2013
> 
> 
> which would seem to have had minimal effect on the toolchain.
> 
> Yet the vast bulk of the above-cited typescript appears to be showing
> the toolchain being rebuilt.  Is this intended?

It is not really intended, but an unfortunate side effect of
<http://svnweb.freebsd.org/changeset/base/250217>.  When you touch
sys/conf/newvers.sh, it causes include/Makefile to generate a new
osreldate.h, so everything depending on that header will be rebuilt.

And r250217 introduced a dependency of the llvm config.h file on
osreldate.h, to determine whether log2() is available (and so make it
possible to build head on older FreeBSD releases).

I am not sure if there is an easy way around this.  When implementing
r250217, I considered various ways to detect at build time which host
system is used, but IIRC none of the alternatives were completely
bulletproof.

The only suggestion I can give at the moment is: don't touch
sys/conf/newvers.sh. :)  Why are you doing this anyway?

-Dimitry




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2DA92EEE-4ED9-416F-B7BD-FAB9F8A54FED>