summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dynamic-layers/clang-layer/recipes-core/ispc/ispc/0001-CMakeLists.txt-allow-to-pick-llvm-config-from-usr-bi.patch37
-rw-r--r--dynamic-layers/clang-layer/recipes-core/ispc/ispc_1.17.0.bb9
2 files changed, 44 insertions, 2 deletions
diff --git a/dynamic-layers/clang-layer/recipes-core/ispc/ispc/0001-CMakeLists.txt-allow-to-pick-llvm-config-from-usr-bi.patch b/dynamic-layers/clang-layer/recipes-core/ispc/ispc/0001-CMakeLists.txt-allow-to-pick-llvm-config-from-usr-bi.patch
new file mode 100644
index 00000000..79e8e683
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-core/ispc/ispc/0001-CMakeLists.txt-allow-to-pick-llvm-config-from-usr-bi.patch
@@ -0,0 +1,37 @@
1From 51d248d3b470f3fa1cf2ed3f5742851091acb65f Mon Sep 17 00:00:00 2001
2From: Naveen Saini <naveen.kumar.saini@intel.com>
3Date: Fri, 12 May 2023 09:10:11 +0800
4Subject: [PATCH] CMakeLists.txt: allow to pick llvm-config from
5 usr/bin/crossscripts/
6
7ispc needs to invoke native llvm-config from target sysroot to list LLVM
8lib libraries. clang already provides crossscripts/llvm-config, which does
9the job.
10
11However, using LLVM_TOOLS_BINARY_DIR leads to wrong llvm-config being
12used. So remove it from search path for llvm-config.
13
14Upstream-Status: Inappropriate
15
16Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
17---
18 cmake/FindLLVM.cmake | 3 +--
19 1 file changed, 1 insertion(+), 2 deletions(-)
20
21diff --git a/cmake/FindLLVM.cmake b/cmake/FindLLVM.cmake
22index d0297d5d..90d9fed2 100644
23--- a/cmake/FindLLVM.cmake
24+++ b/cmake/FindLLVM.cmake
25@@ -41,8 +41,7 @@ find_package(LLVM REQUIRED CONFIG)
26 set(LLVM_VERSION "LLVM_${LLVM_VERSION_MAJOR}_${LLVM_VERSION_MINOR}")
27 message(STATUS "Found LLVM ${LLVM_VERSION}")
28
29-find_program(LLVM_CONFIG_EXECUTABLE NAMES llvm-config
30- PATHS ${LLVM_TOOLS_BINARY_DIR} PATH_SUFFIXES bin NO_DEFAULT_PATH)
31+find_program(LLVM_CONFIG_EXECUTABLE NAMES llvm-config)
32 if (NOT LLVM_CONFIG_EXECUTABLE)
33 message(FATAL_ERROR "Failed to find llvm-config")
34 endif()
35--
362.37.3
37
diff --git a/dynamic-layers/clang-layer/recipes-core/ispc/ispc_1.17.0.bb b/dynamic-layers/clang-layer/recipes-core/ispc/ispc_1.17.0.bb
index cfd8e5bc..b9b9ea50 100644
--- a/dynamic-layers/clang-layer/recipes-core/ispc/ispc_1.17.0.bb
+++ b/dynamic-layers/clang-layer/recipes-core/ispc/ispc_1.17.0.bb
@@ -15,13 +15,14 @@ SRC_URI = "git://github.com/ispc/ispc.git;protocol=https;branch=main \
15 file://0001-CMakeLists.txt-link-with-libclang-cpp-library-instea.patch \ 15 file://0001-CMakeLists.txt-link-with-libclang-cpp-library-instea.patch \
16 file://0002-cmake-don-t-build-for-32-bit-targets.patch \ 16 file://0002-cmake-don-t-build-for-32-bit-targets.patch \
17 file://0001-Enable-LLVM-15.0-support.patch \ 17 file://0001-Enable-LLVM-15.0-support.patch \
18 file://0001-CMakeLists.txt-allow-to-pick-llvm-config-from-usr-bi.patch \
18 " 19 "
19SRCREV = "7ad8429369a4d5ced6b524fdfffe623939d8fe9a" 20SRCREV = "7ad8429369a4d5ced6b524fdfffe623939d8fe9a"
20 21
21COMPATIBLE_HOST = '(x86_64).*-linux' 22COMPATIBLE_HOST = '(x86_64).*-linux'
22 23
23DEPENDS += " clang-native bison-native " 24DEPENDS += " clang-native bison-native "
24RDEPENDS:${PN} += " clang-libllvm clang" 25DEPENDS:append:class-target = " clang"
25 26
26EXTRA_OECMAKE += " \ 27EXTRA_OECMAKE += " \
27 -DISPC_INCLUDE_TESTS=OFF \ 28 -DISPC_INCLUDE_TESTS=OFF \
@@ -34,7 +35,11 @@ EXTRA_OECMAKE += " \
34 -DISPC_WINDOWS_TARGET=OFF \ 35 -DISPC_WINDOWS_TARGET=OFF \
35 -DISPC_IOS_TARGET=OFF \ 36 -DISPC_IOS_TARGET=OFF \
36 -DISPC_PS4_TARGET=OFF \ 37 -DISPC_PS4_TARGET=OFF \
37 -DSYSROOT_DIR=${STAGING_DIR_NATIVE} \ 38 -DSYSROOT_DIR=${STAGING_DIR} \
39 -DCLANG_EXECUTABLE=${STAGING_BINDIR_NATIVE}/clang \
40 -DCLANGPP_EXECUTABLE=${STAGING_BINDIR_NATIVE}/clang++ \
41 -DLLVM_DIS_EXECUTABLE=${STAGING_BINDIR_NATIVE}/llvm-dis \
42 -DLLVM_AS_EXECUTABLE=${STAGING_BINDIR_NATIVE}/llvm-as \
38 " 43 "
39 44
40TOOLCHAIN = "clang" 45TOOLCHAIN = "clang"