Hi, Naveen
opencl-clang-native configure failed with latest code, because llvm have
upgrade to 13.0.0, but this recipe require 12.0.0. – [OPENCL-CLANG]
Looking for LLVM version 12.0.0 CMake Error at CMakeLists.txt:26
(find_package): Could not find a configuration file for package "LLVM"
that is compatible with requested version "12.0.0".
I checked https://github.com/intel/opencl-clang, branch for 13.0.0 seems not
ready. what's your opinion about fix this problem?
I tried just set -DPREFERRED_LLVM_VERSION="13.0.0" in EXTRA_OECMAKE, it can
build success. But I don't know if there is any runtime
issue, also it seems not good to use 13.0.0 for opencl-clang_12.0.0.bb.
Thanks.
//Changqing
On 3/26/21 6:39 PM, Naveen Saini wrote:
[Please note: This e-mail is from an EXTERNAL e-mail address]
Builds opencl-clang with llvm-12. It fetches source
from 'ocl-open-120' branch.
Signed-off-by: Naveen Saini <[email protected]>
---
conf/machine/include/meta-intel.inc | 6 ++--
.../opencl-clang/opencl-clang_12.0.0.bb | 35 +++++++++++++++++++
2 files changed, 39 insertions(+), 2 deletions(-)
create mode 100644
dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_12.0.0.bb
diff --git a/conf/machine/include/meta-intel.inc
b/conf/machine/include/meta-intel.inc
index 565ee526..19f7857d 100644
--- a/conf/machine/include/meta-intel.inc
+++ b/conf/machine/include/meta-intel.inc
@@ -26,8 +26,10 @@ PREFERRED_PROVIDER_libva-utils = "libva-intel-utils"
PREFERRED_PROVIDER_libva-utils-native = "libva-intel-utils-native"
PREFERRED_PROVIDER_nativesdk-libva-utils = "nativesdk-libva-intel-utils"
-PREFERRED_VERSION_opencl-clang ?= "${@bb.utils.contains('LLVMVERSION', '10.0.1',
'10.0.0', '11.0.0', d)}"
-PREFERRED_VERSION_opencl-clang-native ?= "${@bb.utils.contains('LLVMVERSION',
'10.0.1', '10.0.0', '11.0.0', d)}"
+PREFERRED_VERSION_opencl-clang ?= "${@bb.utils.contains('LLVMVERSION',
'10.0.1', '10.0.0', \
+ bb.utils.contains('LLVMVERSION',
'11.1.0', '11.0.0', '12.0.0', d), d)}"
+PREFERRED_VERSION_opencl-clang-native ?= "${@bb.utils.contains('LLVMVERSION',
'10.0.1', '10.0.0', \
+ bb.utils.contains('LLVMVERSION',
'11.1.0', '11.0.0', '12.0.0', d), d)}"
XSERVER_X86_ASPEED_AST = "xf86-video-ast \
"
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
new file mode 100644
index 00000000..df7115c7
--- /dev/null
+++
b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_12.0.0.bb
@@ -0,0 +1,35 @@
+SUMMARY = "Common clang is a thin wrapper library around clang"
+DESCRIPTION = "Common clang has OpenCL-oriented API and is capable \
+ to compile OpenCL C kernels to SPIR-V modules."
+
+LICENSE = "NCSA"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e8a15bf1416762a09ece07e44c79118c"
+
+SRC_URI =
"git://github.com/intel/opencl-clang.git;branch=ocl-open-120;protocol=https \
+ file://0001-don-t-redefine-LLVM_TABLEGEN_EXE.patch \
+ "
+SRC_URI_append_class-native = "
file://0002-make-sure-only-static-libraries-linked-for-native-bu.patch"
+
+SRCREV = "e0bce8aa4979581ac37e6315fa9460a54dbcd45f"
+
+S = "${WORKDIR}/git"
+
+inherit cmake
+DEPENDS += " clang spirv-llvm-translator"
+DEPENDS_append_class-target = " opencl-clang-native"
+
+COMPATIBLE_HOST = '(x86_64).*-linux'
+COMPATIBLE_HOST_libc-musl = "null"
+
+EXTRA_OECMAKE += "\
+ -DLLVM_TABLEGEN_EXE=${STAGING_BINDIR_NATIVE}/llvm-tblgen \
+ -DCMAKE_SKIP_RPATH=TRUE \
+ -DPREFERRED_LLVM_VERSION="12.0.0" \
+ "
+
+do_install_append_class-native() {
+ install -d ${D}${bindir}
+ install -m 0755 ${B}/linux_linker/linux_resource_linker ${D}${bindir}/
+}
+
+BBCLASSEXTEND = "native nativesdk"
--
2.17.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7097):
https://lists.yoctoproject.org/g/meta-intel/message/7097
Mute This Topic: https://lists.yoctoproject.org/mt/81624639/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-intel/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-