[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK7LNAThrg9BCCoyPwpxzha86DhjsHUFjzD_xMV7U+bsdpVXzg@mail.gmail.com>
Date: Mon, 17 May 2021 11:50:14 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Andrii Nakryiko <andrii.nakryiko@...il.com>
Cc: Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
Alexei Starovoitov <ast@...nel.org>,
Andrii Nakryiko <andrii@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>, Martin KaFai Lau <kafai@...com>,
Michal Marek <michal.lkml@...kovi.net>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
bpf <bpf@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>,
Networking <netdev@...r.kernel.org>,
Josh Poimboeuf <jpoimboe@...hat.com>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>
Subject: Re: [PATCH 2/2] kbuild: remove libelf checks from top Makefile
(+CC: Josh, Peter)
On Thu, May 13, 2021 at 4:36 AM Andrii Nakryiko
<andrii.nakryiko@...il.com> wrote:
>
> On Tue, May 11, 2021 at 11:52 PM Masahiro Yamada <masahiroy@...nel.org> wrote:
> >
> > I do not see a good reason why only the libelf development package must
> > be so carefully checked.
> >
> > Kbuild generally does not check host tools or libraries.
> >
> > For example, x86_64 defconfig fails to build with no libssl development
> > package installed.
> >
> > scripts/extract-cert.c:21:10: fatal error: openssl/bio.h: No such file or directory
> > 21 | #include <openssl/bio.h>
> > | ^~~~~~~~~~~~~~~
> >
> > To solve the build error, you need to install libssl-dev or openssl-devel
> > package, depending on your distribution.
> >
> > 'apt-file search', 'dnf provides', etc. is your frined to find a proper
> > package to install.
> >
> > This commit removes all the libelf checks from the top Makefile.
> >
> > If libelf is missing, objtool will fail to build in a similar pattern:
> >
> > .../linux/tools/objtool/include/objtool/elf.h:10:10: fatal error: gelf.h: No such file or directory
> > 10 | #include <gelf.h>
> >
> > You need to install libelf-dev, libelf-devel, or elfutils-libelf-devel
> > to proceed.
> >
> > Another remarkable change is, CONFIG_STACK_VALIDATION (without
> > CONFIG_UNWINDER_ORC) previously continued to build with a warning,
> > but now it will treat missing libelf as an error.
> >
> > This is just a one-time installation, so it should not matter to break
> > a build and make a user install the package.
> >
> > BTW, the traditional way to handle such checks is autotool, but according
> > to [1], I do not expect the kernel build would have similar scripting
> > like './configure' does.
> >
> > [1]: https://lore.kernel.org/lkml/CA+55aFzr2HTZVOuzpHYDwmtRJLsVzE-yqg2DHpHi_9ePsYp5ug@mail.gmail.com/
> >
> > Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
> > ---
> >
>
> resolve_btfids part looks good to me:
>
> Acked-by: Andrii Nakryiko <andrii@...nel.org>
>
> > Makefile | 78 +++++++++++----------------------------
> > scripts/Makefile.build | 2 -
> > scripts/Makefile.modfinal | 2 -
> > 3 files changed, 22 insertions(+), 60 deletions(-)
> >
>
> [...]
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists