From patchwork Tue Feb 1 20:56:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 12732292 X-Patchwork-Delegate: bpf@iogearbox.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF734C433EF for ; Tue, 1 Feb 2022 20:57:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242561AbiBAU5H (ORCPT ); Tue, 1 Feb 2022 15:57:07 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:58332 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236893AbiBAU44 (ORCPT ); Tue, 1 Feb 2022 15:56:56 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BD67161756; Tue, 1 Feb 2022 20:56:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7CDE7C340ED; Tue, 1 Feb 2022 20:56:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643749015; bh=JjYwktbzWgaZZwjKwRtnb1xc51qgqbnt81floObI+Ww=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=to+G9Qb5eqyzP8rsE+Jwnl3XgQEegaYvKjtUIXNeNSdePMOyhgkbmNe4/Yx5mSAuq G68kspeColB3L2HTB7TAqyf6eZZemWF9yeowZbU+4A3Esammaiyc77KDKspyPrB/CU lVXJsY8RN5ChGncKVo5b+ZqwK+Y56Sc6FuolYua270Hqy39EDWvWtipJ1lizK2Jda7 bfgK2XZvMTR7kMh+pIx8RL+RkRCQWQtO2gxcTvAsGctAMZeIfukeoGRK1OGFyNnow5 d0RSVaqHzoVD+kouQdPshWdBO/7wIBX7MMi+tNKBgiUHNVWsZaIdi72AUxHdFK9ugN kRTFBcGZAn1Kg== From: Nathan Chancellor To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko Cc: Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Nick Desaulniers , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Nathan Chancellor Subject: [PATCH bpf-next 1/5] MAINTAINERS: Add scripts/pahole-flags.sh to BPF section Date: Tue, 1 Feb 2022 13:56:20 -0700 Message-Id: <20220201205624.652313-2-nathan@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220201205624.652313-1-nathan@kernel.org> References: <20220201205624.652313-1-nathan@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: bpf@iogearbox.net Currently, scripts/pahole-flags.sh has no formal maintainer. Add it to the BPF section so that patches to it can be properly reviewed and picked up. Signed-off-by: Nathan Chancellor --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 0d7883977e9b..0d422452c8ff 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3523,6 +3523,7 @@ F: net/sched/act_bpf.c F: net/sched/cls_bpf.c F: samples/bpf/ F: scripts/bpf_doc.py +F: scripts/pahole-flags.sh F: tools/bpf/ F: tools/lib/bpf/ F: tools/testing/selftests/bpf/ From patchwork Tue Feb 1 20:56:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 12732293 X-Patchwork-Delegate: bpf@iogearbox.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 916B3C433F5 for ; Tue, 1 Feb 2022 20:57:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242579AbiBAU5I (ORCPT ); Tue, 1 Feb 2022 15:57:08 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:58366 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242629AbiBAU5A (ORCPT ); Tue, 1 Feb 2022 15:57:00 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CC4E661758; Tue, 1 Feb 2022 20:56:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 93922C340ED; Tue, 1 Feb 2022 20:56:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643749019; bh=CwHDLZ6vHdCkuPxLcNdA4DZY55blACA3PpaAT6fvdR0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LPBCFS2iAC7DwE4t4GmDcNwo/6DQ20kEVsITV5Vk9ezupwTHTzkKtyShei1F1v218 1eL3dltEzwn5v/KbaSdZB2UG01bSTBnftZrZozBM4QofUdJTCHkFNoxMXJp0GyIVR9 epGGdgLbZqIjqmdNwzm5kcxNy3yeE+zu5Gl1V5w4aYhsilxHsaivMHl68paXE1xgxR KUifrK+Q8wmh4kudaJJh0sWqjbh+znE5G7xHtU7a4TAJ27hcgJGZHpa5Gp5BGK5z8i H0QU4OvNPjKeF9Mua90M+NoUBq74Heln09M2x902yQwgL1KK+ZwSaAHyJV6QgZfhnD Z9pGJr+/DPwcg== From: Nathan Chancellor To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko Cc: Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Nick Desaulniers , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Nathan Chancellor Subject: [PATCH bpf-next 2/5] kbuild: Add CONFIG_PAHOLE_VERSION Date: Tue, 1 Feb 2022 13:56:21 -0700 Message-Id: <20220201205624.652313-3-nathan@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220201205624.652313-1-nathan@kernel.org> References: <20220201205624.652313-1-nathan@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: bpf@iogearbox.net There are a few different places where pahole's version is turned into a three digit form with the exact same command. Move this command into scripts/pahole-version.sh to reduce the amount of duplication across the tree. Create CONFIG_PAHOLE_VERSION so the version code can be used in Kconfig to enable and disable configuration options based on the pahole version, which is already done in a couple of places. Signed-off-by: Nathan Chancellor --- MAINTAINERS | 1 + init/Kconfig | 4 ++++ scripts/pahole-version.sh | 13 +++++++++++++ 3 files changed, 18 insertions(+) create mode 100755 scripts/pahole-version.sh diff --git a/MAINTAINERS b/MAINTAINERS index 0d422452c8ff..d8a66d50f224 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3524,6 +3524,7 @@ F: net/sched/cls_bpf.c F: samples/bpf/ F: scripts/bpf_doc.py F: scripts/pahole-flags.sh +F: scripts/pahole-version.sh F: tools/bpf/ F: tools/lib/bpf/ F: tools/testing/selftests/bpf/ diff --git a/init/Kconfig b/init/Kconfig index e9119bf54b1f..7328d4f25370 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -86,6 +86,10 @@ config CC_HAS_ASM_INLINE config CC_HAS_NO_PROFILE_FN_ATTR def_bool $(success,echo '__attribute__((no_profile_instrument_function)) int x();' | $(CC) -x c - -c -o /dev/null -Werror) +config PAHOLE_VERSION + int + default $(shell,$(srctree)/scripts/pahole-version.sh $(PAHOLE)) + config CONSTRUCTORS bool diff --git a/scripts/pahole-version.sh b/scripts/pahole-version.sh new file mode 100755 index 000000000000..f8a32ab93ad1 --- /dev/null +++ b/scripts/pahole-version.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 +# +# Usage: $ ./pahole-version.sh pahole +# +# Prints pahole's version in a 3-digit form, such as 119 for v1.19. + +if [ ! -x "$(command -v "$@")" ]; then + echo 0 + exit 1 +fi + +"$@" --version | sed -E 's/v([0-9]+)\.([0-9]+)/\1\2/' From patchwork Tue Feb 1 20:56:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 12732294 X-Patchwork-Delegate: bpf@iogearbox.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03C7AC4332F for ; Tue, 1 Feb 2022 20:57:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242568AbiBAU5K (ORCPT ); Tue, 1 Feb 2022 15:57:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242655AbiBAU5F (ORCPT ); Tue, 1 Feb 2022 15:57:05 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8E44C061751; Tue, 1 Feb 2022 12:57:03 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9134861757; Tue, 1 Feb 2022 20:57:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 55FBFC340EB; Tue, 1 Feb 2022 20:57:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643749023; bh=V2UwD0MzRLDnF0+Omw6xViGV0ZfyIdZvB/8JfsHk8RI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mEdi5W0pu1xy3fSUhyc2k3oSBbX2/wku68zWw5kuze4gOkoLboNP+Nywp8Rpg/Tvs paQ4JrmqnLN+Le1A/PPYrT6fWQ7/RvZlUwbRBWce7Z7JT4QaHNY+4QcXtv6+KJZDmK ry4Ot3PPu8LVWLJRSA6X1vNqw0dciDri0ExKQXrtN15toUnPdpKA8ybVJbtZT2UTMU 67mghFuM8iyIEQg/xZt9IJuVXq61zIpX7xXa15a3eBl5OyJ3XoEXeliY70Gju3B7fV ofUijaBPYkiIQQz6Fzqvr3oh6A8WSsmwfdh/IUqQpSYVrozAp5xNYEAzKzDtKB39iU zOmbLZe9gIkcQ== From: Nathan Chancellor To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko Cc: Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Nick Desaulniers , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Nathan Chancellor Subject: [PATCH bpf-next 3/5] scripts/pahole-flags.sh: Use pahole-version.sh Date: Tue, 1 Feb 2022 13:56:22 -0700 Message-Id: <20220201205624.652313-4-nathan@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220201205624.652313-1-nathan@kernel.org> References: <20220201205624.652313-1-nathan@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: bpf@iogearbox.net Use pahole-version.sh to get pahole's version code to reduce the amount of duplication across the tree. Signed-off-by: Nathan Chancellor --- scripts/pahole-flags.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pahole-flags.sh b/scripts/pahole-flags.sh index e6093adf4c06..c293941612e7 100755 --- a/scripts/pahole-flags.sh +++ b/scripts/pahole-flags.sh @@ -7,7 +7,7 @@ if ! [ -x "$(command -v ${PAHOLE})" ]; then exit 0 fi -pahole_ver=$(${PAHOLE} --version | sed -E 's/v([0-9]+)\.([0-9]+)/\1\2/') +pahole_ver=$($(dirname $0)/pahole-version.sh ${PAHOLE}) if [ "${pahole_ver}" -ge "118" ] && [ "${pahole_ver}" -le "121" ]; then # pahole 1.18 through 1.21 can't handle zero-sized per-CPU vars From patchwork Tue Feb 1 20:56:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 12732295 X-Patchwork-Delegate: bpf@iogearbox.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 767E9C43217 for ; Tue, 1 Feb 2022 20:57:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242620AbiBAU5L (ORCPT ); Tue, 1 Feb 2022 15:57:11 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:54914 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242628AbiBAU5K (ORCPT ); Tue, 1 Feb 2022 15:57:10 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 378F3B82F92; Tue, 1 Feb 2022 20:57:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3BC79C340F0; Tue, 1 Feb 2022 20:57:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643749026; bh=CjKRajP1hyPG6GHtEcC8S1cRRiUsFDVkufEo2oeRcYE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GHhT8p9EI3H/jMYWEdBQhX57o8+L+vIC3+tLN4xs6ZNWLxeJKKUB05GTm3uPyKZJP n+1HQRKXDjX88fiYj9VEC1k7DxhEFOBPiveXCGnh7QWajpO8gdfbTdFdZTR9DERIZ9 pKcGOkI5jhSUqUulKJjjhkEBOxqo5TVQQx0Iz3k6KELSay+iCNX+4K7B33Tlcxjy93 afxH0sb7C88bZioAMSRlSCT2D+TsilmQQw4MQfy8OJKw5eLQ2d1TChcRATvmZJ+3o/ UBo29e/0n6vyImBfvW0YptV1u6izC8zLkHsj0DWCYL7JnskXjvERbE/PVIC6ufl01T /Q1aiZ0bGchMQ== From: Nathan Chancellor To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko Cc: Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Nick Desaulniers , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Nathan Chancellor Subject: [PATCH bpf-next 4/5] lib/Kconfig.debug: Use CONFIG_PAHOLE_VERSION Date: Tue, 1 Feb 2022 13:56:23 -0700 Message-Id: <20220201205624.652313-5-nathan@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220201205624.652313-1-nathan@kernel.org> References: <20220201205624.652313-1-nathan@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: bpf@iogearbox.net Now that CONFIG_PAHOLE_VERSION exists, use it in the definition of CONFIG_PAHOLE_HAS_SPLIT_BTF and CONFIG_PAHOLE_HAS_BTF_TAG to reduce the amount of duplication across the tree. Signed-off-by: Nathan Chancellor --- lib/Kconfig.debug | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 6159859769fa..bd487d480902 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -323,10 +323,10 @@ config DEBUG_INFO_BTF DWARF type info into equivalent deduplicated BTF type info. config PAHOLE_HAS_SPLIT_BTF - def_bool $(success, test `$(PAHOLE) --version | sed -E 's/v([0-9]+)\.([0-9]+)/\1\2/'` -ge "119") + def_bool PAHOLE_VERSION >= 119 config PAHOLE_HAS_BTF_TAG - def_bool $(success, test `$(PAHOLE) --version | sed -E 's/v([0-9]+)\.([0-9]+)/\1\2/'` -ge "123") + def_bool PAHOLE_VERSION >= 123 depends on CC_IS_CLANG help Decide whether pahole emits btf_tag attributes (btf_type_tag and From patchwork Tue Feb 1 20:56:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 12732296 X-Patchwork-Delegate: bpf@iogearbox.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D18D9C4167B for ; Tue, 1 Feb 2022 20:57:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242659AbiBAU5M (ORCPT ); Tue, 1 Feb 2022 15:57:12 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:58506 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241127AbiBAU5L (ORCPT ); Tue, 1 Feb 2022 15:57:11 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 36C1561756; Tue, 1 Feb 2022 20:57:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03855C340ED; Tue, 1 Feb 2022 20:57:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643749030; bh=QXd5q+7zbc3jx1Mm3Y3j3sEp6a7kDTxU4zMgI1M/2kk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PRveCCTFfiTH8rbyrskvMn7zEKvijdY2AWxXS8Oa0tcVHJl7jkEh4CftPLCtfL33H 509+ho2uYbQttMIcdNcZ8pWKHdnBQc5NC+E1XXTcG3m1z+aQemyE7WRJ+4Y21LEeAh yJx3YcLpcmS+k+sHDkazhBTz80lCJ02l0a/eQ84VsRdVXzMtkblhyOVaNJG+EUaA+g Q8567O1/cFJVLH5kCu6alN86VTReQ2XCscOuy64FJR4I2tdUPiyOzjXea6JK4vQQ8T 6RWZWTXDGkPQY2CP3EZ91XxgusRAwc8SQm0BHyemWHkrx+ChCTXnw0FuR+YEzeT9xe pNliHc4SyE9vw== From: Nathan Chancellor To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko Cc: Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Nick Desaulniers , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Nathan Chancellor Subject: [PATCH bpf-next 5/5] lib/Kconfig.debug: Allow BTF + DWARF5 with pahole 1.21+ Date: Tue, 1 Feb 2022 13:56:24 -0700 Message-Id: <20220201205624.652313-6-nathan@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220201205624.652313-1-nathan@kernel.org> References: <20220201205624.652313-1-nathan@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: bpf@iogearbox.net 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 --- lib/Kconfig.debug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index bd487d480902..1555da672275 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -296,7 +296,7 @@ config DEBUG_INFO_DWARF4 config DEBUG_INFO_DWARF5 bool "Generate DWARF Version 5 debuginfo" depends on !CC_IS_CLANG || (CC_IS_CLANG && (AS_IS_LLVM || (AS_IS_GNU && AS_VERSION >= 23502))) - 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