2022-06-10 22:54:19 +02:00
|
|
|
From 2007edc683499d2e82772f84241b453bdf319372 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Bernd Kuhls <bernd.kuhls@t-online.de>
|
2022-07-29 19:59:44 +02:00
|
|
|
Date: Fri, 29 Jul 2022 19:51:39 +0200
|
2022-06-10 22:54:19 +02:00
|
|
|
Subject: [PATCH] Fix uClibc build
|
|
|
|
|
|
|
|
uClibc does not provide execinfo.h
|
|
|
|
|
|
|
|
Patch sent upstream: https://github.com/intel/media-driver/pull/1437
|
|
|
|
|
|
|
|
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
|
|
|
---
|
|
|
|
CMakeLists.txt | 6 ++++++
|
|
|
|
.../linux/common/os/osservice/mos_utilities_specific.cpp | 4 ++++
|
|
|
|
2 files changed, 10 insertions(+)
|
|
|
|
|
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2022-07-29 19:59:44 +02:00
|
|
|
index 053904748..4a3f0869e 100755
|
2022-06-10 22:54:19 +02:00
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
|
|
|
@@ -53,6 +53,12 @@ option (BUILD_CMRTLIB "Build and Install cmrtlib together with media driver" ON)
|
|
|
|
|
|
|
|
option (ENABLE_PRODUCTION_KMD "Enable Production KMD header files" OFF)
|
|
|
|
|
|
|
|
+include(CheckIncludeFileCXX)
|
|
|
|
+check_include_file_cxx("execinfo.h" HAVE_EXECINFO)
|
|
|
|
+if (HAVE_EXECINFO)
|
|
|
|
+ add_definitions(-DHAVE_EXECINFO)
|
|
|
|
+endif()
|
|
|
|
+
|
|
|
|
include(GNUInstallDirs)
|
|
|
|
|
|
|
|
if (BUILD_CMRTLIB AND NOT CMAKE_WDDM_LINUX)
|
|
|
|
diff --git a/media_softlet/linux/common/os/osservice/mos_utilities_specific.cpp b/media_softlet/linux/common/os/osservice/mos_utilities_specific.cpp
|
2022-07-29 19:59:44 +02:00
|
|
|
index bde216b83..120b02d55 100644
|
2022-06-10 22:54:19 +02:00
|
|
|
--- a/media_softlet/linux/common/os/osservice/mos_utilities_specific.cpp
|
|
|
|
+++ b/media_softlet/linux/common/os/osservice/mos_utilities_specific.cpp
|
2022-07-29 19:59:44 +02:00
|
|
|
@@ -34,7 +34,9 @@
|
2022-06-10 22:54:19 +02:00
|
|
|
#include <signal.h>
|
|
|
|
#include <unistd.h> // fork
|
|
|
|
#include <algorithm>
|
|
|
|
+#ifdef HAVE_EXECINFO
|
|
|
|
#include <execinfo.h> // backtrace
|
|
|
|
+#endif
|
2022-07-29 19:59:44 +02:00
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/stat.h> // fstat
|
|
|
|
#include <sys/ipc.h> // System V IPC
|
|
|
|
@@ -2473,6 +2475,7 @@ void MosUtilities::MosTraceEvent(
|
2022-06-10 22:54:19 +02:00
|
|
|
MOS_FreeMemory(pTraceBuf);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
+#ifdef HAVE_EXECINFO
|
|
|
|
if (m_mosTraceFilter & (1ULL << TR_KEY_CALL_STACK))
|
|
|
|
{
|
|
|
|
// reserve space for header and stack size field.
|
2022-07-29 19:59:44 +02:00
|
|
|
@@ -2492,6 +2495,7 @@ void MosUtilities::MosTraceEvent(
|
2022-06-10 22:54:19 +02:00
|
|
|
size_t ret = write(MosUtilitiesSpecificNext::m_mosTraceFd, traceBuf, nLen);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
+#endif
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
--
|
|
|
|
2.30.2
|
|
|
|
|