--- swift-corelibs-foundation/cmake/modules/SwiftSupport.cmake.orig	2024-05-31 00:46:27 UTC
+++ swift-corelibs-foundation/cmake/modules/SwiftSupport.cmake
@@ -24,7 +24,11 @@ function(get_swift_host_arch result_var_name)
   elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "armv7-a")
     set("${result_var_name}" "armv7" PARENT_SCOPE)
   elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "amd64")
-    set("${result_var_name}" "amd64" PARENT_SCOPE)
+    if("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
+      set("${result_var_name}" "x86_64" PARENT_SCOPE)
+    else()
+      set("${result_var_name}" "amd64" PARENT_SCOPE)
+    endif()
   elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "AMD64")
     set("${result_var_name}" "x86_64" PARENT_SCOPE)
   elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "IA64")
