From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 25 14:57:56 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 8EDBFF65; Mon, 25 Nov 2013 14:57:56 +0000 (UTC) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 634632F6F; Mon, 25 Nov 2013 14:57:56 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1Vkxbn-000Iru-CB; Mon, 25 Nov 2013 14:57:55 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id rAPEvqbs004641; Mon, 25 Nov 2013 07:57:52 -0700 (MST) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18oasKQpz2hFWQEv4hWKXzF Subject: Re: Building with gcc? From: Ian Lepore To: Glen Barber In-Reply-To: <20131125133654.GE2310@glenbarber.us> References: <20131125013122.GE1627@glenbarber.us> <65EE6ADD-78CB-4990-ABED-CCFCC4446C34@FreeBSD.org> <20131125133654.GE2310@glenbarber.us> Content-Type: text/plain; charset="us-ascii" Date: Mon, 25 Nov 2013 07:57:52 -0700 Message-ID: <1385391472.1220.1.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: Matthew Fleming , Brooks Davis , Dimitry Andric , freebsd-hackers 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: Mon, 25 Nov 2013 14:57:56 -0000 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 scenarios > > >> they're different): > > >> > > >> WITHOUT_CLANG=YES > > >> WITH_GCC=YES > > >> WITH_GNUCXX=YES > > >> > > >> and I started a buildworld. It's currently building clang. > > >> > > >> Why is it building clang? > > >> > > > > > > You also want WITHOUT_CLANG_IS_CC=YES. I have no reasonable explanation > > > for why it is different. > > > > WITHOUT_CLANG and WITHOUT_CLANG_IS_CC were decoupled in r256915 by brooks: > > > > "Stop conflating WITHOUT_CLANG with WITHOUT_CLANG_IS_CC. This allows > > bootstrapping a copy of clang without building clang for the base system > > 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 another > > day." > > > > I would still say that WITHOUT_CLANG implies that you cannot have clang > > as cc, so maybe it would be better to error out in this case? > > > > 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. > > Glen > 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.) The names involved are confusing, but the concept makes sense. -- Ian