Date: Thu, 23 Jun 2016 01:21:49 -0700 From: Mark Millard <markmi@dsl-only.net> To: Bryan Drewery <bdrewery@FreeBSD.org>, FreeBSD Current <freebsd-current@freebsd.org>, FreeBSD Toolchain <freebsd-toolchain@freebsd.org> Cc: freebsd-arm <freebsd-arm@freebsd.org>, FreeBSD PowerPC ML <freebsd-ppc@freebsd.org> Subject: Re: WITH_SYSTEM_COMPILER default on Message-ID: <6C3A4F2A-9583-49FB-B1E7-69A0044B3887@dsl-only.net> In-Reply-To: <39C98FFD-B0BB-4F25-A1D1-2447A2FDDFBD@dsl-only.net> References: <39C98FFD-B0BB-4F25-A1D1-2447A2FDDFBD@dsl-only.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2016-Jun-21, at 3:11 PM, Mark Millard <markmi at dsl-only.net> wrote: > Bryan Drewery bdrewery at FreeBSD.org wrote on Tue Jun 21 19:03:46 UTC = 2016 : >=20 >> This feature is where the bootstrap compiler in buildworld is not = built >> if the one in /usr/bin/cc matches what would be built. It is very >> conservative and requires a complete match of major/minor version and >> the compiler revision (__FreeBSD_cc_version). >>=20 >> The only complaint so far about this feature was that when we bumped = the >> compiler revision, too much of clang would rebuild. That was = addressed >> in r301277. >>=20 >> I would like to enable this feature by default in head for 11.0. >>=20 >> Unless there are any objections I will do so in a few days. >>=20 >> --=20 >> Regards, >> Bryan Drewery >=20 > I've only been using WITH_SYSTEM_COMPILER=3D for system-clang based = builds with the host matching TARGET_ARCH ("self hosted"). >=20 > For xtoolchain use (self-hosted or not) I've been using in my src.conf = files for such contexts:=20 >=20 > WITHOUT_CROSS_COMPILER=3D > WITHOUT_SYSTEM_COMPILER=3D > WITHOUT_BINUTILS_BOOTSTRAP=3D > WITHOUT_CLANG_BOOTSTRAP=3D >=20 > For cross builds (all being amd64 -> something else, such as armv6, = powerpc64, or powerpc) based on using some build of the system clang = 3.8.0 I've been using: >=20 > WITH_CROSS_COMPILER=3D > WITHOUT_SYSTEM_COMPILER=3D > WITH_BINUTILS_BOOTSTRAP=3D > WITH_CLANG_BOOTSTRAP=3D >=20 > As I understand the history the paths for finding tools, headers, etc. = built into the clang cross compiler were not necessarily the same as for = the live the system compiler that has paths appropriate specifically to = self-hosting. This helped avoid getting the wrong versions of files = involved. A historical example was cross builds running the live-system's ld when = the use of ld was implicit in a clang/clang++ command instead of being a = direct use of ${XLD}. In other words: such implicit use of ld by /usr/bin/clang and = /usr/bin/clang++ would not go find the ld built by = WITH_BINUTILS_BOOTSTRAP=3D but would instead use /usr/bin/ld (which was = for the wrong TARGET_ARCH). It looks like testing the current handling of such WITH_SYSTEM_COMPILER=3D= issues in a form that allows WITHOUT_CROSS_COMPILER=3D operation = requires building not using WITH_META_MODE=3D : man src.conf says that = WITH_META_MODE=3D enforces WITHOUT_SYSTEM_COMPILER=3D . My normal build procedures now use WITH_META_MODE=3D so such a test = would be special. Let me know if you want my to make such a test. > This was true despite the normal clang code generation being able to = target other architectures. >=20 > As for self-hosted system-clang based builds I've been using: >=20 > #WITH_CROSS_COMPILER=3D > WITH_SYSTEM_COMPILER=3D > WITH_BINUTILS_BOOTSTRAP=3D > #WITH_CLANG_BOOTSTRAP=3D >=20 > (So in this case I've left some things implicit in operation.) >=20 > As stands I'll not notice the SYSTEM_COMPILER default's consequences = because I'm always explicit about WITH vs. WITHOUT for SYSTM_COMPILER. = If you want some sort of experiment(s), let me know. >=20 > But I only currently have an amd64 context and a rpi2 armv6 context. = The dual-proessor, each dual-core powerpc64 was much faster at = self-hosted xtoolchain builds compared to any self-hosted rpi2 build but = I do not have access to the powerpc family for now. Self-hosted amd64 = xtoolchain builds do not work yet for normal settings: duplicate = declarations tend to stop the builds if one leaves on the = warnings-as-errors status for buildkernel. (At least last that I tried = such.) >=20 > =3D=3D=3D > Mark Millard > markmi at dsl-only.net =3D=3D=3D Mark Millard markmi at dsl-only.net
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6C3A4F2A-9583-49FB-B1E7-69A0044B3887>