commit:     f127c4a6b2c7ca2584b2621ea0cd96b865a3bda3
Author:     Krzesimir Nowak <knowak <AT> microsoft <DOT> com>
AuthorDate: Fri May 24 15:08:25 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat May 25 08:25:31 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f127c4a6

app-emulation/qemu-guest-agent: Fix cross-compilation issue

The fix is borrowed from app-emulation/qemu. Passing cross-prefix is
necessary to make meson do a cross-build, otherwise the build system
will try to use intrinsics suitable for build machine instead of host
machine, when building some crypto stuff.

Signed-off-by: Krzesimir Nowak <knowak <AT> microsoft.com>
Closes: https://github.com/gentoo/gentoo/pull/36808
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/qemu-guest-agent/qemu-guest-agent-8.2.0.ebuild | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/app-emulation/qemu-guest-agent/qemu-guest-agent-8.2.0.ebuild 
b/app-emulation/qemu-guest-agent/qemu-guest-agent-8.2.0.ebuild
index 7426f9441f2a..3002f6df679d 100644
--- a/app-emulation/qemu-guest-agent/qemu-guest-agent-8.2.0.ebuild
+++ b/app-emulation/qemu-guest-agent/qemu-guest-agent-8.2.0.ebuild
@@ -52,6 +52,9 @@ src_configure() {
                --host-cc="$(tc-getBUILD_CC)"
        )
 
+       # Meson will not use a cross-file unless cross_prefix is set.
+       tc-is-cross-compiler && myconf+=( --cross-prefix="${CHOST}-" )
+
        edo ./configure "${myconf[@]}"
 }
 

Reply via email to