diff options
author | Anuj Mittal <anuj.mittal@intel.com> | 2023-07-06 14:45:33 +0800 |
---|---|---|
committer | Anuj Mittal <anuj.mittal@intel.com> | 2023-07-17 09:24:48 +0800 |
commit | 4f5cc7a0a09df11a26973e65bed279fd32b8c2d3 (patch) | |
tree | 91aba1d2f82d654433787e7e700361b184681db6 /dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.13822.6.bb | |
parent | dab85c23256f4e004fbe7a8fe5d4f41002f5c14a (diff) | |
download | meta-intel-4f5cc7a0a09df11a26973e65bed279fd32b8c2d3.tar.gz |
intel-graphics-compiler: 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/recipes-opencl/igc/intel-graphics-compiler_1.0.13822.6.bb')
-rw-r--r-- | dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.13822.6.bb | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.13822.6.bb b/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.13822.6.bb index a8039b9b..69bdac56 100644 --- a/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.13822.6.bb +++ b/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.13822.6.bb | |||
@@ -31,15 +31,14 @@ export B | |||
31 | 31 | ||
32 | S = "${WORKDIR}/git" | 32 | S = "${WORKDIR}/git" |
33 | 33 | ||
34 | inherit cmake pkgconfig | 34 | inherit cmake pkgconfig qemu |
35 | 35 | ||
36 | CXXFLAGS:append = " -Wno-error=nonnull" | 36 | CXXFLAGS:append = " -Wno-error=nonnull" |
37 | 37 | ||
38 | COMPATIBLE_HOST = '(x86_64).*-linux' | 38 | COMPATIBLE_HOST = '(x86_64).*-linux' |
39 | COMPATIBLE_HOST:libc-musl = "null" | 39 | COMPATIBLE_HOST:libc-musl = "null" |
40 | 40 | ||
41 | DEPENDS += " flex-native bison-native clang opencl-clang" | 41 | DEPENDS += " flex-native bison-native clang clang-cross-x86_64 opencl-clang qemu-native" |
42 | DEPENDS:append:class-target = " clang-cross-x86_64 intel-graphics-compiler-native" | ||
43 | 42 | ||
44 | RDEPENDS:${PN} += "opencl-clang" | 43 | RDEPENDS:${PN} += "opencl-clang" |
45 | 44 | ||
@@ -54,19 +53,19 @@ EXTRA_OECMAKE = " \ | |||
54 | -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \ | 53 | -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \ |
55 | -DLLVM_LINK_EXE=${STAGING_BINDIR_NATIVE}/llvm-link \ | 54 | -DLLVM_LINK_EXE=${STAGING_BINDIR_NATIVE}/llvm-link \ |
56 | -DCLANG_EXE=${STAGING_BINDIR_NATIVE}/clang \ | 55 | -DCLANG_EXE=${STAGING_BINDIR_NATIVE}/clang \ |
56 | -DCMAKE_CROSSCOMPILING_EMULATOR=${WORKDIR}/qemuwrapper \ | ||
57 | " | 57 | " |
58 | 58 | ||
59 | do_install:append:class-native () { | 59 | do_configure:prepend:class-target () { |
60 | install -d ${D}${bindir} | 60 | # Write out a qemu wrapper that will be used by cmake. |
61 | install ${B}/IGC/Release/elf_packager ${D}${bindir}/ | 61 | qemu_binary="${@qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), [d.expand('${STAGING_DIR_HOST}${libdir}'),d.expand('${STAGING_DIR_HOST}${base_libdir}')])}" |
62 | if ${@bb.utils.contains('PACKAGECONFIG', 'vc', 'true', 'false', d)}; then | 62 | cat > ${WORKDIR}/qemuwrapper << EOF |
63 | install ${B}/IGC/Release/CMCLTranslatorTool ${D}${bindir}/ | 63 | #!/bin/sh |
64 | install ${B}/IGC/Release/vcb ${D}${bindir}/ | 64 | $qemu_binary "\$@" |
65 | fi | 65 | EOF |
66 | chmod +x ${WORKDIR}/qemuwrapper | ||
66 | } | 67 | } |
67 | 68 | ||
68 | BBCLASSEXTEND = "native nativesdk" | ||
69 | |||
70 | UPSTREAM_CHECK_GITTAGREGEX = "^igc-(?P<pver>(?!19\..*)\d+(\.\d+)+)$" | 69 | UPSTREAM_CHECK_GITTAGREGEX = "^igc-(?P<pver>(?!19\..*)\d+(\.\d+)+)$" |
71 | 70 | ||
72 | FILES:${PN} += " \ | 71 | FILES:${PN} += " \ |