summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/clang-layer
diff options
context:
space:
mode:
authorAnuj Mittal <anuj.mittal@intel.com>2023-07-06 14:45:56 +0800
committerAnuj Mittal <anuj.mittal@intel.com>2023-07-17 09:24:48 +0800
commit8af199950b05c28530f1058de6b05262cbf42ca2 (patch)
tree892054fc7fe298970222c80a4718a1de8a0d5bb7 /dynamic-layers/clang-layer
parent4f5cc7a0a09df11a26973e65bed279fd32b8c2d3 (diff)
downloadmeta-intel-8af199950b05c28530f1058de6b05262cbf42ca2.tar.gz
intel-compute-runtime: use qemu to run native binaries
Now that intel-skylake-64 can use qemu-user as well, don't build native version of the recipe simply for use by the target version. Build a qemuwrapper that can be passed to CMAKE_CROSSCOMPILING_EMULATOR. Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Diffstat (limited to 'dynamic-layers/clang-layer')
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_23.17.26241.22.bb29
1 files changed, 15 insertions, 14 deletions
diff --git a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_23.17.26241.22.bb b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_23.17.26241.22.bb
index fe5f886c..8aef6e9a 100644
--- a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_23.17.26241.22.bb
+++ b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_23.17.26241.22.bb
@@ -11,22 +11,19 @@ LIC_FILES_CHKSUM = "file://LICENSE.md;md5=eca6ec6997e18db166db7109cdbe611c \
11SRC_URI = "git://github.com/intel/compute-runtime.git;protocol=https;branch=releases/23.17 \ 11SRC_URI = "git://github.com/intel/compute-runtime.git;protocol=https;branch=releases/23.17 \
12 file://disable-werror.patch \ 12 file://disable-werror.patch \
13 file://add-missing-cstdint-header-to-fix-compile-with-gcc13.patch \ 13 file://add-missing-cstdint-header-to-fix-compile-with-gcc13.patch \
14 " 14 file://allow-to-find-cpp-generation-tool.patch \
15 15 file://external-ocloc.patch \
16SRC_URI:append:class-target = "file://allow-to-find-cpp-generation-tool.patch \ 16 "
17 file://external-ocloc.patch \
18 "
19 17
20SRCREV = "0bb5b3408e6cb61b477e7cad296fd278b11e73be" 18SRCREV = "0bb5b3408e6cb61b477e7cad296fd278b11e73be"
21 19
22S = "${WORKDIR}/git" 20S = "${WORKDIR}/git"
23 21
24DEPENDS += " intel-graphics-compiler gmmlib" 22DEPENDS += " intel-graphics-compiler gmmlib libva qemu-native"
25DEPENDS:append:class-target = " intel-compute-runtime-native libva"
26 23
27RDEPENDS:${PN} += " intel-graphics-compiler gmmlib" 24RDEPENDS:${PN} += " intel-graphics-compiler gmmlib"
28 25
29inherit cmake pkgconfig 26inherit cmake pkgconfig qemu
30 27
31COMPATIBLE_HOST = '(x86_64).*-linux' 28COMPATIBLE_HOST = '(x86_64).*-linux'
32COMPATIBLE_HOST:libc-musl = "null" 29COMPATIBLE_HOST:libc-musl = "null"
@@ -42,14 +39,20 @@ EXTRA_OECMAKE = " \
42 39
43EXTRA_OECMAKE:append:class-target = " \ 40EXTRA_OECMAKE:append:class-target = " \
44 -Docloc_cmd_prefix=ocloc \ 41 -Docloc_cmd_prefix=ocloc \
45 " 42 -DCMAKE_CROSSCOMPILING_EMULATOR=${WORKDIR}/qemuwrapper \
43 "
46 44
47PACKAGECONFIG ??= "" 45PACKAGECONFIG ??= ""
48PACKAGECONFIG[levelzero] = "-DBUILD_WITH_L0=ON, -DBUILD_WITH_L0=OFF, level-zero" 46PACKAGECONFIG[levelzero] = "-DBUILD_WITH_L0=ON, -DBUILD_WITH_L0=OFF, level-zero"
49 47
50do_install:append:class-native() { 48do_configure:prepend:class-target () {
51 install -d ${D}${bindir} 49 # Write out a qemu wrapper that will be used by cmake.
52 install ${B}/bin/cpp_generate_tool ${D}${bindir}/ 50 qemu_binary="${@qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), [d.expand('${B}/bin'),d.expand('${STAGING_DIR_HOST}${libdir}'),d.expand('${STAGING_DIR_HOST}${base_libdir}')])}"
51 cat > ${WORKDIR}/qemuwrapper << EOF
52#!/bin/sh
53$qemu_binary "\$@"
54EOF
55 chmod +x ${WORKDIR}/qemuwrapper
53} 56}
54 57
55FILES:${PN} += " \ 58FILES:${PN} += " \
@@ -59,6 +62,4 @@ FILES:${PN} += " \
59 62
60FILES:${PN}-dev = "${includedir}" 63FILES:${PN}-dev = "${includedir}"
61 64
62BBCLASSEXTEND = "native nativesdk"
63
64UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)" 65UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"