From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 9 20:01:19 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 053549AF for ; Tue, 9 Apr 2013 20:01:19 +0000 (UTC) (envelope-from deeptech71@gmail.com) Received: from mail-ee0-f47.google.com (mail-ee0-f47.google.com [74.125.83.47]) by mx1.freebsd.org (Postfix) with ESMTP id 90D569C3 for ; Tue, 9 Apr 2013 20:01:18 +0000 (UTC) Received: by mail-ee0-f47.google.com with SMTP id t10so3062750eei.34 for ; Tue, 09 Apr 2013 13:01:17 -0700 (PDT) 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=mKDmi3hC7I1vliSKEBPrv96wKhXnbxfyx0S92k+b2iY=; b=mAxfGdziXogjlT5YQ91vkn8k5zWpkuBpuoRCdvekW4XGq+7MpbD+1xF6o/hBEak5Yn +bSUuUuclH2RjqNZjdl1CTTJ4KLQF9OQnwJ/64NrS0DiSyhzv6lUv20gOH9wAebIDNnR ONRYm/sHg8sVTLMNB/wRR+YKz+nDvhQt35unCoTnyiqucaL4csH6RKUH4s/sbt6kdVZj ARKG1ktugR44Zo4mlkK1oobje4mMJrSCH7Pn9U+uRWUPcskxInih+twuD133GnHblMrL HTlmPym0JPnK56AaIatn9B6RCpk2Vj0iZGvBrdDNOq0l10vs7IVX1/zIsRkdOsO6MN9w 7rwQ== X-Received: by 10.14.183.198 with SMTP id q46mr63670290eem.1.1365537677460; Tue, 09 Apr 2013 13:01:17 -0700 (PDT) Received: from [192.168.1.80] (91EC42B1.dsl.pool.telekom.hu. [145.236.66.177]) by mx.google.com with ESMTPS id q5sm39891887eeo.17.2013.04.09.13.01.15 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 09 Apr 2013 13:01:16 -0700 (PDT) Message-ID: <5164815A.6040908@gmail.com> Date: Tue, 09 Apr 2013 23:00:10 +0200 From: deeptech71 User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:18.0) Gecko/20100101 SeaMonkey/2.15 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Subject: Re: building world and kernel without ebuilding ("bootstrap"?) clang? Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Tue, 09 Apr 2013 21:03:21 +0000 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Apr 2013 20:01:19 -0000 Lev Serebryakov wrote: > Is "system" version (system is snapshot from Mar 30) is "external" and "modern"? No. The base version of Clang has been patched to work well with the base system, at least regarding the discussed issue of standard header files. Lev Serebryakov wrote: >It is very sad, that external compiler cannot be used with "fresh" > sources (when headers are different). We need some solution for this, > for sure! When compilers are identical (same clang revision), but > sources has updated headers. It does proper trick with libraries, but > not with headers! Compiler headers are not the main problem. The base system is generally compilable with any compiler, modulo the main problem. Source files in /usr/src should include (ie., #include <...>) headers from /usr/src/include, but in case of an external compiler, they don't, they actually include the headers from /usr/include (don't think about stdio.h, but rather about things like net80211/ieee80211_mesh.h)! The main problem occurs when library headers change (eg., an import of a newer version of /usr/src/contrib/somelib). It happens that the source files need a new definition (eg., #define IEEE80211_MESHRT_FLAGS_GATE 0x08), but such is not found in /usr/include, only in /usr/src/include. However, during ``make installworld'', headers get copied from /usr/src/include to /usr/include, so after that, /usr/include is equivalently usable. After that, compilation won't fail just due to this issue... until /usr/src is significantly updated again. Again, this has nothing to do with compiler headers. If the latest (trunk) version of Clang/LLVM is used -- let's say it's in /home/me/llvm --, then stdio.h (etc.) needs to be removed from /home/me/llvm/include/... (at least I have no other solution), even if /usr/include and /usr/src/include are equivalent. When Clang or GCC is built as part of "make buildworld", it is also built specially once: a bootstrapped compiler uses /usr/obj/tmp/usr/include (a copy of /usr/src/include) instead of /usr/include.