kumquat-buildroot/package/intel-mediadriver/0002-Fix-build-with-libexecinfo.patch

44 lines
1.6 KiB
Diff
Raw Normal View History

From c5177d6fc64ad8bc25c8fbbe324e52744ef52e18 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Fri, 12 Aug 2022 09:50:33 +0200
Subject: [PATCH] Fix build with libexecinfo
Fix the following build failure with musl or uclibc-ng and libexecinfo:
/home/giuliobenetti/autobuild/run/instance-2/output-1/build/intel-mediadriver-22.5.1/media_softlet/linux/common/os/osservice/mos_utilities_specific.cpp:2481: undefined reference to `backtrace'
Fixes:
- http://autobuild.buildroot.org/results/3316e39c5113bb7600374eda45497a87c9ac9873
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Upstream status: https://github.com/intel/media-driver/pull/1470]
---
media_driver/media_top_cmake.cmake | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/media_driver/media_top_cmake.cmake b/media_driver/media_top_cmake.cmake
index 0e19a47c9..936d8c35a 100755
--- a/media_driver/media_top_cmake.cmake
+++ b/media_driver/media_top_cmake.cmake
@@ -271,10 +271,16 @@ set_target_properties(${LIB_NAME} PROPERTIES LINK_FLAGS ${MEDIA_LINK_FLAGS})
set_target_properties(${LIB_NAME} PROPERTIES PREFIX "")
set_target_properties(${LIB_NAME_STATIC} PROPERTIES PREFIX "")
+set(MEDIA_LINK_EXTERNAL_LIBS "${PKG_PCIACCESS_LIBRARIES} m pthread dl")
+find_package(Backtrace)
+if(Backtrace_FOUND)
+ set(MEDIA_LINK_EXTERNAL_LIBS "${MEDIA_LINK_EXTERNAL_LIBS} ${Backtrace_LIBRARY}")
+endif()
+
bs_ufo_link_libraries_noBsymbolic(
${LIB_NAME}
"${INCLUDED_LIBS}"
- "${PKG_PCIACCESS_LIBRARIES} m pthread dl"
+ "${MEDIA_LINK_EXTERNAL_LIBS}"
)
if (NOT DEFINED INCLUDED_LIBS OR "${INCLUDED_LIBS}" STREQUAL "")
--
2.35.1