Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v1 0/1] pahole for kconfig
@ 2026-07-20 21:22 thilo zirnstein
  2026-07-20 21:22 ` [Buildroot] [PATCH v1 1/1] linux: add host-pahole to linux make flags thilo zirnstein
  0 siblings, 1 reply; 2+ messages in thread
From: thilo zirnstein @ 2026-07-20 21:22 UTC (permalink / raw)
  To: buildroot; +Cc: thilo zirnstein

Hi all, 

I recently noticed that I could not enable the CONFIG_DEBUG_INFO_BTF option, 
even if I enable the BR2_LINUX_KERNEL_NEEDS_HOST_PAHOLE option. 

The pahole was built prior to linux but not recognized when running make linux-menuconfig. 
I dug a bit and the problem seems to be: 

The environment for building the configuration editor is quite limited. 
Refer $(2)_CONFIGURATOR_MAKE_ENV
It explicitly clears the PATH variable.
The same environment is used to run the configuration editor. 

In this environment the pahole version cannot be determined (It does not exist)
The PAHOLE_VERSION is set to 0. 
The pahole is a dependence of some configurations (CONFIG_DEBUG_INFO_BTF), which cannot be enabled :/ 

Now the fun part :) 
If you read back the .config file after running menuconfig the pahole version is resolved. 
This is due to the fact that the pkg-kconfig.mk does some magic after calling $$($(2)_DIR)/.kconfig_editor_%. 
It runs a bunch of fixups, defined as $$($(2)_FIXUP_DOT_CONFIG), these fixups will run kconfig-package-regen-dot-config, 
which creates a oldconfig with a different environment. 
Now the path to host/bin/pahole is set and the pahole version is resolved.

Nevertheless, it is an issue that the pahole version is not correct when running menuconfig.
A user never can enable the CONFIG_DEBUG_INFO_BTF option, even if he enabled the BR2_LINUX_KERNEL_NEEDS_HOST_PAHOLE option.

My fix: 

I resolved the issue by adding the pahole path explicitly to the linux make flags.

Thank you for maintaining buildroot and best regards,

thilo zirnstein (1):
  linux: add host-pahole to linux make flags

 linux/linux.mk | 1 +
 1 file changed, 1 insertion(+)

-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-07-20 21:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-20 21:22 [Buildroot] [PATCH v1 0/1] pahole for kconfig thilo zirnstein
2026-07-20 21:22 ` [Buildroot] [PATCH v1 1/1] linux: add host-pahole to linux make flags thilo zirnstein

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox