kernel: module: module-base: depend on elfutils-native
PATCH 1/1 kernel: module: module-base: depend on elfutils-native
libelf is required for CONFIG_STACK_VALIDATION which is required by CONFIG_UNWINDER_ORC (the default in 4.14+).
We also need to update the module classes to pass HOSTCC and HOSTCPP just like the kernel class already does. Otherwise the test for libelf in the kernel Makefile fails.
--- meta/classes/kernel.bbclass | 2 +- meta/classes/module-base.bbclass | 1 + meta/classes/module.bbclass | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-)
meta/classes/kernel.bbclass +1 -1
@@ -4,7 +4,7 @@ KERNEL_PACKAGE_NAME ??= "kernel" KERNEL_DEPLOYSUBDIR ??= "${@ "" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") else d.getVar("KERNEL_PACKAGE_NAME") }" PROVIDES += "${@ "virtual/kernel" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") else "" }" -DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc kmod-native bc-native lzop-native" +DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc kmod-native bc-native lzop-native elfutils-native" PACKAGE_WRITE_DEPS += "depmodwrapper-cross" do_deploy[depends] += "depmodwrapper-cross:do_populate_sysroot"
meta/classes/module-base.bbclass +1 -0
@@ -23,5 +23,6 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" do_make_scripts() { unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS make CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \ + HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}" \ -C ${STAGING_KERNEL_DIR} O=${STAGING_KERNEL_BUILDDIR} scripts }
meta/classes/module.bbclass +3 -1
@@ -1,10 +1,12 @@ inherit module-base kernel-module-split pkgconfig +DEPENDS += "elfutils-native" + addtask make_scripts after do_prepare_recipe_sysroot before do_configure do_make_scripts[lockfiles] = "${TMPDIR}/kernel-scripts.lock" do_make_scripts[depends] += "virtual/kernel:do_shared_workdir" -EXTRA_OEMAKE += "KERNEL_SRC=${STAGING_KERNEL_DIR}" +EXTRA_OEMAKE += "KERNEL_SRC=${STAGING_KERNEL_DIR} HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}"" MODULES_INSTALL_TARGET ?= "modules_install" MODULES_MODULE_SYMVERS_LOCATION ?= ""
Signature · 1 line
2.13.6
Quoted 2 lines · Justin Bronder
libelf is required for
CONFIG_STACK_VALIDATIONwhich is required byCONFIG_UNWINDER_ORC(the default in 4.14+).
As you'll see in the discussion about adding bison-native, we don't want to add these version specific dependencies globally.
Quoted 2 lines
We also need to update the module classes to pass HOSTCC and HOSTCPP
This is already covered in my v3 "make-modules-script" changes.
Bruce
Quoted 58 lines
just like the kernel class already does. Otherwise the test for libelf in the kernel
Makefilefails.--- meta/classes/kernel.bbclass | 2 +- meta/classes/module-base.bbclass | 1 + meta/classes/module.bbclass | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-)meta/classes/kernel.bbclass +1
-1@@ -4,7 +4,7 @@ KERNEL_PACKAGE_NAME ??= "kernel" KERNEL_DEPLOYSUBDIR ??= "${@ "" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") else d.getVar("KERNEL_PACKAGE_NAME") }" PROVIDES += "${@ "virtual/kernel" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") else "" }" -DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc kmod-native bc-native lzop-native" +DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc kmod-native bc-native lzop-native elfutils-native" PACKAGE_WRITE_DEPS += "depmodwrapper-cross" do_deploy[depends] += "depmodwrapper-cross:do_populate_sysroot"meta/classes/module-base.bbclass +1
-0@@ -23,5 +23,6 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" do_make_scripts() { unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS make CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \ + HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}" \ -C ${STAGING_KERNEL_DIR} O=${STAGING_KERNEL_BUILDDIR} scripts }meta/classes/module.bbclass +3
-2@@ -1,10 +1,12 @@ inherit module-base kernel-module-split pkgconfig +DEPENDS += "elfutils-native" + addtask make_scripts after do_prepare_recipe_sysroot before do_configure do_make_scripts[lockfiles] = "${TMPDIR}/kernel-scripts.lock" do_make_scripts[depends] += "virtual/kernel:do_shared_workdir" -EXTRA_OEMAKE += "KERNEL_SRC=${STAGING_KERNEL_DIR}" +EXTRA_OEMAKE += "KERNEL_SRC=${STAGING_KERNEL_DIR} HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}"" MODULES_INSTALL_TARGET ?= "modules_install" MODULES_MODULE_SYMVERS_LOCATION ?= "" --2.13.6
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"
Quoted 7 lines · Bruce Ashfield
Quoted 2 lines · Justin Bronder
libelf is required for
CONFIG_STACK_VALIDATIONwhich is required byCONFIG_UNWINDER_ORC(the default in 4.14+).As you'll see in the discussion about adding bison-native, we don't want to add these version specific dependencies globally.
I was watching but didn't see a definitive conclusion in that thread yet. Ignoring out of tree modules, I suppose it is pretty trivial to just add the extra DEPENDS to the kernel recipe for a while until they're required by all supported kernel versions. However, for out of tree modules, it's a bit more of a burden to add it for every recipe. Is that the suggested way forward to deal with this or is there a better method?
Quoted 5 lines
Quoted 3 lines
We also need to update the module classes to pass HOSTCC and HOSTCPP
This is already covered in my v3 "make-modules-script" changes.
That does cover the patch to module-base.bbclass, but it's missing the addition to EXTRA_OEMAKE in module.bbclass which is still needed in order to be able to find elfutils-native if I add it to the DEPENDS of the module.
Quoted 67 lines
Bruce
Quoted 58 lines
just like the kernel class already does. Otherwise the test for libelf in the kernel
Makefilefails.--- meta/classes/kernel.bbclass | 2 +- meta/classes/module-base.bbclass | 1 + meta/classes/module.bbclass | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-)meta/classes/kernel.bbclass +1
-1@@ -4,7 +4,7 @@ KERNEL_PACKAGE_NAME ??= "kernel" KERNEL_DEPLOYSUBDIR ??= "${@ "" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") else d.getVar("KERNEL_PACKAGE_NAME") }" PROVIDES += "${@ "virtual/kernel" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") else "" }" -DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc kmod-native bc-native lzop-native" +DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc kmod-native bc-native lzop-native elfutils-native" PACKAGE_WRITE_DEPS += "depmodwrapper-cross" do_deploy[depends] += "depmodwrapper-cross:do_populate_sysroot"meta/classes/module-base.bbclass +1
-0@@ -23,5 +23,6 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" do_make_scripts() { unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS make CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \ + HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}" \ -C ${STAGING_KERNEL_DIR} O=${STAGING_KERNEL_BUILDDIR} scripts }meta/classes/module.bbclass +3
-2@@ -1,10 +1,12 @@ inherit module-base kernel-module-split pkgconfig +DEPENDS += "elfutils-native" + addtask make_scripts after do_prepare_recipe_sysroot before do_configure do_make_scripts[lockfiles] = "${TMPDIR}/kernel-scripts.lock" do_make_scripts[depends] += "virtual/kernel:do_shared_workdir" -EXTRA_OEMAKE += "KERNEL_SRC=${STAGING_KERNEL_DIR}" +EXTRA_OEMAKE += "KERNEL_SRC=${STAGING_KERNEL_DIR} HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}"" MODULES_INSTALL_TARGET ?= "modules_install" MODULES_MODULE_SYMVERS_LOCATION ?= "" --2.13.6
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-coreSignature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"
Signature · 1 line
Justin Bronder
Quoted 9 lines · Justin Bronder
Quoted 7 lines · Bruce Ashfield
Quoted 2 lines · Justin Bronder
libelf is required for
CONFIG_STACK_VALIDATIONwhich is required byCONFIG_UNWINDER_ORC(the default in 4.14+).As you'll see in the discussion about adding bison-native, we don't want to add these version specific dependencies globally.
Quoted 6 lines
I was watching but didn't see a definitive conclusion in that thread yet. Ignoring out of tree modules, I suppose it is pretty trivial to just add the extra DEPENDS to the kernel recipe for a while until they're required by all supported kernel versions. However, for out of tree modules, it's a bit more of a burden to add it for every recipe. Is that the suggested way forward to deal with this or is there a better method?
Adding it to the new make-mod-scripts recipe is the suggested way forward, it may need to be version dependent .. which is why I haven't added it yet, but instead have been carrying them in kernel recipes.
Since the mod-scripts depend on the kernel recipe, that should be pulling in a version specific dependency.
Quoted 10 lines
Quoted 6 lines
Quoted 4 lines
We also need to update the module classes to pass HOSTCC and HOSTCPP
This is already covered in my v3 "make-modules-script" changes.
That does cover the patch to module-base.bbclass, but it's missing the addition to
EXTRA_OEMAKEin module.bbclass which is still needed in order to be able to find elfutils-native if I add it to the DEPENDS of the module.
Once I get that first iteration in tree, my plan was to follow up with any additional dependencies.
Bruce
Quoted 71 lines
Quoted 57 lines
Bruce
Quoted 53 lines
just like the kernel class already does. Otherwise the test for libelf in the kernel
Makefilefails.--- meta/classes/kernel.bbclass | 2 +- meta/classes/module-base.bbclass | 1 + meta/classes/module.bbclass | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-)meta/classes/kernel.bbclass +1
-1@@ -4,7 +4,7 @@ KERNEL_PACKAGE_NAME ??= "kernel" KERNEL_DEPLOYSUBDIR ??= "${@ "" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") else d.getVar("KERNEL_PACKAGE_NAME") }" PROVIDES += "${@ "virtual/kernel" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") else "" }" -DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc kmod-native bc-native lzop-native" +DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc kmod-native bc-native lzop-native elfutils-native" PACKAGE_WRITE_DEPS += "depmodwrapper-cross" do_deploy[depends] += "depmodwrapper-cross:do_populate_sysroot"meta/classes/module-base.bbclass +1
-0@@ -23,5 +23,6 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" do_make_scripts() { unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS make CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \ + HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}" \ -C ${STAGING_KERNEL_DIR} O=${STAGING_KERNEL_BUILDDIR} scripts }meta/classes/module.bbclass +3
-2@@ -1,10 +1,12 @@ inherit module-base kernel-module-split pkgconfig +DEPENDS += "elfutils-native" + addtask make_scripts after do_prepare_recipe_sysroot before do_configure do_make_scripts[lockfiles] = "${TMPDIR}/kernel-scripts.lock" do_make_scripts[depends] += "virtual/kernel:do_shared_workdir" -EXTRA_OEMAKE += "KERNEL_SRC=${STAGING_KERNEL_DIR}" +EXTRA_OEMAKE += "KERNEL_SRC=${STAGING_KERNEL_DIR} HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}"" MODULES_INSTALL_TARGET ?= "modules_install" MODULES_MODULE_SYMVERS_LOCATION ?= "" --2.13.6
Quoted 11 lines
Quoted 5 lines
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core--
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"--
Justin Bronder
Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"
✗ patchtest: failure for kernel: module: module-base: depend on elfutils-native
In reply to Justin Bronder== Series Details ==
Series: kernel: module: module-base: depend on elfutils-native
Revision: 1
URL : https://patchwork.openembedded.org/series/11018/
State : failure
== Summary ==
Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:
* Patch kernel: module: module-base: depend on elfutils-native Issue Patch is missing Signed-off-by [test_signed_off_by_presence] Suggested fix Sign off the patch (either manually or with "git commit --amend -s")
If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).
---
Guidelines: https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe