From owner-freebsd-toolchain@FreeBSD.ORG Sat Sep 6 03:16:12 2014 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9B7E5564 for ; Sat, 6 Sep 2014 03:16:12 +0000 (UTC) Received: from mail-ie0-f171.google.com (mail-ie0-f171.google.com [209.85.223.171]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 60A061798 for ; Sat, 6 Sep 2014 03:16:11 +0000 (UTC) Received: by mail-ie0-f171.google.com with SMTP id rp18so15263118iec.30 for ; Fri, 05 Sep 2014 20:16:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:message-id:references:to; bh=iTU87tcXZjnBFR20sdCoVkdoTB+hRsYbQv+FkrV9Sb8=; b=QFtZcFKWAeejJDuYP6ku2NuG6vf0KYePJ0TbuNrToYwXcOBF3BBoDTim5wF1rD2nj+ jOjoaqm5ez/WNVcPnB45D7bquVei6muUOl2v9ZPk/TyjjtbENIrfT9p/A2PvnbpKfw8+ 5Zr/CFV+YENGkOiCrvG412wGSZ2Q1+kEVgBv2lI3Wk3Lhqjz2eeIskgI0pvfrKgH7eZb qMYs6zGEyxpZgYYMv142Hg+19zkdzXVrXmIl13K9kNbI13W0vVGWPqRWC6v0tgQVKlGF LXwejYtD5NP0XEbFjLUly+VSd/YaOrY6KyiK0gPrB28Dk9tQKeTSbUJKDUbxeojxIR0i 1bxw== X-Gm-Message-State: ALoCoQljtkh8lQs9Mk/y30BJRJi0pVdvlGk86UHhft4dhEuHlYexdwU0lx6O3kSb3y4mHTUkmV2o X-Received: by 10.50.1.37 with SMTP id 5mr9356624igj.47.1409973370962; Fri, 05 Sep 2014 20:16:10 -0700 (PDT) Received: from bsdimp.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPSA id ig9sm5220597igb.13.2014.09.05.20.16.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 05 Sep 2014 20:16:10 -0700 (PDT) Sender: Warner Losh Content-Type: multipart/signed; boundary="Apple-Mail=_D60743D6-5EA6-4248-9081-016DC9036B2D"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: Building clang in buildworld as part of the bootstrap process -- is it really necessary? From: Warner Losh In-Reply-To: Date: Fri, 5 Sep 2014 21:16:07 -0600 Message-Id: <01C283B7-C9AF-4AE8-A192-FBC7C04D207E@bsdimp.com> References: To: Garrett Cooper X-Mailer: Apple Mail (2.1878.6) Cc: freebsd-toolchain@freebsd.org, conrad.meyer@emc.com X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 03:16:12 -0000 --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 = 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--