kumquat-buildroot/package/rpi-userland/0006-interface-vcos-pthreads-CMakeLists.txt-fix-build-wit.patch
Fabrice Fontaine dd524a6e96 package/rpi-userland: fix build without libexecinfo
Fix the following build failure without libexecinfo raised since commit
66d7d3bec3:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
EXECINFO_LIBRARY
    linked by target "vcos" in directory /home/buildroot/autobuild/run/instance-1/output-1/build/rpi-userland-14b90ff9d9f031391a299e6e006965d02bfd1bb1/interface/vcos/pthreads

Fixes:
 - http://autobuild.buildroot.org/results/0b4b20e4eed1ed5120f22d29fc24038f268e6cc6

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-07-23 21:29:18 +02:00

46 lines
1.7 KiB
Diff

From c8270cea98bcce0d22ddc8e2f86eae2c9989efd4 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Fri, 25 Feb 2022 19:21:06 +0100
Subject: [PATCH] interface/vcos/pthreads/CMakeLists.txt: fix build with
libexecinfo
interface/vcos/glibc/vcos_backtrace.c uses execinfo.h which can be
provided by libexecinfo on uclibc or musl so link with it if needed to
avoid the following build failure:
/home/peko/autobuild/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/10.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: ../../build/lib/libvcos.so: undefined reference to `backtrace_symbols'
Fixes:
- http://autobuild.buildroot.org/results/93d3b8cc2ac5dfa9d4b44946c0b4d8171e8f52a1
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Upstream status: https://github.com/raspberrypi/userland/pull/719]
---
interface/vcos/pthreads/CMakeLists.txt | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/interface/vcos/pthreads/CMakeLists.txt b/interface/vcos/pthreads/CMakeLists.txt
index 1d81ca3..100207f 100644
--- a/interface/vcos/pthreads/CMakeLists.txt
+++ b/interface/vcos/pthreads/CMakeLists.txt
@@ -33,12 +33,14 @@ set (SOURCES
../generic/vcos_generic_blockpool.c
)
+find_library (EXECINFO_LIBRARY execinfo)
+
if (VCOS_PTHREADS_BUILD_SHARED)
add_library (vcos SHARED ${SOURCES})
- target_link_libraries (vcos pthread dl rt)
+ target_link_libraries (vcos pthread dl rt $<$<BOOL:${EXECINFO_LIBRARY}>:${EXECINFO_LIBRARY}>)
else ()
add_library (vcos ${SOURCES})
- target_link_libraries (vcos pthread rt)
+ target_link_libraries (vcos pthread rt $<$<BOOL:${EXECINFO_LIBRARY}>:${EXECINFO_LIBRARY}>)
endif ()
--
2.35.1