Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Khem Raj <raj.khem@gmail.com>
To: Christopher Larson <kergoth@gmail.com>,
	Jason Wessel <jason.wessel@windriver.com>
Cc: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] module.bbclass: swap AR and LD order
Date: Fri, 24 Jan 2020 11:13:20 -0800	[thread overview]
Message-ID: <6027c983-71be-659e-5ca8-e203b57f528d@gmail.com> (raw)
In-Reply-To: <CABcZANnAW-HYaJmDs8U2iwfzJSb1ig3KsVMvXuz6QjTAR6vqtw@mail.gmail.com>

On 1/24/20 10:19 AM, Christopher Larson wrote:
> What makefile change caused this? That behavior doesn't make much sense 
> given how make processes its command-line arguments.
> 

I agree with you here, it could be a rare check where one want to define 
what collect progam should be used ( ld or ar )

besides, recently we moved AR to be gcc-ar/llvm-ar by default in config 
metadata, which is not going to work out of box for compiling kernel and 
modules, so overriding it with KERNEL_AR in 
module_do_compile/install/configure tasks is good change.

> On Thu, Jan 23, 2020 at 3:34 PM Jason Wessel <jason.wessel@windriver.com 
> <mailto:jason.wessel@windriver.com>> wrote:
> 
>     The 5.x kernels seem to have made a change to the linker command
>     line processing.
> 
>     When trying to build out of tree kernel modules, such as the
>     virtualbox guest additions, the following error is printed:
> 
>     | make[1]: Entering directory
>     '/opt/build-x86-64/tmp/work/qemux86_64-poky-linux/vboxguestdrivers/6.1.2-r0/vbox_module/vboxvideo'
>     | make[3]: Entering directory
>     '/opt/build-x86-64/tmp/work-shared/qemux86-64/kernel-build-artifacts'
>     | make V= CONFIG_MODULE_SIG= CONFIG_MODULE_SIG_ALL= -C
>     /opt/build-x86-64/tmp/work/qemux86_64-poky-linux/vboxguestdrivers/6.1.2-r0/5.2.28-yocto-standard/build
>     M=/opt/build-x86-64/tmp/work/qemux86_64-poky-linux/vboxguestdrivers/6.1.2-r0/vbox_module/vboxguest
>     SRCROOT=/opt/build-x86-64/tmp/work/qemux86_64-poky-linux/vboxguestdrivers/6.1.2-r0/vbox_module/vboxguest
>     modules
>     | make[3]: Entering directory
>     '/opt/build-x86-64/tmp/work-shared/qemux86-64/kernel-build-artifacts'
>     |   LD [M] 
>     /opt/build-x86-64/tmp/work/qemux86_64-poky-linux/vboxguestdrivers/6.1.2-r0/vbox_module/vboxvideo/vboxvideo.o
>     | x86_64-poky-linux-ld.bfd: cannot find AR=x86_64-poky-linux-ar: No
>     such file or directory
> 
>     The AR arguments passed to the make command are being processed as
>     command line arguments to the linker due to some changes in the
>     kernel's Makefile.  For now the easiest fix is to just swap the
>     arguments in the module.bbclass.
> 
>     Signed-off-by: Jason Wessel <jason.wessel@windriver.com
>     <mailto:jason.wessel@windriver.com>>
>     ---
>       meta/classes/module.bbclass | 3 +--
>       1 file changed, 1 insertion(+), 2 deletions(-)
> 
>     diff --git a/meta/classes/module.bbclass b/meta/classes/module.bbclass
>     index c0dfa35061..e1e5fdaa72 100644
>     --- a/meta/classes/module.bbclass
>     +++ b/meta/classes/module.bbclass
>     @@ -38,8 +38,7 @@ module_do_compile() {
>              unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
>              oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR}   \
>                         KERNEL_VERSION=${KERNEL_VERSION}    \
>     -                  CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
>     -                  AR="${KERNEL_AR}" \
>     +                  CC="${KERNEL_CC}" AR="${KERNEL_AR}"
>     LD="${KERNEL_LD}" \
>                         O=${STAGING_KERNEL_BUILDDIR} \
>                         KBUILD_EXTRA_SYMBOLS="${KBUILD_EXTRA_SYMBOLS}" \
>                         ${MAKE_TARGETS}
>     -- 
>     2.23.0
> 
>     -- 
>     _______________________________________________
>     Openembedded-core mailing list
>     Openembedded-core@lists.openembedded.org
>     <mailto:Openembedded-core@lists.openembedded.org>
>     http://lists.openembedded.org/mailman/listinfo/openembedded-core
> 
> 
> 
> -- 
> Christopher Larson
> kergoth at gmail dot com
> Founder - BitBake, OpenEmbedded, OpenZaurus
> Senior Software Engineer, Mentor Graphics
> 



  reply	other threads:[~2020-01-24 19:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-23 22:34 [PATCH] module.bbclass: swap AR and LD order Jason Wessel
2020-01-24 18:19 ` Christopher Larson
2020-01-24 19:13   ` Khem Raj [this message]
2020-01-24 21:05     ` Jason Wessel
2020-01-24 21:19       ` Khem Raj
2020-01-24 21:43         ` Jason Wessel

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=6027c983-71be-659e-5ca8-e203b57f528d@gmail.com \
    --to=raj.khem@gmail.com \
    --cc=jason.wessel@windriver.com \
    --cc=kergoth@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox