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.
This commit is contained in:
Piotr Kubaj authored and Piotr Kubaj committed 2026-09-08 09:25:01 +02:00
1 parent 899af71c02
commit ea5d4cf4a5
1 file changed
+2 -2
+2 -2
View File
@@ -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)