Date: Mon, 27 Jan 2014 11:28:42 -0600 From: Brooks Davis <brooks@freebsd.org> To: hackers@FreeBSD.org Subject: Re: make buildkernel figure out compiler type.. Message-ID: <20140127172842.GE8857@lor.one-eyed-alien.net> In-Reply-To: <20140124200141.GE75135@funkthat.com>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
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...
>
> $ svn diff Makefile.inc1
> Index: Makefile.inc1
> ===================================================================
> --- Makefile.inc1 (revision 260499)
> +++ Makefile.inc1 (working copy)
> @@ -451,7 +451,7 @@ IMAKE_MTREE= MTREE_CMD="nmtree ${MTREEFLAGS}"
> .endif
>
> # kernel stage
> -KMAKEENV= ${WMAKEENV}
> +KMAKEENV= ${WMAKEENV:NCOMPILER_TYPE=*}
> KMAKE= ${KMAKEENV} ${MAKE} ${.MAKEFLAGS} ${KERNEL_FLAGS} KERNEL=${INSTKERNNAME}
>
> #
>
> 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
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (FreeBSD)
iD8DBQFS5pdJXY6L6fI4GtQRArdzAKCFPU3sU9fwwQdiw5jyLsl3HL61YACeJ3yW
QGOEnYDltPAZ7zUcHoeVVNQ=
=T6Uc
-----END PGP SIGNATURE-----
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140127172842.GE8857>
