Commit 143759e
authored
Fix libffi config header preprocessor definition. (#9159)
- The preprocessor variable FFI_EXEC_TRAMPOLINE_TABLE should be defined
with a value. Either 0 or 1.
- On almost all systems we supported so far this was undefined completely
so it did not cause any issues.
- With `macOS` on `aarch64` systems (like the M1 mac) libffi wants this to
be "on". The CMake configuration was defining it to nothing, i.e.,
```c
#define FFI_EXEC_TRAMPOLINE_TABLE
```
and then compilation fails because the sources contain checks like
```c
#if FFI_EXEC_TRAMPOLINE_TABLE
```
which expect a value.
Always define it either to 0 or 1. If it is to be "defined" it should
be
```c
#if FFI_EXEC_TRAMPOLINE_TABLE 1
```
To be honest I am not sure if I completely understood how libffi wants
to use this variable. But looking at the way their sources use this
variable it seems like this is the right thing to do.
I suspect the autoconf build also has this issue and should probably
be fixed as well.
- Improves #9145.1 parent 68dbffb commit 143759e
1 file changed
+1
-1
lines changed
0 commit comments