package/libtracefs: needs threads

libtracefs needs threads resulting in the following build failure since
its addition in commit b1dbd3f679:

In file included from /home/autobuild/autobuild/instance-2/output-1/host/xtensa-buildroot-linux-uclibc/sysroot/usr/include/stdio.h:27,
                 from ../src/tracefs-instance.c:10:
/home/autobuild/autobuild/instance-2/output-1/host/xtensa-buildroot-linux-uclibc/sysroot/usr/include/features.h:218:5: warning: #warning requested reentrant code, but thread support was disabled [-Wcpp]
  218 | #   warning requested reentrant code, but thread support was disabled
      |     ^~~~~~~
../src/tracefs-instance.c:20:10: fatal error: pthread.h: No such file or directory
   20 | #include <pthread.h>
      |          ^~~~~~~~~~~

Fixes:
 - http://autobuild.buildroot.org/results/e0a8dd0781a1d1824a4cb78f47dcff4055083959

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Fabrice Fontaine
2024-01-16 22:44:27 +01:00
committed by Thomas Petazzoni
parent 8fb5209885
commit d5524c0065
3 changed files with 10 additions and 6 deletions

View File

@@ -1,5 +1,6 @@
config BR2_PACKAGE_LIBTRACEFS config BR2_PACKAGE_LIBTRACEFS
bool "libtracefs" bool "libtracefs"
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on !BR2_STATIC_LIBS # libtraceevent depends on !BR2_STATIC_LIBS # libtraceevent
select BR2_PACKAGE_LIBTRACEEVENT select BR2_PACKAGE_LIBTRACEEVENT
help help
@@ -8,5 +9,5 @@ config BR2_PACKAGE_LIBTRACEFS
https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/ https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/
comment "libtracefs needs a toolchain w/ dynamic library" comment "libtracefs needs a toolchain w/ threads, dynamic library"
depends on BR2_STATIC_LIBS depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS

View File

@@ -104,6 +104,7 @@ endif
config BR2_PACKAGE_LINUX_TOOLS_RTLA config BR2_PACKAGE_LINUX_TOOLS_RTLA
bool "rtla" bool "rtla"
depends on BR2_TOOLCHAIN_HAS_THREADS # libtracefs
depends on !BR2_STATIC_LIBS # libtracefs depends on !BR2_STATIC_LIBS # libtracefs
select BR2_PACKAGE_LINUX_TOOLS select BR2_PACKAGE_LINUX_TOOLS
select BR2_PACKAGE_LIBTRACEFS select BR2_PACKAGE_LIBTRACEFS
@@ -124,8 +125,8 @@ config BR2_PACKAGE_LINUX_TOOLS_RTLA
not available in Buildroot, so only rtla in kernels 5.19 not available in Buildroot, so only rtla in kernels 5.19
onwards is actually supported in Buildroot. onwards is actually supported in Buildroot.
comment "rtla needs a toolchain w/ dynamic library" comment "rtla needs a toolchain w/ threads, dynamic library"
depends on BR2_STATIC_LIBS depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
config BR2_PACKAGE_LINUX_TOOLS_SELFTESTS config BR2_PACKAGE_LINUX_TOOLS_SELFTESTS
bool"selftests" bool"selftests"

View File

@@ -4,6 +4,7 @@ config BR2_PACKAGE_TRACE_CMD
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
depends on BR2_USE_MMU # fork() depends on BR2_USE_MMU # fork()
depends on !BR2_STATIC_LIBS # dlopen() depends on !BR2_STATIC_LIBS # dlopen()
depends on BR2_TOOLCHAIN_HAS_THREADS # libtracefs
select BR2_PACKAGE_LIBTRACEEVENT select BR2_PACKAGE_LIBTRACEEVENT
select BR2_PACKAGE_LIBTRACEFS select BR2_PACKAGE_LIBTRACEFS
help help
@@ -16,6 +17,7 @@ config BR2_PACKAGE_TRACE_CMD
http://git.kernel.org/cgit/linux/kernel/git/rostedt/trace-cmd.git http://git.kernel.org/cgit/linux/kernel/git/rostedt/trace-cmd.git
comment "trace-cmd needs a toolchain w/ NPTL, dynamic library" comment "trace-cmd needs a toolchain w/ threads, NPTL, dynamic library"
depends on BR2_USE_MMU depends on BR2_USE_MMU
depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS depends on !BR2_TOOLCHAIN_HAS_THREADS || \
!BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS