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 <[email protected]>
---
 .../intel-compute-runtime_23.17.26241.22.bb   | 29 ++++++++++---------
 1 file 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 \
 SRC_URI = 
"git://github.com/intel/compute-runtime.git;protocol=https;branch=releases/23.17
 \
            file://disable-werror.patch \
            file://add-missing-cstdint-header-to-fix-compile-with-gcc13.patch \
-          "
-
-SRC_URI:append:class-target = "file://allow-to-find-cpp-generation-tool.patch \
-                               file://external-ocloc.patch \
-                              "
+           file://allow-to-find-cpp-generation-tool.patch \
+           file://external-ocloc.patch \
+           "
 
 SRCREV = "0bb5b3408e6cb61b477e7cad296fd278b11e73be"
 
 S = "${WORKDIR}/git"
 
-DEPENDS += " intel-graphics-compiler gmmlib"
-DEPENDS:append:class-target = " intel-compute-runtime-native libva"
+DEPENDS += " intel-graphics-compiler gmmlib libva qemu-native"
 
 RDEPENDS:${PN} += " intel-graphics-compiler gmmlib"
 
-inherit cmake pkgconfig
+inherit cmake pkgconfig qemu
 
 COMPATIBLE_HOST = '(x86_64).*-linux'
 COMPATIBLE_HOST:libc-musl = "null"
@@ -42,14 +39,20 @@ EXTRA_OECMAKE = " \
 
 EXTRA_OECMAKE:append:class-target = " \
                                      -Docloc_cmd_prefix=ocloc \
-                                    "
+                                     
-DCMAKE_CROSSCOMPILING_EMULATOR=${WORKDIR}/qemuwrapper \
+                                     "
 
 PACKAGECONFIG ??= ""
 PACKAGECONFIG[levelzero] = "-DBUILD_WITH_L0=ON, -DBUILD_WITH_L0=OFF, 
level-zero"
 
-do_install:append:class-native() {
-    install -d ${D}${bindir}
-    install ${B}/bin/cpp_generate_tool ${D}${bindir}/
+do_configure:prepend:class-target () {
+    # Write out a qemu wrapper that will be used by cmake.
+    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}')])}"
+    cat > ${WORKDIR}/qemuwrapper << EOF
+#!/bin/sh
+$qemu_binary "\$@"
+EOF
+    chmod +x ${WORKDIR}/qemuwrapper
 }
 
 FILES:${PN} += " \
@@ -59,6 +62,4 @@ FILES:${PN} += " \
 
 FILES:${PN}-dev = "${includedir}"
 
-BBCLASSEXTEND = "native nativesdk"
-
 UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
-- 
2.41.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#8040): 
https://lists.yoctoproject.org/g/meta-intel/message/8040
Mute This Topic: https://lists.yoctoproject.org/mt/100000369/21656
Group Owner: [email protected]
Unsubscribe: 
https://lists.yoctoproject.org/g/meta-intel/leave/6694807/21656/1869269227/xyzzy
 [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to