]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
graphene: fix runtime detection of IEEE754 behaviour
authorRoss Burton <ross.burton@arm.com>
Thu, 10 Aug 2023 16:24:51 +0000 (17:24 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 21 Aug 2023 10:34:05 +0000 (11:34 +0100)
Graphene gates a runtime check on whether it is cross-compiling, when it
should be whether it can run target binaries.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-graphics/graphene/files/float-div.patch [new file with mode: 0644]
meta/recipes-graphics/graphene/graphene_1.10.8.bb

diff --git a/meta/recipes-graphics/graphene/files/float-div.patch b/meta/recipes-graphics/graphene/files/float-div.patch
new file mode 100644 (file)
index 0000000..bf74101
--- /dev/null
@@ -0,0 +1,28 @@
+From c19d1f4a7e44e071df3a2612ae2eb20c84e831a6 Mon Sep 17 00:00:00 2001
+From: Emmanuele Bassi <ebassi@gnome.org>
+Date: Thu, 10 Aug 2023 12:44:49 +0100
+Subject: [PATCH] build: Allow host builds when cross-compiling
+
+Environments that set up execution wrappers when cross-compiling should
+be allowed to run code. We only fall back on external properties if we
+really can't run any native code on the host machine.
+
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+---
+ meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 48f22d7..7dcb9e6 100644
+--- a/meson.build
++++ b/meson.build
+@@ -270,7 +270,7 @@ int main() {
+  return 0;
+ }
+ '''
+-if meson.is_cross_build()
++if not meson.can_run_host_binaries()
+   ieee754_float_div = meson.get_external_property('ieee754_float_div', cc.get_id() in ['gcc', 'clang'])
+   message('Cross-building, assuming IEEE 754 division:', ieee754_float_div)
+ else
index 9f5b4d0e2d35a703751a40f62e72c60637bd9bd3..55d8a2d74ee772230e12d7e8b25e3ce75da8a69e 100644 (file)
@@ -7,6 +7,8 @@ GNOMEBASEBUILDCLASS = "meson"
 
 inherit gnomebase gobject-introspection gtk-doc
 
+SRC_URI += "file://float-div.patch"
+
 SRC_URI[archive.sha256sum] = "a37bb0e78a419dcbeaa9c7027bcff52f5ec2367c25ec859da31dfde2928f279a"
 
 # Disable neon support by default on ARM-32 platforms because of the