Skip to content

Commit 2d6d995

Browse files
huthbonzini
authored andcommitted
meson.build: Disable -fzero-call-used-regs on OpenBSD
QEMU currently does not work on OpenBSD since the -fzero-call-used-regs option that we added to meson.build recently does not work with the "retguard" extension from OpenBSD's Clang. Thus let's disable the -fzero-call-used-regs here until there's a better solution available. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2278 Signed-off-by: Thomas Huth <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Message-ID: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent f9a7c44 commit 2d6d995

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

meson.build

+5-1
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,11 @@ hardening_flags = [
562562
#
563563
# NB: Clang 17 is broken and SEGVs
564564
# https://github.com/llvm/llvm-project/issues/75168
565-
if cc.compiles('extern struct { void (*cb)(void); } s; void f(void) { s.cb(); }',
565+
#
566+
# NB2: This clashes with the "retguard" extension of OpenBSD's Clang
567+
# https://gitlab.com/qemu-project/qemu/-/issues/2278
568+
if host_os != 'openbsd' and \
569+
cc.compiles('extern struct { void (*cb)(void); } s; void f(void) { s.cb(); }',
566570
name: '-fzero-call-used-regs=used-gpr',
567571
args: ['-O2', '-fzero-call-used-regs=used-gpr'])
568572
hardening_flags += '-fzero-call-used-regs=used-gpr'

0 commit comments

Comments
 (0)