Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion libffi/.cmake/configure_options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,22 @@ elseif(TARGET_PLATFORM MATCHES ARM.*)

list(APPEND SOURCES_LIST src/arm/ffi.c)
set(TARGETDIR arm)
elseif(TARGET_PLATFORM STREQUAL POWERPC)
# 64-bit ELF (Linux and FreeBSD powerpc64/powerpc64le) only; the sysv
# files from configure.host are for 32-bit powerpc.
list(APPEND SOURCES_LIST
src/powerpc/ffi.c
src/powerpc/ffi_linux64.c
src/powerpc/linux64.S
src/powerpc/linux64_closure.S)
set(TARGETDIR powerpc)
endif()

if(CMAKE_SYSTEM_NAME STREQUAL Darwin AND TARGET_PLATFORM STREQUAL AARCH64)
set(FFI_EXEC_TRAMPOLINE_TABLE 1)
elseif(CMAKE_SYSTEM_NAME STREQUAL Darwin OR TARGET_PLATFORM MATCHES .*FREEBSD.*)
elseif(CMAKE_SYSTEM_NAME MATCHES "^(Darwin|FreeBSD|OpenBSD|SunOS|Android)$")
# Same systems as libffi's configure.ac: memory from malloc is not
# executable there, so closures need the mmap based allocator.
set(FFI_MMAP_EXEC_WRIT 1)
endif()

Expand Down
2 changes: 2 additions & 0 deletions libffi/.cmake/configure_platform.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ if("${TARGET_PLATFORM}" STREQUAL "")
else()
set(TARGET_PLATFORM ARM)
endif()
elseif(HOST_ARCH MATCHES powerpc64.*|ppc64.*)
set(TARGET_PLATFORM POWERPC)
else()
message(FATAL_ERROR "Unknown host.")
endif()
Expand Down