diff options
-rw-r--r-- | meta/classes/module.bbclass | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/meta/classes/module.bbclass b/meta/classes/module.bbclass index d16d462080..bbceaf7219 100644 --- a/meta/classes/module.bbclass +++ b/meta/classes/module.bbclass @@ -3,6 +3,13 @@ DEPENDS += "virtual/kernel" inherit module-base +# Ensure the hostprogs are available for module compilation +module_do_compile_prepend() { + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS + oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \ + -C ${STAGING_KERNEL_DIR} scripts +} + module_do_compile() { unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \ @@ -15,7 +22,10 @@ module_do_compile() { module_do_install() { unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS - oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" CC="${KERNEL_CC}" LD="${KERNEL_LD}" modules_install + oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" \ + KERNEL_SRC=${STAGING_KERNEL_DIR} \ + CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ + modules_install } pkg_postinst_append () { |