* [Buildroot] [PATCH 1/1] linux: fix pahole discovery when BR2_LINUX_KERNEL_NEEDS_HOST_PAHOLE
@ 2026-09-18 12:33 Florian Larysch
2026-10-03 16:31 ` Thomas Petazzoni via buildroot
2026-10-10 9:23 ` Thomas Perale via buildroot
0 siblings, 2 replies; 3+ messages in thread
From: Florian Larysch @ 2026-09-18 12:33 UTC (permalink / raw)
To: buildroot; +Cc: Florian Larysch
Around Linux 5.11, upstream started introducing checks that execute
"pahole --version" for feature discovery (e.g. [1]).
However, when building with BR2_LINUX_KERNEL_NEEDS_HOST_PAHOLE Buildroot
only lists host-pahole in LINUX_DEPENDENCIES, so it isn't available for
the configure step when using BR2_PER_PACKAGE_DIRECTORIES. This results
in the host pahole being used (resulting in host-dependent behavior), or
no pahole being detected at all when the build host doesn't have it
(which will then disable Kconfig options that require it).
Fix this by adding host-pahole to LINUX_KCONFIG_DEPENDENCIES.
A similar issue occurs when running "make linux-menuconfig" and friends
because PATH deliberately gets stripped when pkg-kconfig.mk builds
x_CONFIGURATOR_MAKE_ENV. Explicitly pass the pahole path to fix this.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=5f9ae91f7c0dbbc4195e2a6c8eedcaeb5b9e4cbb
Signed-off-by: Florian Larysch <fl@n621.de>
---
linux/linux.mk | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/linux/linux.mk b/linux/linux.mk
index 3599a10b50..cd80904113 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -125,6 +125,7 @@ endif
ifeq ($(BR2_LINUX_KERNEL_NEEDS_HOST_PAHOLE),y)
LINUX_DEPENDENCIES += host-pahole
+LINUX_KCONFIG_DEPENDENCIES += host-pahole
else
define LINUX_FIXUP_CONFIG_PAHOLE_CHECK
$(Q)if grep -q "^CONFIG_DEBUG_INFO_BTF=y" $(KCONFIG_DOT_CONFIG); then \
@@ -387,6 +388,9 @@ LINUX_KCONFIG_EDITORS = menuconfig xconfig gconfig nconfig
# therefore host-ccache would be ready, we use HOSTCC_NOCCACHE for
# consistency with other kconfig packages.
LINUX_KCONFIG_OPTS = $(LINUX_MAKE_FLAGS) HOSTCC="$(HOSTCC_NOCCACHE)"
+ifeq ($(BR2_LINUX_KERNEL_NEEDS_HOST_PAHOLE),y)
+LINUX_KCONFIG_OPTS += PAHOLE="$(HOST_DIR)/bin/pahole"
+endif
# If no package has yet set it, set it from the Kconfig option
LINUX_NEEDS_MODULES ?= $(BR2_LINUX_NEEDS_MODULES)
--
2.55.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] linux: fix pahole discovery when BR2_LINUX_KERNEL_NEEDS_HOST_PAHOLE
2026-09-18 12:33 [Buildroot] [PATCH 1/1] linux: fix pahole discovery when BR2_LINUX_KERNEL_NEEDS_HOST_PAHOLE Florian Larysch
@ 2026-10-03 16:31 ` Thomas Petazzoni via buildroot
2026-10-10 9:23 ` Thomas Perale via buildroot
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-10-03 16:31 UTC (permalink / raw)
To: Florian Larysch; +Cc: buildroot
On Fri, Sep 18, 2026 at 02:33:37PM +0200, Florian Larysch wrote:
> Around Linux 5.11, upstream started introducing checks that execute
> "pahole --version" for feature discovery (e.g. [1]).
>
> However, when building with BR2_LINUX_KERNEL_NEEDS_HOST_PAHOLE Buildroot
> only lists host-pahole in LINUX_DEPENDENCIES, so it isn't available for
> the configure step when using BR2_PER_PACKAGE_DIRECTORIES. This results
> in the host pahole being used (resulting in host-dependent behavior), or
> no pahole being detected at all when the build host doesn't have it
> (which will then disable Kconfig options that require it).
>
> Fix this by adding host-pahole to LINUX_KCONFIG_DEPENDENCIES.
>
> A similar issue occurs when running "make linux-menuconfig" and friends
> because PATH deliberately gets stripped when pkg-kconfig.mk builds
> x_CONFIGURATOR_MAKE_ENV. Explicitly pass the pahole path to fix this.
>
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=5f9ae91f7c0dbbc4195e2a6c8eedcaeb5b9e4cbb
>
> Signed-off-by: Florian Larysch <fl@n621.de>
Applied to master, thanks!
Best regards,
Thomas Petazzoni
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] linux: fix pahole discovery when BR2_LINUX_KERNEL_NEEDS_HOST_PAHOLE
2026-09-18 12:33 [Buildroot] [PATCH 1/1] linux: fix pahole discovery when BR2_LINUX_KERNEL_NEEDS_HOST_PAHOLE Florian Larysch
2026-10-03 16:31 ` Thomas Petazzoni via buildroot
@ 2026-10-10 9:23 ` Thomas Perale via buildroot
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Perale via buildroot @ 2026-10-10 9:23 UTC (permalink / raw)
To: Florian Larysch; +Cc: Thomas Perale, buildroot
In reply of:
> Around Linux 5.11, upstream started introducing checks that execute
> "pahole --version" for feature discovery (e.g. [1]).
>
> However, when building with BR2_LINUX_KERNEL_NEEDS_HOST_PAHOLE Buildroot
> only lists host-pahole in LINUX_DEPENDENCIES, so it isn't available for
> the configure step when using BR2_PER_PACKAGE_DIRECTORIES. This results
> in the host pahole being used (resulting in host-dependent behavior), or
> no pahole being detected at all when the build host doesn't have it
> (which will then disable Kconfig options that require it).
>
> Fix this by adding host-pahole to LINUX_KCONFIG_DEPENDENCIES.
>
> A similar issue occurs when running "make linux-menuconfig" and friends
> because PATH deliberately gets stripped when pkg-kconfig.mk builds
> x_CONFIGURATOR_MAKE_ENV. Explicitly pass the pahole path to fix this.
>
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=5f9ae91f7c0dbbc4195e2a6c8eedcaeb5b9e4cbb
>
> Signed-off-by: Florian Larysch <fl@n621.de>
Applied to 2025.02.x & 2026.08.x. Thanks
> ---
> linux/linux.mk | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/linux/linux.mk b/linux/linux.mk
> index 3599a10b50..cd80904113 100644
> --- a/linux/linux.mk
> +++ b/linux/linux.mk
> @@ -125,6 +125,7 @@ endif
>
> ifeq ($(BR2_LINUX_KERNEL_NEEDS_HOST_PAHOLE),y)
> LINUX_DEPENDENCIES += host-pahole
> +LINUX_KCONFIG_DEPENDENCIES += host-pahole
> else
> define LINUX_FIXUP_CONFIG_PAHOLE_CHECK
> $(Q)if grep -q "^CONFIG_DEBUG_INFO_BTF=y" $(KCONFIG_DOT_CONFIG); then \
> @@ -387,6 +388,9 @@ LINUX_KCONFIG_EDITORS = menuconfig xconfig gconfig nconfig
> # therefore host-ccache would be ready, we use HOSTCC_NOCCACHE for
> # consistency with other kconfig packages.
> LINUX_KCONFIG_OPTS = $(LINUX_MAKE_FLAGS) HOSTCC="$(HOSTCC_NOCCACHE)"
> +ifeq ($(BR2_LINUX_KERNEL_NEEDS_HOST_PAHOLE),y)
> +LINUX_KCONFIG_OPTS += PAHOLE="$(HOST_DIR)/bin/pahole"
> +endif
>
> # If no package has yet set it, set it from the Kconfig option
> LINUX_NEEDS_MODULES ?= $(BR2_LINUX_NEEDS_MODULES)
> --
> 2.55.0
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-10-10 9:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-18 12:33 [Buildroot] [PATCH 1/1] linux: fix pahole discovery when BR2_LINUX_KERNEL_NEEDS_HOST_PAHOLE Florian Larysch
2026-10-03 16:31 ` Thomas Petazzoni via buildroot
2026-10-10 9:23 ` Thomas Perale via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox