All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sedat Dilek <sedat.dilek@gmail.com>
To: Nathan Chancellor <natechancellor@gmail.com>
Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com>,
	Masahiro Yamada <masahiroy@kernel.org>,
	Michal Marek <michal.lkml@markovi.net>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
	Yonghong Song <yhs@fb.com>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
	Networking <netdev@vger.kernel.org>, bpf <bpf@vger.kernel.org>
Subject: Re: [PATCH] bpf: Hoise pahole version checks into Kconfig
Date: Thu, 4 Feb 2021 08:22:01 +0100	[thread overview]
Message-ID: <CA+icZUVfznOpAQK=6GWoF6XmzHyXjdUgNG5HeoQw3Dwb4wW9uA@mail.gmail.com> (raw)
In-Reply-To: <20210113230739.GA22747@Ryzen-9-3900X.localdomain>

On Thu, Jan 14, 2021 at 12:07 AM Nathan Chancellor
<natechancellor@gmail.com> wrote:
>
> On Wed, Jan 13, 2021 at 02:38:27PM -0800, Andrii Nakryiko wrote:
> > Hm.. Just saw Linus proposing using $(error-if) in Kconfig for an
> > unrelated issue ([0]). If we can make this work, then it would catch
> > such issue early on, yet won't have any downsides of hiding
> > CONFIG_DEBUG_INFO_BTF if pahole is too old. WDYT?
> >
> >   [0] https://lore.kernel.org/lkml/CAHk-=wh-+TMHPTFo1qs-MYyK7tZh-OQovA=pP3=e06aCVp6_kA@mail.gmail.com/
>
> Yes, I think that would be exactly what we want because DEBUG_INFO_BTF
> could cause the build to error if PAHOLE_VERSION is not >= 116. I will
> try to keep an eye on that thread to see how it goes then respin this
> based on anything that comes from it.
>

For BPF/pahole testing (see [1]) with CONFIG_DEBUG_INFO_DWARF5=y I did:

$ git diff
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index b0840d192e95..f15b37143165 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -272,7 +272,7 @@ config DEBUG_INFO_DWARF5
       bool "Generate DWARF Version 5 debuginfo"
       depends on GCC_VERSION >= 50000 || CC_IS_CLANG
       depends on CC_IS_GCC ||
$(success,$(srctree)/scripts/test_dwarf5_support.sh $(CC)
$(CLANG_FLAGS))
-       depends on !DEBUG_INFO_BTF
+       depends on !DEBUG_INFO_BTF || (DEBUG_INFO_BTF && PAHOLE_VERSION >= 120)
       help
         Generate DWARF v5 debug info. Requires binutils 2.35.2, gcc 5.0+ (gcc
         5.0+ accepts the -gdwarf-5 flag but only had partial support for some

Thanks again for that patch.

- Sedat -

[1] https://git.kernel.org/pub/scm/devel/pahole/pahole.git/log/?h=tmp.1.20

  reply	other threads:[~2021-02-04  7:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-11 18:06 [PATCH] bpf: Hoise pahole version checks into Kconfig Nathan Chancellor
2021-01-11 19:19 ` Masahiro Yamada
2021-01-11 19:34   ` Nathan Chancellor
2021-01-11 19:50     ` Masahiro Yamada
2021-01-11 20:00       ` Nathan Chancellor
2021-01-11 21:24         ` Andrii Nakryiko
2021-01-13 22:38           ` Andrii Nakryiko
2021-01-13 23:07             ` Nathan Chancellor
2021-02-04  7:22               ` Sedat Dilek [this message]
2021-01-12 23:43 ` Sedat Dilek
2021-02-04 18:11 ` Sedat Dilek

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='CA+icZUVfznOpAQK=6GWoF6XmzHyXjdUgNG5HeoQw3Dwb4wW9uA@mail.gmail.com' \
    --to=sedat.dilek@gmail.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=john.fastabend@gmail.com \
    --cc=kafai@fb.com \
    --cc=kpsingh@kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=natechancellor@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=songliubraving@fb.com \
    --cc=yhs@fb.com \
    /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.