From owner-freebsd-current@FreeBSD.ORG Thu Aug 22 16:23:55 2013 Return-Path: Delivered-To: current@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 ESMTP id 040158B2; Thu, 22 Aug 2013 16:23:55 +0000 (UTC) (envelope-from jmg@h2.funkthat.com) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B8283293F; Thu, 22 Aug 2013 16:23:54 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id r7MGNrUd088093 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 22 Aug 2013 09:23:53 -0700 (PDT) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id r7MGNrbb088092; Thu, 22 Aug 2013 09:23:53 -0700 (PDT) (envelope-from jmg) Date: Thu, 22 Aug 2013 09:23:53 -0700 From: John-Mark Gurney To: Dimitry Andric Subject: Re: why does buildkernel set COMPILER_TYPE? Message-ID: <20130822162353.GF94127@funkthat.com> Mail-Followup-To: Dimitry Andric , current@FreeBSD.org, Brooks Davis References: <20130822040418.GE94127@funkthat.com> <49A46D2E-D736-4D57-BB54-5B68C1FE2466@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49A46D2E-D736-4D57-BB54-5B68C1FE2466@FreeBSD.org> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Thu, 22 Aug 2013 09:23:54 -0700 (PDT) Cc: Brooks Davis , current@FreeBSD.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Aug 2013 16:23:55 -0000 Dimitry Andric wrote this message on Thu, Aug 22, 2013 at 08:59 +0200: > On Aug 22, 2013, at 06:04, John-Mark Gurney wrote: > > I've noticed that if you do a: > > make buildworld WITHOUT_CLANG_IS_CC=YES > > > > and then do a: > > make buildkernel > > > > (w/o the WITHOUT_CLANG_IS_CC=YES option) > > that it fails... > > Why don't you just put the WITHOUT_CLANG_IS_CC setting in /etc/src.conf, > where it belongs? That would save you this trouble. Except that I'm testing code that needs to work both with clang and gcc... Putting an option like that in /etc/src.conf is bad as I'm likely to forget it, plus it'll effect other trees which isn't good... > I don't think we should support building different parts of the tree > with incompatible settings. E.g. compiling part of the tree using > WITH_FOO, and some other part using WITHOUT_FOO is *not* supposed to > work properly. Do we have a file that is source in /usr/src (or where your source tree is located) that we can put these options in? When we finally are able to build and install all as a normal user (which we are getting close now), /etc/src.conf is a really bad place to put these things.... > > Apparently instead of letting buildkernel figure out > > which compiler it will use, the src/Makefile.inc1 forces COMPILER_TYPE > > to be what the options specified instead of using what bsd.compiler.mk > > figures out... > > This was added by brooks in r240468 (and further developed in r250659 > where he added external compiler support), with what I assume is the > explanation in the commit message: > > "To avoid negative performance impacts in the default case and correct > value for COMPILER_TYPE type is determined and passed in the environment > of submake instances while building world." > > So I suspect this is really on purpose. Brooks, any comments? :) Except that KMAKEENV just blindly takes all of WMAKEENV... I understand why WMAKEENV would have COMPILER_TYPE, I'm just puzzled why we don't let KMAKEENV figure out the correct one... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."