]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
Revert "meson.build: Disable -fzero-call-used-regs on OpenBSD"
authorThomas Huth <thuth@redhat.com>
Thu, 8 May 2025 14:41:20 +0000 (16:41 +0200)
committerThomas Huth <thuth@redhat.com>
Tue, 9 Sep 2025 07:31:20 +0000 (09:31 +0200)
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>

meson.build

index fa6186db33435c26d06dce2971a9f536250607e0..3d7387335665c1b9541faf2e375ed5cc2d7d4b3b 100644 (file)
@@ -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'