From: Justin Bronder <jsbronder@cold-front.org>
To: Bruce Ashfield <bruce.ashfield@gmail.com>
Cc: Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>
Subject: Re: kernel: module: module-base: depend on elfutils-native
Date: Tue, 20 Feb 2018 15:45:04 -0500 [thread overview]
Message-ID: <20180220204504.GA16668@lasswell> (raw)
In-Reply-To: <CADkTA4PYMiMCKSE-rua7pjHaYgg_U3caan=Sy_i6r2Agc-8vUQ@mail.gmail.com>
On 20/02/18 12:06 -0500, Bruce Ashfield wrote:
> On Tue, Feb 20, 2018 at 11:41 AM, Justin Bronder
> <jsbronder@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?
>
> >
> > 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.
>
> 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@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
next prev parent reply other threads:[~2018-02-20 20:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-20 16:41 [PATCH] kernel: module: module-base: depend on elfutils-native Justin Bronder
2018-02-20 17:06 ` Bruce Ashfield
2018-02-20 20:45 ` Justin Bronder [this message]
2018-02-20 21:44 ` Bruce Ashfield
2018-02-20 17:35 ` ✗ patchtest: failure for " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180220204504.GA16668@lasswell \
--to=jsbronder@cold-front.org \
--cc=bruce.ashfield@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.