Date: Fri, 5 Sep 2014 21:16:07 -0600 From: Warner Losh <imp@bsdimp.com> To: Garrett Cooper <yaneurabeya@gmail.com> Cc: freebsd-toolchain@freebsd.org, conrad.meyer@emc.com Subject: Re: Building clang in buildworld as part of the bootstrap process -- is it really necessary? Message-ID: <01C283B7-C9AF-4AE8-A192-FBC7C04D207E@bsdimp.com> In-Reply-To: <CAGHfRMD0Tm14p%2Bv=%2B6mp89eb4TSNenPSPn92XKC2XbM8m6Ut=g@mail.gmail.com> References: <CAGHfRMD0Tm14p%2Bv=%2B6mp89eb4TSNenPSPn92XKC2XbM8m6Ut=g@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--Apple-Mail=_D60743D6-5EA6-4248-9081-016DC9036B2D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Sep 5, 2014, at 8:21 PM, Garrett Cooper <yaneurabeya@gmail.com> = wrote: > Hi all, > One of the questions that came up from a co-worker is "why do I > need to build clang in buildworld if I already installed it from > ports"? I could see some valid reasons for doing this (one needs a > cross-compiler, one might need specific options that might not be set > in the ports version), but for native builds I would tend to agree > with this logic. With gcc it was wasteful building the compiler each > buildworld, but with clang it seems annoying continuing on this path > because the compile takes a long time to complete. The clang built during buildworld is used to bootstrap. So it is = required sometimes. Usually when there=92s a binary compatibility issue, = which is rare but does happen. It is also installed as cc. The ports clang may or may not build the world. However, if you want to = say =93I know what I=92m doing=94 you can set WITHOUT_CLANG_BOOTSTRAP = and WITHOUT_GCC_BOOTSTRAP to tell the build to do no building of = bootstrap tools and to use the host=92s instead. This usually works, but = may fail from time to time with port-built compilers. If you don=92t want buildworld to build any compiler, you can add = WITHOUT_CLANG=3Dt and WITHOUT_GCC=3Dt. This will create the system = without any compilers. You=92ll need to set CC to /usr/local/bin/clang35 = or whatever as well. There may be other settings you need as well. > Alternatively, would anyone be opposed to adding some logic to > automatically bypass the bootstrap compiler, i.e. add some logic to > Makefile.inc1 that would skip compiling clang/gcc if and only if the > target triplet and version met some required values? There=92s enough violent opposition to this that it will never happen. = buildworld is supposed to always be safe. Don=92t mess with that. It = isn=92t designed to be fast. If you want fast, you can tell it to be = fast with different options, but it will never be fast by default = because we guessed that we think it might be safe. don=92t mess with = buildworld. There might be support for a go-fast catch-all flag that = sets a bunch of other flags to make things go fast, but once you get = down that rabbit hole you=92ll find one man=92s optimization is another = woman=92s intolerable omission. tl;dr: NO. Warner --Apple-Mail=_D60743D6-5EA6-4248-9081-016DC9036B2D Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJUCnx3AAoJEGwc0Sh9sBEAz3AP/2voqkTdU21h0vk3HAux0oVZ K9oSDo2UMn5geiREW8zh2NQHscTHdr5VVHIxWe6J2XCM7ZRgzlJlTzr9ZqJc3hAb jHogF43jxcueySdhiE+G9WLtbi9FUnT8cpyBxwNcC9VDfk2V+xaqRLq+OLT4Ar1F Ss7YJfH8FyG6Q8fhjItAOya8F4dV9tBR6iFtZ1tNmOjE5gmVM2RDKIfCcKv2BSig fiPDi1eGZFGuqzh/GDkBZ/zx/VobvJ6Itmz9JE5qx/YSzZ8WAu71AOCxmWe3zr+7 vR5h7FGq5Zhc1sEMBxpcERcO3TdT3GRbojH4MpXtFYSo7VbeD/KkwbHZjcoq2RDW TorDF1dch05MMlmrWVXYyHgQpBuGFufG5Mba0YL9J+gYzyCw5LrgI1+f1VL7Vu+s HV0tn9k9H6u0iomNLChVbz7e4Po5rS6OasBGpvOWW5+UFH2/oJ/q0KosHvTzCY8M Ok63iTdbcQkbEN61oYTzo1WSruz2ZkpyVVf46/zmuATu4ITuBfO3voM14Q5VyI6G 52r5IyUSiOvowOX6L6kjUYYxKtJubq9ocP/pVczj99Cxi5CiqW30Kqe5Ibg8FwxV OFP2/z8jVKCJvD7fD5jcf4asfD96kSkYY23479KNaqItm9u3WS5q/6XmzVvwxwNT jDdIxDK7xqY7Xjk/oLXt =cdt/ -----END PGP SIGNATURE----- --Apple-Mail=_D60743D6-5EA6-4248-9081-016DC9036B2D--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?01C283B7-C9AF-4AE8-A192-FBC7C04D207E>