diff options
Diffstat (limited to 'dynamic-layers/clang-layer/recipes-opencl')
2 files changed, 86 insertions, 0 deletions
diff --git a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/dont-use-ld-library-path.patch b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/dont-use-ld-library-path.patch new file mode 100644 index 00000000..b886b95d --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/dont-use-ld-library-path.patch @@ -0,0 +1,43 @@ +From 2475dfc1350f73a243c9fc223a9f06af85321d56 Mon Sep 17 00:00:00 2001 +From: Anuj Mittal <anuj.mittal@intel.com> +Date: Tue, 2 Jul 2019 08:36:34 +0800 +Subject: [PATCH] don't use LD_LIBRARY_PATH for native offline compiler + +Let us supply the correct path for it to be able to find the correct +libraries. + +Upstream-Status: Inappropriate + +Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> + +--- + runtime/built_ins/kernels/CMakeLists.txt | 2 +- + runtime/scheduler/scheduler_binary.cmake | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/runtime/built_ins/kernels/CMakeLists.txt b/runtime/built_ins/kernels/CMakeLists.txt +index 5dc9fe1b..e258847d 100644 +--- a/runtime/built_ins/kernels/CMakeLists.txt ++++ b/runtime/built_ins/kernels/CMakeLists.txt +@@ -51,7 +51,7 @@ function(compile_builtin gen_type platform_type builtin) + if(DEFINED IGDRCL__IGC_LIBRARY_PATH) + set(cloc_cmd_prefix LD_LIBRARY_PATH=${IGDRCL__IGC_LIBRARY_PATH} $<TARGET_FILE:ocloc>) + else() +- set(cloc_cmd_prefix LD_LIBRARY_PATH=$<TARGET_FILE_DIR:ocloc> $<TARGET_FILE:ocloc>) ++ set(cloc_cmd_prefix ocloc) + endif() + endif() + list(APPEND __cloc__options__ "-cl-kernel-arg-info") +diff --git a/runtime/scheduler/scheduler_binary.cmake b/runtime/scheduler/scheduler_binary.cmake +index 1b12592b..ed9f375d 100644 +--- a/runtime/scheduler/scheduler_binary.cmake ++++ b/runtime/scheduler/scheduler_binary.cmake +@@ -37,7 +37,7 @@ function(compile_kernel target gen_type platform_type kernel) + if(DEFINED IGDRCL__IGC_LIBRARY_PATH) + set(cloc_cmd_prefix LD_LIBRARY_PATH=${IGDRCL__IGC_LIBRARY_PATH} $<TARGET_FILE:ocloc>) + else() +- set(cloc_cmd_prefix LD_LIBRARY_PATH=$<TARGET_FILE_DIR:ocloc> $<TARGET_FILE:ocloc>) ++ set(cloc_cmd_prefix ocloc) + endif() + endif() + list(APPEND __cloc__options__ "-cl-kernel-arg-info") diff --git a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_19.21.13045.bb b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_19.21.13045.bb new file mode 100644 index 00000000..72992567 --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_19.21.13045.bb @@ -0,0 +1,43 @@ +SUMMARY = "The Intel(R) Graphics Compute Runtime for OpenCL(TM)" +DESCRIPTION = "The Intel(R) Graphics Compute Runtime for OpenCL(TM) \ +is an open source project to converge Intel's development efforts \ +on OpenCL(TM) compute stacks supporting the GEN graphics hardware \ +architecture." + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae27f47fd6755510247c19e547e4c804 \ + file://third_party/opencl_headers/LICENSE;md5=dcefc90f4c3c689ec0c2489064e7273b" + +SRC_URI = "git://github.com/intel/compute-runtime.git;protocol=https \ + " + +SRC_URI_append_class-target = " \ + file://dont-use-ld-library-path.patch \ +" + +SRCREV = "7989a68f6ff72372d8eb5ea3c8bd52fad6778b8f" + +S = "${WORKDIR}/git" + +DEPENDS += " intel-graphics-compiler gmmlib clang" +DEPENDS_append_class-target = " intel-compute-runtime-native" + +inherit cmake pkgconfig + +COMPATIBLE_HOST = '(x86_64).*-linux' +COMPATIBLE_HOST_libc-musl = "null" + +EXTRA_OECMAKE = " \ + -DBUILD_TYPE=Release \ + -DSKIP_UNIT_TESTS=1 \ + -DCCACHE_ALLOWED=FALSE \ + " + +LDFLAGS_append_class-native = " -fuse-ld=lld" +TOOLCHAIN_class-native = "clang" + +FILES_${PN} += "${libdir}/intel-opencl/libigdrcl.so" + +BBCLASSEXTEND = "native nativesdk" + +EXCLUDE_FROM_WORLD = "1" |