From owner-freebsd-current@FreeBSD.ORG Wed Feb 27 15:10:36 2013 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 093E34A0 for ; Wed, 27 Feb 2013 15:10:36 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) by mx1.freebsd.org (Postfix) with ESMTP id D89258DA for ; Wed, 27 Feb 2013 15:10:35 +0000 (UTC) Received: from c-24-8-232-202.hsd1.co.comcast.net ([24.8.232.202] helo=damnhippie.dyndns.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1UAieQ-000BF6-QI; Wed, 27 Feb 2013 15:10:34 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id r1RFAVDl083738; Wed, 27 Feb 2013 08:10:31 -0700 (MST) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.232.202 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+AUWOrp5mYXr7MUlc1j3oG Subject: Re: CC in /etc/make.conf and headers in ${WORLDTMP} From: Ian Lepore To: deeptech71 In-Reply-To: <512E2001.1040305@gmail.com> References: <512E2001.1040305@gmail.com> Content-Type: text/plain; charset="us-ascii" Date: Wed, 27 Feb 2013 08:10:31 -0700 Message-ID: <1361977831.16937.161.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: freebsd-current@FreeBSD.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 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: Wed, 27 Feb 2013 15:10:36 -0000 On Wed, 2013-02-27 at 16:02 +0100, deeptech71 wrote: > Recently, I've posted several build errors that only I seemed to run into. The errors were based on "incompatible/missing declarations". The bottom line of those is actually the following, as I gather: > > I, without any compilers in /usr/bin, was trying to build the world and kernel by setting CC to basically /home/me/my_compilers/bin/clang. > > As the handbook says, the FreeBSD build system uses the compiler in /usr/obj, ie., the one "just built for further purposes". As I can see, that compiler is specifically crafted to use the include files in ${WORLDTMP}, ie., in /usr/obj/usr/src/tmp/usr/include (not /usr/include), where "new" headers are placed in an early phase of the build process. This is required for when the source tree has been "significantly" changed since the last installworld -- the new code won't build with the headers in /usr/include. In such cases, of course compilation breaks when an unaware compiler (eg., /usr/bin/cc, /home/me/my_compilers/bin/clang, etc.) is used. > > I was able to compile the world and kernel by changing CC from /home/me/my_compilers/bin/clang to /usr/obj/usr/src/tmp/usr/bin/cc upon the first compilation error, by which time the latter compiler was available. > > However, after a successful build and install, and no following update of the source tree, an external compiler can be used, because by then, the new headers will have been installed in /usr/include. > > So it appears that specifying an external compiler as CC in /etc/make.conf is not supposed to work in general. Life sux. Is there any intention to remedy this? > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" It appears that you may be just slightly ahead of the curve. You'll probably be interested in this: http://lists.freebsd.org/pipermail/freebsd-arch/2013-February/014055.html -- Ian