From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 27 17:28:51 2014 Return-Path: Delivered-To: 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 D1AEEF27 for ; Mon, 27 Jan 2014 17:28:51 +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 8E6E21E7E for ; Mon, 27 Jan 2014 17:28:50 +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 s0RHSgcR057660 for ; Mon, 27 Jan 2014 11:28:42 -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 s0RHSgLS057659 for hackers@FreeBSD.org; Mon, 27 Jan 2014 11:28:42 -0600 (CST) (envelope-from brooks) Date: Mon, 27 Jan 2014 11:28:42 -0600 From: Brooks Davis To: hackers@FreeBSD.org Subject: Re: make buildkernel figure out compiler type.. Message-ID: <20140127172842.GE8857@lor.one-eyed-alien.net> References: <20140124200141.GE75135@funkthat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KFztAG8eRSV9hGtP" Content-Disposition: inline In-Reply-To: <20140124200141.GE75135@funkthat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jan 2014 17:28:51 -0000 --KFztAG8eRSV9hGtP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 24, 2014 at 12:01:42PM -0800, John-Mark Gurney wrote: > When I was building armeb, I would often specify the correct compiler > on buildtools/kernel-tools, but then when I went to buildkernel, I > would forget... So, I figured out if we just drop COMPILER_TYPE from > KMAKEENV, the right magic will be executed to figure out which of > clang/gcc should be used... >=20 > $ svn diff Makefile.inc1=20 > Index: Makefile.inc1 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- Makefile.inc1 (revision 260499) > +++ Makefile.inc1 (working copy) > @@ -451,7 +451,7 @@ IMAKE_MTREE=3D MTREE_CMD=3D"nmtree ${MTREEFLAG= S}" > .endif > =20 > # kernel stage > -KMAKEENV=3D ${WMAKEENV} > +KMAKEENV=3D ${WMAKEENV:NCOMPILER_TYPE=3D*} > KMAKE=3D ${KMAKEENV} ${MAKE} ${.MAKEFLAGS} ${KERNEL_FLAGS} KERNE= L=3D${INSTKERNNAME} > =20 > # >=20 > Comments? If COMPILER_TYPE isn't set then every submake will need to figure out which compiler is in use. That's not too expensive for a build without modules, but is potentially quite expensive with, hence the passing of COMPILER_TYPE. I'm not convinced the tradeoff is worth it for a little edge-case user convenience. -- Brooks --KFztAG8eRSV9hGtP Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iD8DBQFS5pdJXY6L6fI4GtQRArdzAKCFPU3sU9fwwQdiw5jyLsl3HL61YACeJ3yW QGOEnYDltPAZ7zUcHoeVVNQ= =T6Uc -----END PGP SIGNATURE----- --KFztAG8eRSV9hGtP--