Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libffi] Fix processors #16285

Merged
merged 5 commits into from
Apr 2, 2021
Merged
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
24 changes: 11 additions & 13 deletions ports/libffi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,28 @@ endif()
# config variables for ffi.h.in
set(VERSION 3.3)

set(KNOWN_PROCESSORS x86 x86_64 AMD64 ARM ARM64 i386 armv7l armv7-a aarch64)
set(KNOWN_PROCESSORS x86 x86_64 amd64 arm arm64 i386 armv7l armv7-a aarch64)

if(NOT CMAKE_SYSTEM_PROCESSOR IN_LIST KNOWN_PROCESSORS)
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" lower_system_processor)

if(NOT lower_system_processor IN_LIST KNOWN_PROCESSORS)
message(FATAL_ERROR "Unknown processor: ${CMAKE_SYSTEM_PROCESSOR}")
endif()

if(CMAKE_SYSTEM_PROCESSOR MATCHES "ARM")
set(TARGET ARM)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "armv7l")
set(TARGET ARM)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "armv7-a")
set(TARGET ARM)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
set(TARGET ARM64)
elseif(CMAKE_SYSTEM_NAME MATCHES "BSD" AND CMAKE_SIZEOF_VOID_P EQUAL 4)
set(TARGET X86_FREEBSD)
elseif(CMAKE_SYSTEM_NAME MATCHES "Windows" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
if(CMAKE_SYSTEM_NAME MATCHES "Windows" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
set(TARGET ARM_WIN32)
elseif(CMAKE_SYSTEM_NAME MATCHES "Windows" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
set(TARGET ARM_WIN64)
elseif(CMAKE_SYSTEM_NAME MATCHES "Windows" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
set(TARGET X86_WIN32)
elseif(CMAKE_SYSTEM_NAME MATCHES "Windows" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
set(TARGET X86_WIN64)
elseif(lower_system_processor MATCHES "arm64|aarch64")
set(TARGET ARM64)
elseif(lower_system_processor MATCHES "arm")
set(TARGET ARM)
elseif(CMAKE_SYSTEM_NAME MATCHES "BSD" AND CMAKE_SIZEOF_VOID_P EQUAL 4)
set(TARGET X86_FREEBSD)
elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin" AND CMAKE_SIZEOF_VOID_P EQUAL 4)
set(TARGET X86_DARWIN)
elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
Expand Down
5 changes: 0 additions & 5 deletions ports/libffi/CONTROL

This file was deleted.

7 changes: 7 additions & 0 deletions ports/libffi/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "libffi",
"version": "3.3",
"port-version": 8,
"description": "Portable, high level programming interface to various calling conventions",
"homepage": "https://github.com/libffi/libffi"
}
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2986,7 +2986,7 @@
},
"libffi": {
"baseline": "3.3",
"port-version": 7
"port-version": 8
},
"libflac": {
"baseline": "1.3.3",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libffi.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "ea2ed30397fc14caf66d8f7290306cfc5c5aa424",
"version": "3.3",
"port-version": 8
},
{
"git-tree": "7582c1b20c576263d22b8429155ead9117cc7c95",
"version-string": "3.3",
Expand Down