All of lore.kernel.org
 help / color / mirror / Atom feed
From: maennich@google.com
To: linux-kernel@vger.kernel.org
Cc: kernel-team@android.com, maennich@google.com,
	stable@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Nathan Chancellor <nathan@kernel.org>,
	Andrii Nakryiko <andrii@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>
Subject: [PATCH 5/5] lib/Kconfig.debug: Allow BTF + DWARF5 with pahole 1.21+
Date: Wed, 22 Feb 2023 11:21:47 +0000	[thread overview]
Message-ID: <20230222112141.278066-6-maennich@google.com> (raw)
In-Reply-To: <20220201205624.652313-1-nathan@kernel.org>

From: Nathan Chancellor <nathan@kernel.org>

Commit 98cd6f521f10 ("Kconfig: allow explicit opt in to DWARF v5")
prevented CONFIG_DEBUG_INFO_DWARF5 from being selected when
CONFIG_DEBUG_INFO_BTF is enabled because pahole had issues with clang's
DWARF5 info. This was resolved by [1], which is in pahole v1.21.

Allow DEBUG_INFO_DWARF5 to be selected with DEBUG_INFO_BTF when using
pahole v1.21 or newer.

[1]: https://git.kernel.org/pub/scm/devel/pahole/pahole.git/commit/?id=7d8e829f636f47aba2e1b6eda57e74d8e31f733c

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20220201205624.652313-6-nathan@kernel.org
Signed-off-by: Matthias Maennich <maennich@google.com>
---
 lib/Kconfig.debug | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 0743c9567d7e..dd86de130cdf 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -302,7 +302,7 @@ config DEBUG_INFO_DWARF4
 config DEBUG_INFO_DWARF5
 	bool "Generate DWARF Version 5 debuginfo"
 	depends on !CC_IS_CLANG || AS_IS_LLVM || (AS_IS_GNU && AS_VERSION >= 23502 && AS_HAS_NON_CONST_LEB128)
-	depends on !DEBUG_INFO_BTF
+	depends on !DEBUG_INFO_BTF || PAHOLE_VERSION >= 121
 	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
-- 
2.39.2.637.g21b0678d19-goog


  parent reply	other threads:[~2023-02-22 11:24 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-01 20:56 [PATCH bpf-next 0/5] Allow CONFIG_DEBUG_INFO_DWARF5=y + CONFIG_DEBUG_INFO_BTF=y Nathan Chancellor
2022-02-01 20:56 ` [PATCH bpf-next 1/5] MAINTAINERS: Add scripts/pahole-flags.sh to BPF section Nathan Chancellor
2022-02-01 20:56 ` [PATCH bpf-next 2/5] kbuild: Add CONFIG_PAHOLE_VERSION Nathan Chancellor
2022-02-01 20:56 ` [PATCH bpf-next 3/5] scripts/pahole-flags.sh: Use pahole-version.sh Nathan Chancellor
2022-02-01 20:56 ` [PATCH bpf-next 4/5] lib/Kconfig.debug: Use CONFIG_PAHOLE_VERSION Nathan Chancellor
2022-02-01 20:56 ` [PATCH bpf-next 5/5] lib/Kconfig.debug: Allow BTF + DWARF5 with pahole 1.21+ Nathan Chancellor
2022-02-02  7:05 ` [PATCH bpf-next 0/5] Allow CONFIG_DEBUG_INFO_DWARF5=y + CONFIG_DEBUG_INFO_BTF=y Andrii Nakryiko
2022-02-02 10:25   ` Daniel Borkmann
2022-02-02 10:30 ` patchwork-bot+netdevbpf
2023-02-22 11:21 ` [PATCH " maennich
2023-02-22 11:25   ` Greg Kroah-Hartman
2023-02-22 11:37     ` Matthias Männich
2023-02-22 11:21 ` [PATCH 1/5] MAINTAINERS: Add scripts/pahole-flags.sh to BPF section maennich
2023-02-22 11:23   ` kernel test robot
2023-02-22 11:26   ` Greg Kroah-Hartman
2023-02-22 11:38     ` Matthias Männich
2023-02-22 11:21 ` [PATCH 2/5] kbuild: Add CONFIG_PAHOLE_VERSION maennich
2023-02-22 11:21 ` [PATCH 3/5] scripts/pahole-flags.sh: Use pahole-version.sh maennich
2023-02-22 11:21 ` [PATCH 4/5] lib/Kconfig.debug: Use CONFIG_PAHOLE_VERSION maennich
2023-02-23  9:17   ` Greg Kroah-Hartman
2023-02-22 11:21 ` maennich [this message]
2023-02-23 11:53 ` [PATCH v5.15 v2 0/4] Allow CONFIG_DEBUG_INFO_DWARF5=y + CONFIG_DEBUG_INFO_BTF=y Matthias Maennich
2023-02-23 12:36   ` Greg Kroah-Hartman
2023-02-23 11:53 ` [PATCH v5.15 v2 1/4] kbuild: Add CONFIG_PAHOLE_VERSION Matthias Maennich
2023-02-23 11:53 ` [PATCH v5.15 v2 2/4] scripts/pahole-flags.sh: Use pahole-version.sh Matthias Maennich
2023-02-23 11:53 ` [PATCH v5.15 v2 3/4] lib/Kconfig.debug: Use CONFIG_PAHOLE_VERSION Matthias Maennich
2023-02-23 11:53 ` [PATCH v5.15 v2 4/4] lib/Kconfig.debug: Allow BTF + DWARF5 with pahole 1.21+ Matthias Maennich

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=20230222112141.278066-6-maennich@google.com \
    --to=maennich@google.com \
    --cc=andrii@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nathan@kernel.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 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.