[Buildroot] [git commit branch/next] package/linux-tools: perf needs threads

Thomas Petazzoni thomas.petazzoni at bootlin.com
Mon Feb 20 20:52:06 UTC 2023


commit: https://git.buildroot.net/buildroot/commit/?id=958c166837a484e2a9515342c49e93dca734d726
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/next

Fix the following build failure raised (at least) since linux 4.0 and
https://github.com/torvalds/linux/commit/459a3df76c99124fd222586be7f10f862547e7a9:

  CC      /home/autobuild/autobuild/instance-2/output-1/build/linux-6.0.1/tools/perf/builtin-bench.o
In file included from builtin-bench.c:22:
bench/bench.h:66:10: fatal error: pthread.h: No such file or directory
   66 | #include <pthread.h>
      |          ^~~~~~~~~~~

Fies:
 - http://autobuild.buildroot.org/results/b6abd641f528101e74f9af33e54ccefe0731148f

Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
---
 package/linux-tools/Config.in | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/package/linux-tools/Config.in b/package/linux-tools/Config.in
index 82e62f826e..8a0b6d5802 100644
--- a/package/linux-tools/Config.in
+++ b/package/linux-tools/Config.in
@@ -47,14 +47,15 @@ config BR2_PACKAGE_LINUX_TOOLS_PCI
 
 	  These tools are available only from kernel version 4.20.
 
-comment "perf needs a toolchain w/ dynamic library"
+comment "perf needs a toolchain w/ dynamic library, threads"
 	depends on BR2_TOOLCHAIN_HAS_SYNC_4
-	depends on BR2_STATIC_LIBS
+	depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS
 
 config BR2_PACKAGE_LINUX_TOOLS_PERF
 	bool "perf"
 	depends on BR2_TOOLCHAIN_HAS_SYNC_4
 	depends on !BR2_STATIC_LIBS # dlfcn.h
+	depends on BR2_TOOLCHAIN_HAS_THREADS
 	select BR2_PACKAGE_LINUX_TOOLS
 	help
 	  perf (sometimes "Perf Events" or perf tools, originally



More information about the buildroot mailing list