diff options
author | Mike Gilbert <floppym@gentoo.org> | 2021-09-05 12:01:23 -0400 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2021-09-06 16:18:37 -0400 |
commit | 328b6c7b4f2f6f9ef5b053688af3272a314667ad (patch) | |
tree | d659f69641a30c9dee05cd0ac6df0d78cefdc26b /eclass/linux-mod.eclass | |
parent | dev-python/oslo-i18n: Bump to 5.1.0 (diff) | |
download | gentoo-328b6c7b4f2f6f9ef5b053688af3272a314667ad.tar.gz gentoo-328b6c7b4f2f6f9ef5b053688af3272a314667ad.tar.bz2 gentoo-328b6c7b4f2f6f9ef5b053688af3272a314667ad.zip |
linux-mod.eclass: set CROSS_COMPILE in the environment
This allows it to be overriden in local Makefiles.
Closes: https://bugs.gentoo.org/550428
Closes: https://github.com/gentoo/gentoo/pull/22225
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'eclass/linux-mod.eclass')
-rw-r--r-- | eclass/linux-mod.eclass | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass index ca7bb2e219f5..943efa5cd9be 100644 --- a/eclass/linux-mod.eclass +++ b/eclass/linux-mod.eclass @@ -673,6 +673,11 @@ linux-mod_src_compile() { [[ -n ${KERNEL_DIR} ]] && addpredict "${KERNEL_DIR}/null.dwo" + # Set CROSS_COMPILE in the environment. + # This allows it to be overridden in local Makefiles. + # https://bugs.gentoo.org/550428 + local -x CROSS_COMPILE=${CROSS_COMPILE-${CHOST}-} + BUILD_TARGETS=${BUILD_TARGETS:-clean module} strip_modulenames; cd "${S}" @@ -705,12 +710,11 @@ linux-mod_src_compile() { # inside the variables gets used as targets for Make, which then # fails. eval "emake HOSTCC=\"$(tc-getBUILD_CC)\" \ - CROSS_COMPILE=${CHOST}- \ LDFLAGS=\"$(get_abi_LDFLAGS)\" \ ${BUILD_FIXES} \ ${BUILD_PARAMS} \ ${BUILD_TARGETS} " \ - || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" CROSS_COMPILE=${CHOST}- LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}" + || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}" cd "${OLDPWD}" touch "${srcdir}"/.built fi |