diff options
author | Denys Dmytriyenko <denys@ti.com> | 2018-08-15 21:22:27 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-08-29 17:16:03 +0100 |
commit | 02b05d1ff48e0bfe57fc7d19dc7fbf2d1c80fc09 (patch) | |
tree | d1ab0163fddf864e5200b229866e535a419f88f1 | |
parent | 61da85778ab84493b3b275df7a75637cdaef76eb (diff) | |
download | poky-02b05d1ff48e0bfe57fc7d19dc7fbf2d1c80fc09.tar.gz |
module-base.bbclass: fix out-of-tree module builds with custom EXTRA_OEMAKE
Commit d2aa88a6a92985f21414fceea2dc0facbf7f8779 was meant to backport build
dependencies on bc-native and openssl-native, but it also changed execution
of do_make_scripts() from calling make directly to using oe_runmake. That
change was made in master/sumo as part of a separate make-mod-scripts recipe.
Unfortunately, that doesn't work here in rocko in the context of module-base
class, as it gets executed inside out-of-tree module environment. Quite often
those out-of-tree modules provide own Makefile with custom EXTRA_OEMAKE var
defined. But do_make_scripts() gets executed within STAGING_KERNEL_DIR and
cannot simply use custom EXTRA_OEMAKE set by a module.
Move back to calling make and passing HOSTCC/HOSTCPP directly w/o using
EXTRA_OEMAKE.
For more details please see:
http://lists.openembedded.org/pipermail/openembedded-core/2018-August/154189.html
(From OE-Core rev: eb3eaa6970bb8c3647187593df23e2784dd26935)
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Cc: Bruce Ashfield <bruce.ashfield@windriver.com>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: Anuj Mittal <anuj.mittal@intel.com>
Cc: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/module-base.bbclass | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/module-base.bbclass b/meta/classes/module-base.bbclass index 9f3465eb9d..c1fa3ad1c1 100644 --- a/meta/classes/module-base.bbclass +++ b/meta/classes/module-base.bbclass | |||
@@ -13,7 +13,6 @@ export CROSS_COMPILE = "${TARGET_PREFIX}" | |||
13 | export KBUILD_OUTPUT = "${STAGING_KERNEL_BUILDDIR}" | 13 | export KBUILD_OUTPUT = "${STAGING_KERNEL_BUILDDIR}" |
14 | 14 | ||
15 | DEPENDS += "bc-native" | 15 | DEPENDS += "bc-native" |
16 | EXTRA_OEMAKE += " HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}"" | ||
17 | 16 | ||
18 | export KERNEL_VERSION = "${@base_read_file('${STAGING_KERNEL_BUILDDIR}/kernel-abiversion')}" | 17 | export KERNEL_VERSION = "${@base_read_file('${STAGING_KERNEL_BUILDDIR}/kernel-abiversion')}" |
19 | KERNEL_OBJECT_SUFFIX = ".ko" | 18 | KERNEL_OBJECT_SUFFIX = ".ko" |
@@ -25,6 +24,7 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" | |||
25 | # be called before do_compile. See module.bbclass for an example. | 24 | # be called before do_compile. See module.bbclass for an example. |
26 | do_make_scripts() { | 25 | do_make_scripts() { |
27 | unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS | 26 | unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS |
28 | oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \ | 27 | make CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \ |
28 | HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}" \ | ||
29 | -C ${STAGING_KERNEL_DIR} O=${STAGING_KERNEL_BUILDDIR} scripts prepare | 29 | -C ${STAGING_KERNEL_DIR} O=${STAGING_KERNEL_BUILDDIR} scripts prepare |
30 | } | 30 | } |