aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2025-05-08 16:41:20 +0200
committerThomas Huth <thuth@redhat.com>2025-09-09 09:31:20 +0200
commitb3a51bb30bc72f88231e3b6a63c04eef5c36433c (patch)
treec5cba1b1b04908aa6ea21b53354c8205df43a607
parent180c65c3467f49565ffe26f663a0482717f7d4ea (diff)
downloadqemu-b3a51bb30bc72f88231e3b6a63c04eef5c36433c.zip
qemu-b3a51bb30bc72f88231e3b6a63c04eef5c36433c.tar.gz
qemu-b3a51bb30bc72f88231e3b6a63c04eef5c36433c.tar.bz2
Revert "meson.build: Disable -fzero-call-used-regs on OpenBSD"
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 <brad@comstyle.com> Signed-off-by: Thomas Huth <thuth@redhat.com> Message-ID: <20250508144120.163009-6-thuth@redhat.com>
-rw-r--r--meson.build6
1 files changed, 1 insertions, 5 deletions
diff --git a/meson.build b/meson.build
index fa6186d..3d73873 100644
--- a/meson.build
+++ b/meson.build
@@ -709,11 +709,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'