summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNaveen Saini <naveen.kumar.saini@intel.com>2020-04-24 13:38:35 +0800
committerAnuj Mittal <anuj.mittal@intel.com>2020-04-24 14:14:16 +0800
commit35a1fac85f0e8052f43f5d4fa33e2a2051b2ca81 (patch)
treed3e2eddda253d86063fba462cd39f2d8c6557e0b
parent0cd0dafe0f99212e42c5a64d1aafeac731b93650 (diff)
downloadmeta-intel-35a1fac85f0e8052f43f5d4fa33e2a2051b2ca81.tar.gz
opencl-clang: add recipe for 9.0.0 as well
opencl-clang project release branches links to different LLVM versions. So, in order to use latest igc version with both clang 10.x and 9.x, added seprated recipes. Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
-rw-r--r--conf/machine/include/meta-intel.inc3
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/point-to-correct-llvm-tblgen.patch43
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang.inc27
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_10.0.0.bb28
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_9.0.0.bb7
5 files changed, 81 insertions, 27 deletions
diff --git a/conf/machine/include/meta-intel.inc b/conf/machine/include/meta-intel.inc
index 47976cde..dd37d018 100644
--- a/conf/machine/include/meta-intel.inc
+++ b/conf/machine/include/meta-intel.inc
@@ -25,6 +25,9 @@ PREFERRED_VERSION_linux-intel-rt ?= "5.4%"
25PREFERRED_VERSION_linux-intel_poky-altcfg ?= "4.19%" 25PREFERRED_VERSION_linux-intel_poky-altcfg ?= "4.19%"
26PREFERRED_VERSION_linux-intel-rt_poky-altcfg ?= "4.19%" 26PREFERRED_VERSION_linux-intel-rt_poky-altcfg ?= "4.19%"
27 27
28PREFERRED_VERSION_opencl-clang ?= "${@bb.utils.contains('LLVMVERSION', '9.0.1', '9.0.0', '10.0.0', d)}"
29PREFERRED_VERSION_opencl-clang-native ?= "${@bb.utils.contains('LLVMVERSION', '9.0.1', '9.0.0', '10.0.0', d)}"
30
28XSERVER_X86_ASPEED_AST = "xf86-video-ast \ 31XSERVER_X86_ASPEED_AST = "xf86-video-ast \
29 " 32 "
30 33
diff --git a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/point-to-correct-llvm-tblgen.patch b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/point-to-correct-llvm-tblgen.patch
new file mode 100644
index 00000000..417e0221
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/point-to-correct-llvm-tblgen.patch
@@ -0,0 +1,43 @@
1From 2ce2619b544678541e0cc56494e2927086718613 Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anuj.mittal@intel.com>
3Date: Tue, 26 Mar 2019 14:11:29 +0800
4Subject: [PATCH] point to correct llvm-tblgen
5
6Let llvm-tblgen path be passed from recipe itself.
7
8Also since we're going to do the patching ourselves, no need to look for
9git through cmake.
10
11Upstream-Status: Inappropriate [OE specific]
12
13Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
14Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
15---
16 CMakeLists.txt | 4 ++--
17 1 file changed, 2 insertions(+), 2 deletions(-)
18
19diff --git a/CMakeLists.txt b/CMakeLists.txt
20index 1371a67..f83ffcc 100644
21--- a/CMakeLists.txt
22+++ b/CMakeLists.txt
23@@ -53,7 +53,7 @@ endif(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
24 include(AddLLVM)
25 include(TableGen)
26
27-find_package(Git REQUIRED)
28+#find_package(Git REQUIRED)
29
30 if (NOT WIN32)
31 add_subdirectory( linux_linker )
32@@ -138,7 +138,7 @@ endif(NOT USE_PREBUILT_LLVM)
33 set (COMPILE_OPTIONS_TD opencl_clang_options.td)
34 set (COMPILE_OPTIONS_INC opencl_clang_options.inc)
35
36-set(LLVM_TABLEGEN_EXE "llvm-tblgen")
37+#set(LLVM_TABLEGEN_EXE "llvm-tblgen")
38 set(LLVM_TARGET_DEFINITIONS ${COMPILE_OPTIONS_TD})
39 if(USE_PREBUILT_LLVM)
40 set(TABLEGEN_ADDITIONAL -I ${LLVM_INCLUDE_DIRS})
41--
422.17.1
43
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
new file mode 100644
index 00000000..c099a509
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang.inc
@@ -0,0 +1,27 @@
1SUMMARY = "Common clang is a thin wrapper library around clang"
2DESCRIPTION = "Common clang has OpenCL-oriented API and is capable \
3 to compile OpenCL C kernels to SPIR-V modules."
4
5LICENSE = "NCSA"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=e8a15bf1416762a09ece07e44c79118c"
7
8S = "${WORKDIR}/git"
9
10inherit cmake
11DEPENDS += "clang"
12DEPENDS_append_class-target = " opencl-clang-native"
13
14COMPATIBLE_HOST = '(x86_64).*-linux'
15COMPATIBLE_HOST_libc-musl = "null"
16
17EXTRA_OECMAKE += "\
18 -DLLVM_TABLEGEN_EXE=${STAGING_BINDIR_NATIVE}/llvm-tblgen \
19 -DCMAKE_SKIP_RPATH=TRUE \
20 "
21
22do_install_append_class-native() {
23 install -d ${D}${bindir}
24 install -m 0755 ${B}/linux_linker/linux_resource_linker ${D}${bindir}/
25}
26
27BBCLASSEXTEND = "native nativesdk"
diff --git a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_10.0.0.bb b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_10.0.0.bb
index 042cfa30..dcee4fa0 100644
--- a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_10.0.0.bb
+++ b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_10.0.0.bb
@@ -1,9 +1,4 @@
1SUMMARY = "Common clang is a thin wrapper library around clang" 1require opencl-clang.inc
2DESCRIPTION = "Common clang has OpenCL-oriented API and is capable \
3 to compile OpenCL C kernels to SPIR-V modules."
4
5LICENSE = "NCSA"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=e8a15bf1416762a09ece07e44c79118c"
7 2
8SRC_URI = "git://github.com/intel/opencl-clang.git;branch=ocl-open-100;protocol=https \ 3SRC_URI = "git://github.com/intel/opencl-clang.git;branch=ocl-open-100;protocol=https \
9 file://0001-don-t-redefine-LLVM_TABLEGEN_EXE.patch \ 4 file://0001-don-t-redefine-LLVM_TABLEGEN_EXE.patch \
@@ -12,24 +7,3 @@ SRC_URI = "git://github.com/intel/opencl-clang.git;branch=ocl-open-100;protocol=
12SRC_URI_append_class-native = " file://0002-make-sure-only-static-libraries-linked-for-native-bu.patch" 7SRC_URI_append_class-native = " file://0002-make-sure-only-static-libraries-linked-for-native-bu.patch"
13 8
14SRCREV = "9f0c2c0f5ddea1accc921aed4c94bc52c1b85637" 9SRCREV = "9f0c2c0f5ddea1accc921aed4c94bc52c1b85637"
15
16S = "${WORKDIR}/git"
17
18inherit cmake
19DEPENDS += "clang"
20DEPENDS_append_class-target = " opencl-clang-native"
21
22COMPATIBLE_HOST = '(x86_64).*-linux'
23COMPATIBLE_HOST_libc-musl = "null"
24
25EXTRA_OECMAKE += "\
26 -DLLVM_TABLEGEN_EXE=${STAGING_BINDIR_NATIVE}/llvm-tblgen \
27 -DCMAKE_SKIP_RPATH=TRUE \
28 "
29
30do_install_append_class-native() {
31 install -d ${D}${bindir}
32 install -m 0755 ${B}/linux_linker/linux_resource_linker ${D}${bindir}/
33}
34
35BBCLASSEXTEND = "native nativesdk"
diff --git a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_9.0.0.bb b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_9.0.0.bb
new file mode 100644
index 00000000..f262a5eb
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_9.0.0.bb
@@ -0,0 +1,7 @@
1require opencl-clang.inc
2
3SRC_URI = "git://github.com/intel/opencl-clang.git;branch=ocl-open-90;protocol=https \
4 file://point-to-correct-llvm-tblgen.patch \
5 "
6
7SRCREV = "6f8c329bea44321aef1a1716dd206c1f7bed23cf"