Revert "meson.build: Disable -fzero-call-used-regs on OpenBSD"

This reverts commit 2d6d995709.

OpenBSD 7.7 fixed the problem with the -fzero-call-used-regs on OpenBSD,
see 03eca72d1e 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>
This commit is contained in:
Thomas Huth 2025-05-08 16:41:20 +02:00
parent 180c65c346
commit b3a51bb30b

View 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'