mirror of
git://git.yoctoproject.org/meta-intel.git
synced 2025-07-19 21:09:03 +02:00
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>
This commit is contained in:
parent
4f5cc7a0a0
commit
8af199950b
|
@ -11,9 +11,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.md;md5=eca6ec6997e18db166db7109cdbe611c \
|
||||||
SRC_URI = "git://github.com/intel/compute-runtime.git;protocol=https;branch=releases/23.17 \
|
SRC_URI = "git://github.com/intel/compute-runtime.git;protocol=https;branch=releases/23.17 \
|
||||||
file://disable-werror.patch \
|
file://disable-werror.patch \
|
||||||
file://add-missing-cstdint-header-to-fix-compile-with-gcc13.patch \
|
file://add-missing-cstdint-header-to-fix-compile-with-gcc13.patch \
|
||||||
"
|
file://allow-to-find-cpp-generation-tool.patch \
|
||||||
|
|
||||||
SRC_URI:append:class-target = "file://allow-to-find-cpp-generation-tool.patch \
|
|
||||||
file://external-ocloc.patch \
|
file://external-ocloc.patch \
|
||||||
"
|
"
|
||||||
|
|
||||||
|
@ -21,12 +19,11 @@ SRCREV = "0bb5b3408e6cb61b477e7cad296fd278b11e73be"
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
S = "${WORKDIR}/git"
|
||||||
|
|
||||||
DEPENDS += " intel-graphics-compiler gmmlib"
|
DEPENDS += " intel-graphics-compiler gmmlib libva qemu-native"
|
||||||
DEPENDS:append:class-target = " intel-compute-runtime-native libva"
|
|
||||||
|
|
||||||
RDEPENDS:${PN} += " intel-graphics-compiler gmmlib"
|
RDEPENDS:${PN} += " intel-graphics-compiler gmmlib"
|
||||||
|
|
||||||
inherit cmake pkgconfig
|
inherit cmake pkgconfig qemu
|
||||||
|
|
||||||
COMPATIBLE_HOST = '(x86_64).*-linux'
|
COMPATIBLE_HOST = '(x86_64).*-linux'
|
||||||
COMPATIBLE_HOST:libc-musl = "null"
|
COMPATIBLE_HOST:libc-musl = "null"
|
||||||
|
@ -42,14 +39,20 @@ EXTRA_OECMAKE = " \
|
||||||
|
|
||||||
EXTRA_OECMAKE:append:class-target = " \
|
EXTRA_OECMAKE:append:class-target = " \
|
||||||
-Docloc_cmd_prefix=ocloc \
|
-Docloc_cmd_prefix=ocloc \
|
||||||
|
-DCMAKE_CROSSCOMPILING_EMULATOR=${WORKDIR}/qemuwrapper \
|
||||||
"
|
"
|
||||||
|
|
||||||
PACKAGECONFIG ??= ""
|
PACKAGECONFIG ??= ""
|
||||||
PACKAGECONFIG[levelzero] = "-DBUILD_WITH_L0=ON, -DBUILD_WITH_L0=OFF, level-zero"
|
PACKAGECONFIG[levelzero] = "-DBUILD_WITH_L0=ON, -DBUILD_WITH_L0=OFF, level-zero"
|
||||||
|
|
||||||
do_install:append:class-native() {
|
do_configure:prepend:class-target () {
|
||||||
install -d ${D}${bindir}
|
# Write out a qemu wrapper that will be used by cmake.
|
||||||
install ${B}/bin/cpp_generate_tool ${D}${bindir}/
|
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} += " \
|
FILES:${PN} += " \
|
||||||
|
@ -59,6 +62,4 @@ FILES:${PN} += " \
|
||||||
|
|
||||||
FILES:${PN}-dev = "${includedir}"
|
FILES:${PN}-dev = "${includedir}"
|
||||||
|
|
||||||
BBCLASSEXTEND = "native nativesdk"
|
|
||||||
|
|
||||||
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
|
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user