[OE-core] kernel: module: module-base: depend on elfutils-native

Bruce Ashfield bruce.ashfield at gmail.com
Tue Feb 20 21:44:19 UTC 2018


On Tue, Feb 20, 2018 at 3:45 PM, Justin Bronder
<jsbronder at cold-front.org> wrote:
> On 20/02/18 12:06 -0500, Bruce Ashfield wrote:
>> On Tue, Feb 20, 2018 at 11:41 AM, Justin Bronder
>> <jsbronder at cold-front.org> wrote:
>> > libelf is required for CONFIG_STACK_VALIDATION which is required by
>> > CONFIG_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?

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.

>
>>
>> >
>> > 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.

Once I get that first iteration in tree, my plan was to follow up with any
additional dependencies.

Bruce

>
>>
>> Bruce
>>
>> > 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(-)
>> >
>> > diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
>> > index 5cdff581ef..d3a7e1e1cb 100644
>> > --- a/meta/classes/kernel.bbclass
>> > +++ b/meta/classes/kernel.bbclass
>> > @@ -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"
>> > diff --git a/meta/classes/module-base.bbclass b/meta/classes/module-base.bbclass
>> > index f851b85163..3b56e04534 100644
>> > --- a/meta/classes/module-base.bbclass
>> > +++ b/meta/classes/module-base.bbclass
>> > @@ -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
>> >  }
>> > diff --git a/meta/classes/module.bbclass b/meta/classes/module.bbclass
>> > index 78d1b21dbd..89dee2dae8 100644
>> > --- a/meta/classes/module.bbclass
>> > +++ b/meta/classes/module.bbclass
>> > @@ -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
>> > Openembedded-core at lists.openembedded.org
>> > 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



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"



More information about the Openembedded-core mailing list