From ea5d4cf4a55a0ccb7868aef3d6e6ff4984a604d8 Mon Sep 17 00:00:00 2001 From: Piotr Kubaj Date: Tue, 8 Sep 2026 12:00:00 +0200 Subject: [PATCH] cmake: recognize FreeBSD powerpc64le/powerpc64 in get_swift_host_arch get_swift_host_arch() maps CMAKE_SYSTEM_PROCESSOR to a Swift architecture name using the Linux spellings (ppc64le, ppc64). On FreeBSD the processor is reported as powerpc64le / powerpc64, so the PowerPC host was falling through to the "Unrecognized architecture" error. Accept the FreeBSD spellings alongside the existing ones. --- cmake/modules/SwiftSupport.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/modules/SwiftSupport.cmake b/cmake/modules/SwiftSupport.cmake index ef3e9a3..cb409e7 100644 --- a/cmake/modules/SwiftSupport.cmake +++ b/cmake/modules/SwiftSupport.cmake @@ -23,9 +23,9 @@ function(get_swift_host_arch result_var_name) else() set("${result_var_name}" "aarch64" PARENT_SCOPE) endif() - elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "ppc64") + elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "ppc64" OR "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "powerpc64") set("${result_var_name}" "powerpc64" PARENT_SCOPE) - elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "ppc64le") + elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "ppc64le" OR "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "powerpc64le") set("${result_var_name}" "powerpc64le" PARENT_SCOPE) elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "s390x") set("${result_var_name}" "s390x" PARENT_SCOPE)