From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 26 19:00:36 2013 Return-Path: Delivered-To: freebsd-hackers@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 BCED8D6D; Tue, 26 Nov 2013 19:00:36 +0000 (UTC) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2299D24C8; Tue, 26 Nov 2013 19:00:35 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.7/8.14.7) with ESMTP id rAQJ0YdF077241; Tue, 26 Nov 2013 13:00:34 -0600 (CST) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.7/8.14.7/Submit) id rAQJ0YW0077240; Tue, 26 Nov 2013 13:00:34 -0600 (CST) (envelope-from brooks) Date: Tue, 26 Nov 2013 13:00:34 -0600 From: Brooks Davis To: Ian Lepore Subject: Re: Building with gcc? Message-ID: <20131126190034.GD29388@lor.one-eyed-alien.net> References: <20131125013122.GE1627@glenbarber.us> <65EE6ADD-78CB-4990-ABED-CCFCC4446C34@FreeBSD.org> <20131125133654.GE2310@glenbarber.us> <1385391472.1220.1.camel@revolution.hippie.lan> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Qz2CZ664xQdCRdPu" Content-Disposition: inline In-Reply-To: <1385391472.1220.1.camel@revolution.hippie.lan> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Glen Barber , Dimitry Andric , freebsd-hackers , Matthew Fleming X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 19:00:36 -0000 --Qz2CZ664xQdCRdPu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 25, 2013 at 07:57:52AM -0700, Ian Lepore wrote: > On Mon, 2013-11-25 at 08:36 -0500, Glen Barber wrote: > > On Mon, Nov 25, 2013 at 01:59:03PM +0100, Dimitry Andric wrote: > > > On 25 Nov 2013, at 02:31, Glen Barber wrote: > > > > On Sun, Nov 24, 2013 at 05:28:05PM -0800, Matthew Fleming wrote: > > > >> I'm trying to test a change to gcc, and I'd like to do a full > > > >> buildworld/buildkernel using the gcc compiler. So I added this to= my > > > >> /etc/src.conf (and make.conf, since I can't remember under which s= cenarios > > > >> they're different): > > > >>=20 > > > >> WITHOUT_CLANG=3DYES > > > >> WITH_GCC=3DYES > > > >> WITH_GNUCXX=3DYES > > > >>=20 > > > >> and I started a buildworld. It's currently building clang. > > > >>=20 > > > >> Why is it building clang? > > > >>=20 > > > >=20 > > > > You also want WITHOUT_CLANG_IS_CC=3DYES. I have no reasonable expl= anation > > > > for why it is different. > > >=20 > > > WITHOUT_CLANG and WITHOUT_CLANG_IS_CC were decoupled in r256915 by br= ooks: > > >=20 > > > "Stop conflating WITHOUT_CLANG with WITHOUT_CLANG_IS_CC. This allows > > > bootstrapping a copy of clang without building clang for the base sys= tem > > > which is useful for nanobsd and similar setups. It's still probably > > > wrong to conflate what is installed as /usr/bin/cc with the selection > > > of a bootstrap compiler under WITH*_CLANG_IS_CC, but that's for anoth= er > > > day." > > >=20 > > > I would still say that WITHOUT_CLANG implies that you cannot have cla= ng > > > as cc, so maybe it would be better to error out in this case? > > >=20 > >=20 > > Yes, that is what I meant by not having a reasonable explanation why. > > If WITHOUT_CLANG is set, WITHOUT_CLANG_IS_CC should (as it was before) > > be implied. > >=20 > > Glen > >=20 >=20 > In a cross-build situation, you should be able to specify > WITH_CLANG_IS_CC and WITHOUT_CLANG and you get a system that is > cross-compiled for the target by clang, but clang itself is not > cross-compiled and installed onto the target. (I'm not sure that > actually works yet, but I think that's the intention.) That is the intention as expressed in the commit log. Users of systems like nanobsd or consumers like NetFlix want to build with the standard compiler which currently that means bootstrapping clang, but they have no interest in installing it on the host platform as it's a waste of space and build time. > The names involved are confusing, but the concept makes sense. As the commit log says, it would make sense to break WITH*_CLANG_IS_CC into WITH*_CLANG_IS_CC and something like WITH*_CROSS_COMPILER_IS_CLANG, that name also sucks so it wasn't the issue I was trying to address at the time. Yes, the names suck, but I didn't invent them. There should probably be some hierarchy in the names so things that effect _what_ is built (most of the options) are clearly differentiated from things that effect _how_ things are built. -- Brooks --Qz2CZ664xQdCRdPu Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iD8DBQFSlO/RXY6L6fI4GtQRAifjAJsFyD+Rw06WC9BI/vBZEFjVSW3qXACeP3Bb Z9kvBJhP7njugnz/VJC96IU= =RGao -----END PGP SIGNATURE----- --Qz2CZ664xQdCRdPu--