why does buildkernel set COMPILER_TYPE?

From: John-Mark Gurney <jmg_at_funkthat.com>
Date: Wed, 21 Aug 2013 21:04:18 -0700
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...  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...

Can w/ please fix this?  This isn't the first time I've run into this,
and it's quite anoying.

This simple patch fixes it:
ndex: Makefile.inc1
===================================================================
--- Makefile.inc1       (revision 254546)
+++ Makefile.inc1       (working copy)
_at__at_ -428,7 +428,7 _at__at_
 .endif
 
 # kernel stage
-KMAKEENV=      ${WMAKEENV}
+KMAKEENV=      ${WMAKEENV:NCOMPILER_TYPE=*}
 KMAKE=         ${KMAKEENV} ${MAKE} ${.MAKEFLAGS} ${KERNEL_FLAGS} KERNEL=${INSTKERNNAME}
 
 #

This just removes setting COMPILER_TYPE for the kernel target and lets
the magic in bsd.compiler.mk do it's thing...

Comments?

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."
Received on Thu Aug 22 2013 - 02:04:19 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:40 UTC