summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/clang-layer/recipes-core
diff options
context:
space:
mode:
Diffstat (limited to 'dynamic-layers/clang-layer/recipes-core')
-rw-r--r--dynamic-layers/clang-layer/recipes-core/dnn/onednn_2.6.3.bb (renamed from dynamic-layers/clang-layer/recipes-core/dnn/onednn_2.6.1.bb)2
-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/0001-Produce-position-independent-code-for-testing.patch42
-rw-r--r--dynamic-layers/clang-layer/recipes-core/ispc/ispc_1.17.0.bb10
4 files changed, 88 insertions, 3 deletions
diff --git a/dynamic-layers/clang-layer/recipes-core/dnn/onednn_2.6.1.bb b/dynamic-layers/clang-layer/recipes-core/dnn/onednn_2.6.3.bb
index ee39f51b..f7ec5f61 100644
--- a/dynamic-layers/clang-layer/recipes-core/dnn/onednn_2.6.1.bb
+++ b/dynamic-layers/clang-layer/recipes-core/dnn/onednn_2.6.3.bb
@@ -13,7 +13,7 @@ SECTION = "lib"
13inherit pkgconfig cmake ptest 13inherit pkgconfig cmake ptest
14 14
15S = "${WORKDIR}/git" 15S = "${WORKDIR}/git"
16SRCREV = "58be3660fb57c4c4a3d306730e849237d1271572" 16SRCREV = "92ac40077b3b5816c7b78cdf39a988599929f0e9"
17SRC_URI = "git://github.com/oneapi-src/oneDNN.git;branch=rls-v2.6;protocol=https \ 17SRC_URI = "git://github.com/oneapi-src/oneDNN.git;branch=rls-v2.6;protocol=https \
18 file://run-ptest \ 18 file://run-ptest \
19 " 19 "
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/0001-Produce-position-independent-code-for-testing.patch b/dynamic-layers/clang-layer/recipes-core/ispc/ispc/0001-Produce-position-independent-code-for-testing.patch
new file mode 100644
index 00000000..37dbd862
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-core/ispc/ispc/0001-Produce-position-independent-code-for-testing.patch
@@ -0,0 +1,42 @@
1From 14cfd056fe69dc652f824f31462033e82cd54513 Mon Sep 17 00:00:00 2001
2From: Arina Neshlyaeva <arina.neshlyaeva@intel.com>
3Date: Tue, 23 Aug 2022 15:26:21 -0700
4Subject: [PATCH] Produce position independent code for testing
5
6Upstream-Status: Backport [https://github.com/ispc/ispc/commit/522a7395d762c7f2a3b1f76c6f352b5e5977f08a]
7
8Signed-off-by: Arina Neshlyaeva <arina.neshlyaeva@intel.com>
9Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
10---
11 run_tests.py | 8 ++++++--
12 1 file changed, 6 insertions(+), 2 deletions(-)
13
14diff --git a/run_tests.py b/run_tests.py
15index d4a40978..3520d376 100755
16--- a/run_tests.py
17+++ b/run_tests.py
18@@ -515,6 +515,11 @@ def run_test(testname, host, target):
19 cc_cmd = "%s -O2 -I. %s test_static.cpp -DTEST_SIG=%d -DTEST_WIDTH=%d %s -o %s" % \
20 (options.compiler_exe, gcc_arch, match, width, obj_name, exe_name)
21
22+ # Produce position independent code for both c++ and ispc compilations.
23+ # The motivation for this is that Clang 15 changed default
24+ # from "-mrelocation-model static" to "-mrelocation-model pic", so
25+ # we enable PIC compilation to have it consistently regardless compiler version.
26+ cc_cmd += ' -fPIE'
27 if should_fail:
28 cc_cmd += " -DEXPECT_FAILURE"
29
30@@ -526,8 +531,7 @@ def run_test(testname, host, target):
31 match, width, exe_name)
32 exe_name = "./" + exe_name
33 cc_cmd += " -DTEST_ZEBIN" if options.ispc_output == "ze" else " -DTEST_SPV"
34-
35- ispc_cmd = ispc_exe_rel + " --woff %s -o %s --arch=%s --target=%s -DTEST_SIG=%d" % \
36+ ispc_cmd = ispc_exe_rel + " --pic --woff %s -o %s --arch=%s --target=%s -DTEST_SIG=%d" % \
37 (filename, obj_name, options.arch, xe_target if target.is_xe() else options.target, match)
38
39 if target.is_xe():
40--
412.37.3
42
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..c50d8ef3 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,15 @@ 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 \
19 file://0001-Produce-position-independent-code-for-testing.patch \
18 " 20 "
19SRCREV = "7ad8429369a4d5ced6b524fdfffe623939d8fe9a" 21SRCREV = "7ad8429369a4d5ced6b524fdfffe623939d8fe9a"
20 22
21COMPATIBLE_HOST = '(x86_64).*-linux' 23COMPATIBLE_HOST = '(x86_64).*-linux'
22 24
23DEPENDS += " clang-native bison-native " 25DEPENDS += " clang-native bison-native "
24RDEPENDS:${PN} += " clang-libllvm clang" 26DEPENDS:append:class-target = " clang"
25 27
26EXTRA_OECMAKE += " \ 28EXTRA_OECMAKE += " \
27 -DISPC_INCLUDE_TESTS=OFF \ 29 -DISPC_INCLUDE_TESTS=OFF \
@@ -34,7 +36,11 @@ EXTRA_OECMAKE += " \
34 -DISPC_WINDOWS_TARGET=OFF \ 36 -DISPC_WINDOWS_TARGET=OFF \
35 -DISPC_IOS_TARGET=OFF \ 37 -DISPC_IOS_TARGET=OFF \
36 -DISPC_PS4_TARGET=OFF \ 38 -DISPC_PS4_TARGET=OFF \
37 -DSYSROOT_DIR=${STAGING_DIR_NATIVE} \ 39 -DSYSROOT_DIR=${STAGING_DIR} \
40 -DCLANG_EXECUTABLE=${STAGING_BINDIR_NATIVE}/clang \
41 -DCLANGPP_EXECUTABLE=${STAGING_BINDIR_NATIVE}/clang++ \
42 -DLLVM_DIS_EXECUTABLE=${STAGING_BINDIR_NATIVE}/llvm-dis \
43 -DLLVM_AS_EXECUTABLE=${STAGING_BINDIR_NATIVE}/llvm-as \
38 " 44 "
39 45
40TOOLCHAIN = "clang" 46TOOLCHAIN = "clang"