On Sat, Jan 4, 2020 at 4:24 PM Michał Górny <mgo...@gentoo.org> wrote: > +# @FUNCTION: kernel-build_src_configure > +# @DESCRIPTION: > +# Prepare the toolchain for building the kernel, get the default .config > +# or restore savedconfig, and get build tree configured for modprep. > +kernel-build_src_configure() { > + debug-print-function ${FUNCNAME} "${@}" > + > + # force ld.bfd if we can find it easily > + local LD="$(tc-getLD)" > + if type -P "${LD}.bfd" &>/dev/null; then > + LD+=.bfd > + fi > + > + MAKEARGS=( > + V=1 > + > + HOSTCC="$(tc-getCC)" > + HOSTCXX="$(tc-getCXX)" > + HOSTCFLAGS="${CFLAGS}" > + HOSTLDFLAGS="${LDFLAGS}"
I think the HOST variables should reference the CBUILD toolchain. Example below. # Sets BUILD_CFLAGS and BUILD_LDFLAGS if not set in make.conf. tc-export_build_env HOSTCC="$(tc-getBUILD_CC)" HOSTCXX="$(tc-getBUILD_CXX)" HOSTCFLAGS="${BUILD_CFLAGS}" HOSTLDFLAGS="${BUILD_LDFLAGS}"