From owner-freebsd-current@FreeBSD.ORG Wed Feb 27 15:02:39 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A8652F5 for ; Wed, 27 Feb 2013 15:02:39 +0000 (UTC) (envelope-from deeptech71@gmail.com) Received: from mail-bk0-f52.google.com (mail-bk0-f52.google.com [209.85.214.52]) by mx1.freebsd.org (Postfix) with ESMTP id 1B655865 for ; Wed, 27 Feb 2013 15:02:38 +0000 (UTC) Received: by mail-bk0-f52.google.com with SMTP id jk13so312730bkc.39 for ; Wed, 27 Feb 2013 07:02:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=j3lxifMCyrDzJz4lv7BVkjF5YqbfdTCu4fEuYPlNpq0=; b=UOR7BvK4aUBpi8pr4ZDc4xxK06C2IEABOuKvMywePlz70FrSTknjVaIK7j+LKGHuSn EVhXhzrccoDIMicywrCIPXXSQGieO/WP6uP0FpxC5Gu+FxInZLTqlGFcwPLYKtvdpIjL QxShn/jYgAObYy0gdhdhKo3LhIiFLa8ylDbaf23uYlQkbLDTDsWzo5777UHaj+7rvvLJ cDE4E8DTgmtdH0rOdV+e0F0RqonUu+jfPzPzVmKNSIEN3DnBRDrHrsiXxZHakMXdvd0/ A7zJWeTHGnStc2PN4qfd8b3lUrRKdnwstoD91oYbDVf8KPL0qDhdovuHBMkB9dDdgrxc FKAw== X-Received: by 10.204.145.83 with SMTP id c19mr951969bkv.69.1361977351739; Wed, 27 Feb 2013 07:02:31 -0800 (PST) Received: from [192.168.1.80] (dsl51B65532.pool.t-online.hu. [81.182.85.50]) by mx.google.com with ESMTPS id g28sm732357bkv.17.2013.02.27.07.02.29 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 27 Feb 2013 07:02:30 -0800 (PST) Message-ID: <512E2001.1040305@gmail.com> Date: Wed, 27 Feb 2013 16:02:25 +0100 From: deeptech71 User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:18.0) Gecko/20100101 SeaMonkey/2.15 MIME-Version: 1.0 To: freebsd-current@freebsd.org Subject: CC in /etc/make.conf and headers in ${WORLDTMP} Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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:02:39 -0000 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?