summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/clang-layer
diff options
context:
space:
mode:
Diffstat (limited to 'dynamic-layers/clang-layer')
-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-Fix-build-with-GCC-13-and-possibly-Clang-15.patch36
-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.bb11
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/0001-fix-add-missing-includes.patch157
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/0001-fix-add-missing-zero-initialization-in-StackVec-clas.patch25
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_22.31.23852.bb2
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-SPIRVutil-Include-cstdint-to-fix-GCC-13-build.patch29
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.11702.1.bb3
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0001-Fix-standalone-build-415.patch32
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0001-don-t-redefine-LLVM_TABLEGEN_EXE.patch32
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang.inc5
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_12.0.0.bb5
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_14.0.0.bb11
15 files changed, 385 insertions, 44 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-Fix-build-with-GCC-13-and-possibly-Clang-15.patch b/dynamic-layers/clang-layer/recipes-core/ispc/ispc/0001-Fix-build-with-GCC-13-and-possibly-Clang-15.patch
new file mode 100644
index 00000000..afe3c3ad
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-core/ispc/ispc/0001-Fix-build-with-GCC-13-and-possibly-Clang-15.patch
@@ -0,0 +1,36 @@
1From ffc75e464ff2b8fce7dbf74f1846ebd0852bc6f9 Mon Sep 17 00:00:00 2001
2From: Luya Tshimbalanga <luya@fedoraproject.org>
3Date: Tue, 28 Feb 2023 17:20:21 -0800
4Subject: [PATCH] Fix build with GCC 13 and possibly Clang 15
5
6This fix add missing <cstdint> include to handle "uint32_t".
7
8Upstream-Status: Backport [https://github.com/ispc/ispc/commit/ffc75e464ff2b8fce7dbf74f1846ebd0852bc6f9]
9
10Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com>
11---
12 src/target_registry.h | 3 ++-
13 1 file changed, 2 insertions(+), 1 deletion(-)
14
15diff --git a/src/target_registry.h b/src/target_registry.h
16index 2f7d13a8..bad4ed08 100644
17--- a/src/target_registry.h
18+++ b/src/target_registry.h
19@@ -1,5 +1,5 @@
20 /*
21- Copyright (c) 2019-2021, Intel Corporation
22+ Copyright (c) 2019-2023, Intel Corporation
23 All rights reserved.
24
25 Redistribution and use in source and binary forms, with or without
26@@ -40,6 +40,7 @@
27 #include "bitcode_lib.h"
28
29 #include <bitset>
30+#include <cstdint>
31 #include <map>
32 #include <vector>
33
34--
352.34.1
36
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..dd4841e7 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,16 @@ 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 \
20 file://0001-Fix-build-with-GCC-13-and-possibly-Clang-15.patch \
18 " 21 "
19SRCREV = "7ad8429369a4d5ced6b524fdfffe623939d8fe9a" 22SRCREV = "7ad8429369a4d5ced6b524fdfffe623939d8fe9a"
20 23
21COMPATIBLE_HOST = '(x86_64).*-linux' 24COMPATIBLE_HOST = '(x86_64).*-linux'
22 25
23DEPENDS += " clang-native bison-native " 26DEPENDS += " clang-native bison-native "
24RDEPENDS:${PN} += " clang-libllvm clang" 27DEPENDS:append:class-target = " clang"
25 28
26EXTRA_OECMAKE += " \ 29EXTRA_OECMAKE += " \
27 -DISPC_INCLUDE_TESTS=OFF \ 30 -DISPC_INCLUDE_TESTS=OFF \
@@ -34,7 +37,11 @@ EXTRA_OECMAKE += " \
34 -DISPC_WINDOWS_TARGET=OFF \ 37 -DISPC_WINDOWS_TARGET=OFF \
35 -DISPC_IOS_TARGET=OFF \ 38 -DISPC_IOS_TARGET=OFF \
36 -DISPC_PS4_TARGET=OFF \ 39 -DISPC_PS4_TARGET=OFF \
37 -DSYSROOT_DIR=${STAGING_DIR_NATIVE} \ 40 -DSYSROOT_DIR=${STAGING_DIR} \
41 -DCLANG_EXECUTABLE=${STAGING_BINDIR_NATIVE}/clang \
42 -DCLANGPP_EXECUTABLE=${STAGING_BINDIR_NATIVE}/clang++ \
43 -DLLVM_DIS_EXECUTABLE=${STAGING_BINDIR_NATIVE}/llvm-dis \
44 -DLLVM_AS_EXECUTABLE=${STAGING_BINDIR_NATIVE}/llvm-as \
38 " 45 "
39 46
40TOOLCHAIN = "clang" 47TOOLCHAIN = "clang"
diff --git a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/0001-fix-add-missing-includes.patch b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/0001-fix-add-missing-includes.patch
new file mode 100644
index 00000000..a008d69e
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/0001-fix-add-missing-includes.patch
@@ -0,0 +1,157 @@
1From 1517c8689cdaab9aaa1fa25e8db3b84f93e1f1ca Mon Sep 17 00:00:00 2001
2From: Mateusz Jablonski <mateusz.jablonski@intel.com>
3Date: Tue, 22 Aug 2023 12:37:37 +0200
4Subject: [PATCH] fix: add missing includes
5
6Upstream-Status: Pending
7Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com>
8---
9 level_zero/tools/source/sysman/linux/pmt/pmt_xml_offsets.h | 1 +
10 opencl/test/unit_test/built_ins/built_ins_file_names.h | 3 ++-
11 shared/source/compiler_interface/external_functions.h | 1 +
12 shared/source/os_interface/linux/drm_debug.h | 1 +
13 shared/source/os_interface/linux/pci_path.h | 3 ++-
14 shared/source/os_interface/linux/pmt_util.h | 1 +
15 shared/source/os_interface/print.h | 1 +
16 shared/source/tbx/tbx_sockets.h | 1 +
17 shared/source/tbx/tbx_sockets_imp.h | 1 +
18 third_party/aot_config_headers/platforms.h | 1 +
19 10 files changed, 12 insertions(+), 2 deletions(-)
20
21diff --git a/level_zero/tools/source/sysman/linux/pmt/pmt_xml_offsets.h b/level_zero/tools/source/sysman/linux/pmt/pmt_xml_offsets.h
22index 2bcfa0e6aa..2a30b0c6be 100644
23--- a/level_zero/tools/source/sysman/linux/pmt/pmt_xml_offsets.h
24+++ b/level_zero/tools/source/sysman/linux/pmt/pmt_xml_offsets.h
25@@ -7,6 +7,7 @@
26
27 #pragma once
28
29+#include <cstdint>
30 #include <map>
31 #include <string>
32
33diff --git a/opencl/test/unit_test/built_ins/built_ins_file_names.h b/opencl/test/unit_test/built_ins/built_ins_file_names.h
34index 08dc38d406..ca43ba0f26 100644
35--- a/opencl/test/unit_test/built_ins/built_ins_file_names.h
36+++ b/opencl/test/unit_test/built_ins/built_ins_file_names.h
37@@ -1,5 +1,5 @@
38 /*
39- * Copyright (C) 2020-2022 Intel Corporation
40+ * Copyright (C) 2020-2023 Intel Corporation
41 *
42 * SPDX-License-Identifier: MIT
43 *
44@@ -7,6 +7,7 @@
45
46 #pragma once
47
48+#include <cstdint>
49 #include <string>
50 #include <vector>
51
52diff --git a/shared/source/compiler_interface/external_functions.h b/shared/source/compiler_interface/external_functions.h
53index f4cd790489..d377bf3937 100644
54--- a/shared/source/compiler_interface/external_functions.h
55+++ b/shared/source/compiler_interface/external_functions.h
56@@ -9,6 +9,7 @@
57
58 #include "shared/source/utilities/arrayref.h"
59
60+#include <cstdint>
61 #include <string>
62 #include <unordered_map>
63 #include <vector>
64diff --git a/shared/source/os_interface/linux/drm_debug.h b/shared/source/os_interface/linux/drm_debug.h
65index a1a46fcd8e..bc56e407d9 100644
66--- a/shared/source/os_interface/linux/drm_debug.h
67+++ b/shared/source/os_interface/linux/drm_debug.h
68@@ -7,6 +7,7 @@
69
70 #pragma once
71
72+#include <cstdint>
73 #include <array>
74 #include <string>
75 #include <utility>
76diff --git a/shared/source/os_interface/linux/pci_path.h b/shared/source/os_interface/linux/pci_path.h
77index c72c1d65d0..4f95e5ba61 100644
78--- a/shared/source/os_interface/linux/pci_path.h
79+++ b/shared/source/os_interface/linux/pci_path.h
80@@ -7,6 +7,7 @@
81
82 #pragma once
83
84+#include <cstdint>
85 #include <optional>
86 #include <string>
87
88@@ -16,4 +17,4 @@ std::optional<std::string> getPciPath(int deviceFd);
89 std::optional<std::string> getPciLinkPath(int deviceFd);
90 std::optional<std::string> getPciRootPath(int deviceFd);
91
92-} // namespace NEO
93\ No newline at end of file
94+} // namespace NEO
95diff --git a/shared/source/os_interface/linux/pmt_util.h b/shared/source/os_interface/linux/pmt_util.h
96index 28ecad3f05..d85bf298ae 100644
97--- a/shared/source/os_interface/linux/pmt_util.h
98+++ b/shared/source/os_interface/linux/pmt_util.h
99@@ -7,6 +7,7 @@
100
101 #pragma once
102
103+#include <cstdint>
104 #include <map>
105 #include <poll.h>
106 #include <string>
107diff --git a/shared/source/os_interface/print.h b/shared/source/os_interface/print.h
108index 7cc214e6ec..ac967be44b 100644
109--- a/shared/source/os_interface/print.h
110+++ b/shared/source/os_interface/print.h
111@@ -7,6 +7,7 @@
112
113 #pragma once
114
115+#include <cstdint>
116 #include <cstddef>
117
118 void printToSTDOUT(const char *str);
119diff --git a/shared/source/tbx/tbx_sockets.h b/shared/source/tbx/tbx_sockets.h
120index 9b7f7863f0..2d4cf2ffbe 100644
121--- a/shared/source/tbx/tbx_sockets.h
122+++ b/shared/source/tbx/tbx_sockets.h
123@@ -6,6 +6,7 @@
124 */
125
126 #pragma once
127+#include <cstdint>
128 #include <string>
129
130 namespace NEO {
131diff --git a/shared/source/tbx/tbx_sockets_imp.h b/shared/source/tbx/tbx_sockets_imp.h
132index 738f26175b..4a567a8f64 100644
133--- a/shared/source/tbx/tbx_sockets_imp.h
134+++ b/shared/source/tbx/tbx_sockets_imp.h
135@@ -10,6 +10,7 @@
136
137 #include "os_socket.h"
138
139+#include <cstdint>
140 #include <iostream>
141
142 namespace NEO {
143diff --git a/third_party/aot_config_headers/platforms.h b/third_party/aot_config_headers/platforms.h
144index 05f75a40b3..35fb490a55 100644
145--- a/third_party/aot_config_headers/platforms.h
146+++ b/third_party/aot_config_headers/platforms.h
147@@ -7,6 +7,7 @@
148
149 #include <map>
150 #include <string>
151+#include <cstdint>
152
153 #pragma once
154
155--
1562.43.0
157
diff --git a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/0001-fix-add-missing-zero-initialization-in-StackVec-clas.patch b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/0001-fix-add-missing-zero-initialization-in-StackVec-clas.patch
new file mode 100644
index 00000000..4aed37b8
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/0001-fix-add-missing-zero-initialization-in-StackVec-clas.patch
@@ -0,0 +1,25 @@
1From 894bab05efb447d249c9f0afdbf0ca62c82395c6 Mon Sep 17 00:00:00 2001
2From: Mateusz Jablonski <mateusz.jablonski@intel.com>
3Date: Tue, 22 Aug 2023 10:55:50 +0000
4Subject: [PATCH] fix: add missing zero-initialization in StackVec class
5
6Upstream-Status: Backport [https://github.com/intel/compute-runtime/commit/894bab05efb447d249c9f0afdbf0ca62c82395c6]
7
8Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
9---
10 shared/source/utilities/stackvec.h | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13Index: git/shared/source/utilities/stackvec.h
14===================================================================
15--- git.orig/shared/source/utilities/stackvec.h
16+++ git/shared/source/utilities/stackvec.h
17@@ -431,7 +431,7 @@ class StackVec { // NOLINT(clang-analyze
18 DataType *onStackMem;
19 };
20
21- alignas(alignof(DataType)) char onStackMemRawBytes[sizeof(DataType[onStackCaps])];
22+ alignas(alignof(DataType)) char onStackMemRawBytes[sizeof(DataType[onStackCaps])]{};
23 SizeT onStackSize = 0U;
24 };
25
diff --git a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_22.31.23852.bb b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_22.31.23852.bb
index ebf69af2..bb471f00 100644
--- a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_22.31.23852.bb
+++ b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_22.31.23852.bb
@@ -9,6 +9,8 @@ LIC_FILES_CHKSUM = "file://LICENSE.md;md5=9280143b568466d8fbe385f838078b93 \
9 file://third_party/opencl_headers/LICENSE;md5=dcefc90f4c3c689ec0c2489064e7273b" 9 file://third_party/opencl_headers/LICENSE;md5=dcefc90f4c3c689ec0c2489064e7273b"
10 10
11SRC_URI = "git://github.com/intel/compute-runtime.git;protocol=https;branch=master \ 11SRC_URI = "git://github.com/intel/compute-runtime.git;protocol=https;branch=master \
12 file://0001-fix-add-missing-zero-initialization-in-StackVec-clas.patch \
13 file://0001-fix-add-missing-includes.patch \
12 " 14 "
13 15
14SRC_URI:append:class-target = "file://allow-to-find-cpp-generation-tool.patch \ 16SRC_URI:append:class-target = "file://allow-to-find-cpp-generation-tool.patch \
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-SPIRVutil-Include-cstdint-to-fix-GCC-13-build.patch b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-SPIRVutil-Include-cstdint-to-fix-GCC-13-build.patch
new file mode 100644
index 00000000..4b1078e1
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-SPIRVutil-Include-cstdint-to-fix-GCC-13-build.patch
@@ -0,0 +1,29 @@
1From 5ea17d8bcf3daa03ef95d0fed796f68cec7dc32d Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Franti=C5=A1ek=20Zatloukal?= <fzatlouk@redhat.com>
3Date: Wed, 18 Jan 2023 22:22:23 +0000
4Subject: [PATCH] SPIRVutil: Include cstdint to fix GCC 13 build
5
6SPIRVutil: Include cstdint to fix GCC 13 build
7
8Upstream-Status: Backport [https://github.com/intel-innersource/drivers.gpu.compiler.staging/commit/5ea17d8bcf3daa03ef95d0fed796f68cec7dc32d]
9
10Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com>
11---
12 IGC/AdaptorOCL/SPIRV/libSPIRV/SPIRVUtil.h | 1 +
13 1 file changed, 1 insertion(+)
14
15diff --git a/IGC/AdaptorOCL/SPIRV/libSPIRV/SPIRVUtil.h b/IGC/AdaptorOCL/SPIRV/libSPIRV/SPIRVUtil.h
16index 1076d5d42..9685e477f 100644
17--- a/IGC/AdaptorOCL/SPIRV/libSPIRV/SPIRVUtil.h
18+++ b/IGC/AdaptorOCL/SPIRV/libSPIRV/SPIRVUtil.h
19@@ -49,6 +49,7 @@ THE SOFTWARE.
20 #define SPIRVUTIL_H_
21
22 #include <algorithm>
23+#include <cstdint>
24 #include <functional>
25 #include <limits>
26 #include <map>
27--
282.34.1
29
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.11702.1.bb b/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.11702.1.bb
index 7a994ebe..b9119a12 100644
--- a/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.11702.1.bb
+++ b/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.11702.1.bb
@@ -11,9 +11,10 @@ LIC_FILES_CHKSUM = "file://IGC/BiFModule/Implementation/ExternalLibraries/libclc
11SRC_URI = "git://github.com/intel/intel-graphics-compiler.git;protocol=https;name=igc;branch=releases/igc-1.0.11702 \ 11SRC_URI = "git://github.com/intel/intel-graphics-compiler.git;protocol=https;name=igc;branch=releases/igc-1.0.11702 \
12 git://github.com/intel/vc-intrinsics.git;protocol=https;destsuffix=git/vc-intrinsics;name=vc;nobranch=1 \ 12 git://github.com/intel/vc-intrinsics.git;protocol=https;destsuffix=git/vc-intrinsics;name=vc;nobranch=1 \
13 git://github.com/KhronosGroup/SPIRV-Tools.git;protocol=https;destsuffix=SPIRV-Tools;name=spirv-tools;branch=sdk-1.3.204 \ 13 git://github.com/KhronosGroup/SPIRV-Tools.git;protocol=https;destsuffix=SPIRV-Tools;name=spirv-tools;branch=sdk-1.3.204 \
14 git://github.com/KhronosGroup/SPIRV-Headers.git;protocol=https;destsuffix=SPIRV-Headers;name=spirv-headers;branch=master \ 14 git://github.com/KhronosGroup/SPIRV-Headers.git;protocol=https;destsuffix=SPIRV-Headers;name=spirv-headers;nobranch=1 \
15 file://0003-Improve-Reproducibility-for-src-package.patch \ 15 file://0003-Improve-Reproducibility-for-src-package.patch \
16 file://0001-BiF-CMakeLists.txt-remove-opt-from-DEPENDS.patch \ 16 file://0001-BiF-CMakeLists.txt-remove-opt-from-DEPENDS.patch \
17 file://0001-SPIRVutil-Include-cstdint-to-fix-GCC-13-build.patch \
17 " 18 "
18 19
19SRC_URI:append:class-native = " file://0001-fix-tblgen.patch" 20SRC_URI:append:class-native = " file://0001-fix-tblgen.patch"
diff --git a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0001-Fix-standalone-build-415.patch b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0001-Fix-standalone-build-415.patch
new file mode 100644
index 00000000..732589f2
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0001-Fix-standalone-build-415.patch
@@ -0,0 +1,32 @@
1From 3a281f634be5e56d5fb49d07da85fe24e5971dd0 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Franti=C5=A1ek=20Zatloukal?= <Zatloukal.Frantisek@gmail.com>
3Date: Fri, 21 Apr 2023 04:07:21 +0200
4Subject: [PATCH] Fix standalone build (#415)
5
6Fixes https://github.com/intel/opencl-clang/issues/406
7Fixes https://github.com/intel/opencl-clang/issues/374
8
9Upstream-Status: Backport [https://github.com/intel/opencl-clang/commit/529a9188114bcbd8ed753d2276942384fa50d7a1]
10Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
11---
12 cl_headers/CMakeLists.txt | 6 +++++-
13 1 file changed, 5 insertions(+), 1 deletion(-)
14
15diff --git a/cl_headers/CMakeLists.txt b/cl_headers/CMakeLists.txt
16index 69cf11e..a258b62 100644
17--- a/cl_headers/CMakeLists.txt
18+++ b/cl_headers/CMakeLists.txt
19@@ -1,5 +1,9 @@
20 set(CL_HEADERS_LIB cl_headers)
21-set(CLANG_COMMAND $<TARGET_FILE:clang> )
22+if(USE_PREBUILT_LLVM)
23+ find_program(CLANG_COMMAND clang PATHS ${LLVM_TOOLS_BINARY_DIR})
24+else()
25+ set(CLANG_COMMAND $<TARGET_FILE:clang>)
26+endif()
27 if(LLVM_USE_HOST_TOOLS AND NOT OPENCL_CLANG_BUILD_EXTERNAL)
28 build_native_tool(clang CLANG_COMMAND)
29 endif()
30--
312.34.1
32
diff --git a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0001-don-t-redefine-LLVM_TABLEGEN_EXE.patch b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0001-don-t-redefine-LLVM_TABLEGEN_EXE.patch
deleted file mode 100644
index 8df7e3ab..00000000
--- a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0001-don-t-redefine-LLVM_TABLEGEN_EXE.patch
+++ /dev/null
@@ -1,32 +0,0 @@
1From f3ef79a6301bab0b3a447f07ceb94c39a95009df Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anuj.mittal@intel.com>
3Date: Thu, 2 Apr 2020 08:59:20 +0800
4Subject: [PATCH] don't redefine LLVM_TABLEGEN_EXE
5
6Use the value that has been passed by the user.
7
8Upstream-Status: Submitted
9Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
10---
11 CMakeLists.txt | 5 ++++-
12 1 file changed, 4 insertions(+), 1 deletion(-)
13
14diff --git a/CMakeLists.txt b/CMakeLists.txt
15index 6893e97..941b0ae 100644
16--- a/CMakeLists.txt
17+++ b/CMakeLists.txt
18@@ -137,7 +137,10 @@ endif(NOT USE_PREBUILT_LLVM)
19 set (COMPILE_OPTIONS_TD opencl_clang_options.td)
20 set (COMPILE_OPTIONS_INC opencl_clang_options.inc)
21
22-set(LLVM_TABLEGEN_EXE "llvm-tblgen")
23+if(NOT DEFINED LLVM_TABLEGEN_EXE)
24+ set(LLVM_TABLEGEN_EXE "llvm-tblgen")
25+endif()
26+
27 set(LLVM_TARGET_DEFINITIONS ${COMPILE_OPTIONS_TD})
28 if(USE_PREBUILT_LLVM)
29 set(TABLEGEN_ADDITIONAL -I ${LLVM_INCLUDE_DIRS})
30--
312.25.1
32
diff --git a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang.inc b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang.inc
index 1d9b4d51..0886e43b 100644
--- a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang.inc
+++ b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang.inc
@@ -16,9 +16,4 @@ DEPENDS:append:class-target = " opencl-clang-native"
16COMPATIBLE_HOST = '(x86_64).*-linux' 16COMPATIBLE_HOST = '(x86_64).*-linux'
17COMPATIBLE_HOST:libc-musl = "null" 17COMPATIBLE_HOST:libc-musl = "null"
18 18
19do_install:append:class-native() {
20 install -d ${D}${bindir}
21 install -m 0755 ${B}/linux_linker/linux_resource_linker ${D}${bindir}/
22}
23
24BBCLASSEXTEND = "native nativesdk" 19BBCLASSEXTEND = "native nativesdk"
diff --git a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_12.0.0.bb b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_12.0.0.bb
index d0b2acfb..6cab99c2 100644
--- a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_12.0.0.bb
+++ b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_12.0.0.bb
@@ -10,3 +10,8 @@ EXTRA_OECMAKE += "\
10 -DCMAKE_SKIP_RPATH=TRUE \ 10 -DCMAKE_SKIP_RPATH=TRUE \
11 -DPREFERRED_LLVM_VERSION="12.0.0" \ 11 -DPREFERRED_LLVM_VERSION="12.0.0" \
12 " 12 "
13
14do_install:append:class-native() {
15 install -d ${D}${bindir}
16 install -m 0755 ${B}/linux_linker/linux_resource_linker ${D}${bindir}/
17}
diff --git a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_14.0.0.bb b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_14.0.0.bb
index 367ca7e9..2af08f39 100644
--- a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_14.0.0.bb
+++ b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_14.0.0.bb
@@ -1,8 +1,8 @@
1require opencl-clang.inc 1require opencl-clang.inc
2 2
3SRC_URI:append = " file://0001-don-t-redefine-LLVM_TABLEGEN_EXE.patch \ 3SRC_URI:append = " file://0001-Fix-standalone-build-415.patch \
4 " 4 "
5SRCREV = "06c7c0d7f5cbd13810d79489a533fa6c5b6c7d9f" 5SRCREV = "cf95b338d14685e4f3402ab1828bef31d48f1fd6"
6 6
7BRANCH = "ocl-open-140" 7BRANCH = "ocl-open-140"
8 8
@@ -13,3 +13,8 @@ EXTRA_OECMAKE += "\
13 -DCMAKE_SKIP_RPATH=TRUE \ 13 -DCMAKE_SKIP_RPATH=TRUE \
14 -DPREFERRED_LLVM_VERSION=${LLVMVERSION} \ 14 -DPREFERRED_LLVM_VERSION=${LLVMVERSION} \
15 " 15 "
16
17do_install:append:class-native() {
18 install -d ${D}${bindir}
19 install -m 0755 ${B}/bin/linux_resource_linker ${D}${bindir}/
20}