mirror of
git://git.yoctoproject.org/meta-intel.git
synced 2025-07-19 21:09:03 +02:00
ispc: fix recipe
There are few problems in current recipe: (1) ispc needs to invoke native llvm-config from target sysroot to list LLVM lib libraries. clang already provides crossscripts/llvm-config, which does the job. However, using LLVM_TOOLS_BINARY_DIR leads to wrong llvm-config being used. So remove it from search path for llvm-config. (2) Error: ispc/1.17.0-r0/recipe-sysroot-native/usr/bin/x86_64-poky-linux/x86_64-poky-linux-ld: ispc/1.17.0-r0/recipe-sysroot-native/usr/lib/libclang-cpp.so: undefined reference to `std::condition_variable::wait(std::unique_lock<std::mutex>&)@GLIBCXX_3.4.30' error: linker command failed with exit code 1 (use -v to see invocation) Native libraries were being linked to target libraries leading to this failure. Fix and cleanup DEPENDS/RDEPENDS. Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
This commit is contained in:
parent
f709b3f2b0
commit
a19fda659a
|
@ -0,0 +1,37 @@
|
||||||
|
From 51d248d3b470f3fa1cf2ed3f5742851091acb65f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Naveen Saini <naveen.kumar.saini@intel.com>
|
||||||
|
Date: Fri, 12 May 2023 09:10:11 +0800
|
||||||
|
Subject: [PATCH] CMakeLists.txt: allow to pick llvm-config from
|
||||||
|
usr/bin/crossscripts/
|
||||||
|
|
||||||
|
ispc needs to invoke native llvm-config from target sysroot to list LLVM
|
||||||
|
lib libraries. clang already provides crossscripts/llvm-config, which does
|
||||||
|
the job.
|
||||||
|
|
||||||
|
However, using LLVM_TOOLS_BINARY_DIR leads to wrong llvm-config being
|
||||||
|
used. So remove it from search path for llvm-config.
|
||||||
|
|
||||||
|
Upstream-Status: Inappropriate
|
||||||
|
|
||||||
|
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
|
||||||
|
---
|
||||||
|
cmake/FindLLVM.cmake | 3 +--
|
||||||
|
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/cmake/FindLLVM.cmake b/cmake/FindLLVM.cmake
|
||||||
|
index d0297d5d..90d9fed2 100644
|
||||||
|
--- a/cmake/FindLLVM.cmake
|
||||||
|
+++ b/cmake/FindLLVM.cmake
|
||||||
|
@@ -41,8 +41,7 @@ find_package(LLVM REQUIRED CONFIG)
|
||||||
|
set(LLVM_VERSION "LLVM_${LLVM_VERSION_MAJOR}_${LLVM_VERSION_MINOR}")
|
||||||
|
message(STATUS "Found LLVM ${LLVM_VERSION}")
|
||||||
|
|
||||||
|
-find_program(LLVM_CONFIG_EXECUTABLE NAMES llvm-config
|
||||||
|
- PATHS ${LLVM_TOOLS_BINARY_DIR} PATH_SUFFIXES bin NO_DEFAULT_PATH)
|
||||||
|
+find_program(LLVM_CONFIG_EXECUTABLE NAMES llvm-config)
|
||||||
|
if (NOT LLVM_CONFIG_EXECUTABLE)
|
||||||
|
message(FATAL_ERROR "Failed to find llvm-config")
|
||||||
|
endif()
|
||||||
|
--
|
||||||
|
2.37.3
|
||||||
|
|
|
@ -15,13 +15,14 @@ SRC_URI = "git://github.com/ispc/ispc.git;protocol=https;branch=main \
|
||||||
file://0001-CMakeLists.txt-link-with-libclang-cpp-library-instea.patch \
|
file://0001-CMakeLists.txt-link-with-libclang-cpp-library-instea.patch \
|
||||||
file://0002-cmake-don-t-build-for-32-bit-targets.patch \
|
file://0002-cmake-don-t-build-for-32-bit-targets.patch \
|
||||||
file://0001-Enable-LLVM-15.0-support.patch \
|
file://0001-Enable-LLVM-15.0-support.patch \
|
||||||
|
file://0001-CMakeLists.txt-allow-to-pick-llvm-config-from-usr-bi.patch \
|
||||||
"
|
"
|
||||||
SRCREV = "7ad8429369a4d5ced6b524fdfffe623939d8fe9a"
|
SRCREV = "7ad8429369a4d5ced6b524fdfffe623939d8fe9a"
|
||||||
|
|
||||||
COMPATIBLE_HOST = '(x86_64).*-linux'
|
COMPATIBLE_HOST = '(x86_64).*-linux'
|
||||||
|
|
||||||
DEPENDS += " clang-native bison-native "
|
DEPENDS += " clang-native bison-native "
|
||||||
RDEPENDS:${PN} += " clang-libllvm clang"
|
DEPENDS:append:class-target = " clang"
|
||||||
|
|
||||||
EXTRA_OECMAKE += " \
|
EXTRA_OECMAKE += " \
|
||||||
-DISPC_INCLUDE_TESTS=OFF \
|
-DISPC_INCLUDE_TESTS=OFF \
|
||||||
|
@ -34,7 +35,11 @@ EXTRA_OECMAKE += " \
|
||||||
-DISPC_WINDOWS_TARGET=OFF \
|
-DISPC_WINDOWS_TARGET=OFF \
|
||||||
-DISPC_IOS_TARGET=OFF \
|
-DISPC_IOS_TARGET=OFF \
|
||||||
-DISPC_PS4_TARGET=OFF \
|
-DISPC_PS4_TARGET=OFF \
|
||||||
-DSYSROOT_DIR=${STAGING_DIR_NATIVE} \
|
-DSYSROOT_DIR=${STAGING_DIR} \
|
||||||
|
-DCLANG_EXECUTABLE=${STAGING_BINDIR_NATIVE}/clang \
|
||||||
|
-DCLANGPP_EXECUTABLE=${STAGING_BINDIR_NATIVE}/clang++ \
|
||||||
|
-DLLVM_DIS_EXECUTABLE=${STAGING_BINDIR_NATIVE}/llvm-dis \
|
||||||
|
-DLLVM_AS_EXECUTABLE=${STAGING_BINDIR_NATIVE}/llvm-as \
|
||||||
"
|
"
|
||||||
|
|
||||||
TOOLCHAIN = "clang"
|
TOOLCHAIN = "clang"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user