Since we build TCI with FFI (commit 22f15579fa1 "tcg: Build ffi data
structures for helpers") we get on Darwin:
In file included from ../../tcg/tci.c:22:
In file included from include/tcg/helper-info.h:13:
/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/ffi/ffi.h:483:5:
warning: 'FFI_GO_CLOSURES' is not defined, evaluates to 0 [-Wundef]
483 | #if FFI_GO_CLOSURES
| ^
1 warning generated.
Since this libffi change was committed more than 10 years ago (see
https://github.com/libffi/libffi/commit/e951d64c0852), just define
the missing definition on QEMU to silence the warning.
Reported-by: Stefan Weil <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
---
include/tcg/helper-info.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/tcg/helper-info.h b/include/tcg/helper-info.h
index 909fe73afa3..36bb7f8187f 100644
--- a/include/tcg/helper-info.h
+++ b/include/tcg/helper-info.h
@@ -10,6 +10,9 @@
#define TCG_HELPER_INFO_H
#ifdef CONFIG_TCG_INTERPRETER
+#ifndef FFI_GO_CLOSURES
+#define FFI_GO_CLOSURES 0
+#endif
#include <ffi.h>
#endif
#include "tcg-target-reg-bits.h"
--
2.51.0