summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Mylchreest <johnm@gentoo.org>2006-05-11 08:23:43 +0000
committerJohn Mylchreest <johnm@gentoo.org>2006-05-11 08:23:43 +0000
commitea00b601d7eb2ad252eb609d6111ec713689ad6a (patch)
tree58dc769355c9d5611e9eb71ed6ab6481f4bb403d /eclass/linux-mod.eclass
parentmore complete as-needed, ebuild cleanups (diff)
downloadgentoo-2-ea00b601d7eb2ad252eb609d6111ec713689ad6a.tar.gz
gentoo-2-ea00b601d7eb2ad252eb609d6111ec713689ad6a.tar.bz2
gentoo-2-ea00b601d7eb2ad252eb609d6111ec713689ad6a.zip
Allow for cross-compile/distcc distribution of modules.
Diffstat (limited to 'eclass/linux-mod.eclass')
-rw-r--r--eclass/linux-mod.eclass7
1 files changed, 5 insertions, 2 deletions
diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass
index 16d47972137c..19ed76d9b922 100644
--- a/eclass/linux-mod.eclass
+++ b/eclass/linux-mod.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/linux-mod.eclass,v 1.63 2006/04/02 19:14:10 johnm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/linux-mod.eclass,v 1.64 2006/05/11 08:23:43 johnm Exp $
# Description: This eclass is used to interface with linux-info in such a way
# to provide the functionality required and initial functions
@@ -484,6 +484,8 @@ linux-mod_src_compile() {
local modulename libdir srcdir objdir i n myARCH="${ARCH}" myABI="${ABI}"
ARCH="$(tc-arch-kernel)"
ABI="${KERNEL_ABI}"
+ CC_HOSTCC=$(tc-getBUILD_CC)
+ CC_CC=$(tc-getCC)
BUILD_TARGETS=${BUILD_TARGETS:-clean module}
strip_modulenames;
@@ -508,7 +510,8 @@ linux-mod_src_compile() {
die "Unable to run econf ${ECONF_PARAMS}"
fi
- emake ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS} \
+ emake HOSTCC=${CC_HOSTCC} CC=${CC_CC}\
+ ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS} \
|| die "Unable to make \
${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}."
touch ${srcdir}/.built