On 08/05/2025 20.26, Daniel P. Berrangé wrote:
On Thu, May 08, 2025 at 04:41:20PM +0200, Thomas Huth wrote:
From: Thomas Huth <[email protected]>
This reverts commit 2d6d995709482cc8b6a76dbb5334a28001a14a9a.
OpenBSD 7.7 fixed the problem with the -fzero-call-used-regs on OpenBSD,
see https://github.com/openbsd/src/commit/03eca72d1e030b7a542cd6aec1 for
the fix there.
Suggested-by: Brad Smith <[email protected]>
Signed-off-by: Thomas Huth <[email protected]>
---
Note: Marked as RFC since we likely can include this only once OpenBSD
7.6 goes out of service, see:
https://lists.libreplanet.org/archive/html/qemu-arm/2025-05/msg00559.html
Yep, we have to wait a bit longer, unless someone can confirm the
fix was backported to 7.6
Now that QEMU 10.1 has been released, I'm going to include this patch in my
next pull request. OpenBSD 7.8 should get released in October, so 7.6 will
go out of service at that point in time, and our next QEMU release is likely
in December, so we should be fine. Or has anybody still concerns about
including this now?
Thomas
meson.build | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/meson.build b/meson.build
index 6c61e1dcaec..5f0e6a65cb0 100644
--- a/meson.build
+++ b/meson.build
@@ -699,11 +699,7 @@ hardening_flags = [
#
# NB: Clang 17 is broken and SEGVs
# https://github.com/llvm/llvm-project/issues/75168
-#
-# NB2: This clashes with the "retguard" extension of OpenBSD's Clang
-# https://gitlab.com/qemu-project/qemu/-/issues/2278
-if host_os != 'openbsd' and \
- cc.compiles('extern struct { void (*cb)(void); } s; void f(void) { s.cb();
}',
+if cc.compiles('extern struct { void (*cb)(void); } s; void f(void) { s.cb();
}',
name: '-fzero-call-used-regs=used-gpr',
args: ['-O2', '-fzero-call-used-regs=used-gpr'])
hardening_flags += '-fzero-call-used-regs=used-gpr'
--
2.49.0
With regards,
Daniel