linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel Díaz" <daniel.diaz@linaro.org>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: Michal Marek <michal.lkml@markovi.net>,
	Rolf Eike Beer <eb@emlix.com>,
	Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	stable <stable@vger.kernel.org>,
	Naresh Kamboju <naresh.kamboju@linaro.org>
Subject: Re: [PATCH] scripts: Fix linking extract-cert against libcrypto
Date: Tue, 16 Feb 2021 17:51:36 -0600	[thread overview]
Message-ID: <CAEUSe7_W4uGU5VQw8ibxAVgQW6MjJj0=YrHd+sCKkh76vRwuyg@mail.gmail.com> (raw)
In-Reply-To: <CAK7LNAR-OFSYERwX45gy=WyVkBBaUEVY_UBS0ZNj5T+B0a6+Xw@mail.gmail.com>

Hello!

Apologies for the delay -- Currently experiencing power/connectivity issues.


On Thu, 11 Feb 2021 at 01:12, Masahiro Yamada <masahiroy@kernel.org> wrote:
> I am wondering how "HOSTLDFLAGS_sign-file" and
> "HOSTLDFLAGS_extract-cert" worked for you.
> Kbuild supports HOSTLDLIBS_<target> syntax,
> but not HOSTLDFLAGS_<target>.

Thanks for the insight! The pointer you have provided are very
valuable to try to fix our problem.

What effectively happened was that LDFLAGS was removed, and therefore
the gcc line did not include one -L path that's proving difficult to
use under OpenEmbedded cross-compilations. This discussion has
provided much light in areas that are unknown to me, but so far it
looks like the fix will need to happen in the OE recipe and not in the
kernel itself.

Thanks and greetings!

Daniel Díaz
daniel.diaz@linaro.org



> I see $(HOSTLDLIBS_$(target-stem) in scripts/Makefile.host
> but failed to find $(HOSTLDFLAGS_$(target-stem)).
>
> So, presumably you will get the same result
> (OE build error will be fixed)
> even without HOSTLDFLAGS_sign-file
> or HOSTLDFLAGS_extract-cert.
>
>
>
> But, I am still wondering what the correct approach is.
>
>
>
> Basically, there are two ways to link libraries
> in non-standard paths.
>
>
>
> [1] Give linker flags via HOSTLDFLAGS
>
>    This is documented in Documentation/kbuild/kbuild.rst
>
>    HOSTLDFLAGS
>    -----------
>    Additional flags to be passed when linking host programs.
>
>
>
>
> [2] Use pkg-config
>
>
>
>
>
>
> OE already adopted [1].
>
> I think the following long lines came from HOSTLDFLAGS.
>
>     -isystem/oe/build/tmp/work/MACHINE/linux/5.10+gitAUTOINC+b01f250d83-r0/recipe-sysroot-native/usr/include
> \
>     -O2 -pipe -L/oe/build/tmp/work/MACHINE/linux/5.10+gitAUTOINC+b01f250d83-r0/recipe-sysroot-native/usr/lib
> \
>     -L/oe/build/tmp/work/MACHINE/linux/5.10+gitAUTOINC+b01f250d83-r0/recipe-sysroot-native/lib
> \
>     -Wl,-rpath-link,/oe/build/tmp/work/MACHINE/linux/5.10+gitAUTOINC+b01f250d83-r0/recipe-sysroot-native/usr/lib
> \
>     -Wl,-rpath-link,/oe/build/tmp/work/MACHINE/linux/5.10+gitAUTOINC+b01f250d83-r0/recipe-sysroot-native/lib
> \
>     -Wl,-rpath,/oe/build/tmp/work/MACHINE/linux/5.10+gitAUTOINC+b01f250d83-r0/recipe-sysroot-native/usr/lib
> \
>     -Wl,-rpath,/oe/build/tmp/work/MACHINE/linux/5.10+gitAUTOINC+b01f250d83-r0/recipe-sysroot-native/lib
> \
>     -Wl,-O1 -I/oe/build/tmp/work/MACHINE/linux/5.10+gitAUTOINC+b01f250d83-r0/recipe-sysroot-native/usr/include
> \
>     -I ./scripts -o scripts/extract-cert \
>
>
>
>
> But, some people are not satisfied with [1] (or do not notice it)?
>
>
> Then, 2cea4a7a1885 introduced the second one [2].
>
> Mixing [1] and [2] perhaps confuses the build system somehow?
>
>
>
>
> So, 2cea4a7a1885 was a problem, but
> I do not think this patch is the right one either.
>
> (At least, HOSTLDFLAGS_* additions are pointless)
>
>
>
>
> --
> Best Regards
> Masahiro Yamada

      reply	other threads:[~2021-02-16 23:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-09  4:59 [PATCH] scripts: Fix linking extract-cert against libcrypto Daniel Díaz
2021-02-09  8:44 ` Rolf Eike Beer
2021-02-11  8:23   ` Rolf Eike Beer
2021-02-11 10:29   ` Rolf Eike Beer
2021-02-12  7:44     ` Rolf Eike Beer
2021-02-16 23:53       ` Daniel Díaz
2021-02-11  7:11 ` Masahiro Yamada
2021-02-16 23:51   ` Daniel Díaz [this message]

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='CAEUSe7_W4uGU5VQw8ibxAVgQW6MjJj0=YrHd+sCKkh76vRwuyg@mail.gmail.com' \
    --to=daniel.diaz@linaro.org \
    --cc=eb@emlix.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=naresh.kamboju@linaro.org \
    --cc=stable@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).