Skip to content

Commit 617a701

Browse files
committed
Arm64 FreeBSD toolchain should use 'aarch64' arch
1 parent 26dd5c3 commit 617a701

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

cmake/modules/SwiftConfigureSDK.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ macro(configure_sdk_unix name architectures)
417417
message(FATAL_ERROR "unknown arch for ${prefix}: ${arch}")
418418
endif()
419419
elseif("${prefix}" STREQUAL "FREEBSD")
420-
if(NOT arch MATCHES "(arm64|x86_64)")
420+
if(NOT arch MATCHES "(aarch64|arm64|x86_64)")
421421
message(FATAL_ERROR "unsupported arch for FreeBSD: ${arch}")
422422
endif()
423423

stdlib/public/core/CTypes.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ public typealias CLongDouble = Double
116116
#elseif os(FreeBSD)
117117
#if arch(x86_64) || arch(i386)
118118
public typealias CLongDouble = Float80
119+
#elseif arch(arm64)
120+
public typealias CLongDouble = Double
119121
#else
120122
#error("CLongDouble needs to be defined for this FreeBSD architecture")
121123
#endif

utils/build-script-impl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ function should_execute_host_actions_for_phase() {
458458
function verify_host_is_supported() {
459459
local host="$1"
460460
case ${host} in
461-
freebsd-arm64 \
461+
freebsd-aarch64 \
462462
| freebsd-x86_64 \
463463
| openbsd-x86_64 \
464464
| openbsd-aarch64 \

utils/swift_build_support/swift_build_support/targets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ class StdlibDeploymentTarget(object):
290290
"riscv64",
291291
"s390x"])
292292

293-
FreeBSD = Platform("freebsd", archs=["x86_64", "arm64"])
293+
FreeBSD = Platform("freebsd", archs=["x86_64", "aarch64"])
294294

295295
LinuxStatic = Platform('linux-static', sdk_name='LINUX_STATIC', archs=[
296296
'x86_64',
@@ -399,7 +399,7 @@ def host_target():
399399
if machine == 'amd64':
400400
return StdlibDeploymentTarget.FreeBSD.x86_64
401401
elif machine == 'arm64':
402-
return StdlibDeploymentTarget.FreeBSD.arm64
402+
return StdlibDeploymentTarget.FreeBSD.aarch64
403403

404404
elif system == 'OpenBSD':
405405
if machine == 'amd64':

0 commit comments

Comments
 (0)