File tree Expand file tree Collapse file tree 5 files changed +11
-5
lines changed
swift_build_support/swift_build_support Expand file tree Collapse file tree 5 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -429,14 +429,14 @@ macro(configure_sdk_unix name architectures)
429
429
430
430
set (SWIFT_SDK_FREEBSD_ARCH_${arch}_TRIPLE "${arch} -unknown-freebsd${freebsd_system_version} " )
431
431
elseif ("${prefix} " STREQUAL "OPENBSD" )
432
- if (NOT arch STREQUAL "amd64 " )
432
+ if (NOT arch STREQUAL "x86_64" AND NOT arch STREQUAL "aarch64 " )
433
433
message (FATAL_ERROR "unsupported arch for OpenBSD: ${arch} " )
434
434
endif ()
435
435
436
436
set (openbsd_system_version ${CMAKE_SYSTEM_VERSION} )
437
437
message (STATUS "OpenBSD Version: ${openbsd_system_version} " )
438
438
439
- set (SWIFT_SDK_OPENBSD_ARCH_amd64_TRIPLE "amd64 -unknown-openbsd${openbsd_system_version} " )
439
+ set (SWIFT_SDK_OPENBSD_ARCH_${arch}_TRIPLE " ${arch} -unknown-openbsd${openbsd_system_version} " )
440
440
441
441
if (CMAKE_SYSROOT )
442
442
set (SWIFT_SDK_OPENBSD_ARCH_${arch}_PATH "${CMAKE_SYSROOT} ${SWIFT_SDK_OPENBSD_ARCH_${arch} _PATH}" CACHE INTERNAL "sysroot path" FORCE )
Original file line number Diff line number Diff line change @@ -529,6 +529,7 @@ function(_add_target_variant_link_flags)
529
529
list (APPEND link_libraries "pthread" )
530
530
elseif ("${LFLAGS_SDK} " STREQUAL "OPENBSD" )
531
531
list (APPEND link_libraries "pthread" )
532
+ list (APPEND result "-Wl,-Bsymbolic" )
532
533
elseif ("${LFLAGS_SDK} " STREQUAL "CYGWIN" )
533
534
# No extra libraries required.
534
535
elseif ("${LFLAGS_SDK} " STREQUAL "WINDOWS" )
Original file line number Diff line number Diff line change @@ -108,6 +108,8 @@ public typealias CLongDouble = Double
108
108
#elseif os(OpenBSD)
109
109
#if arch(x86_64)
110
110
public typealias CLongDouble = Float80
111
+ #elseif arch(arm64)
112
+ public typealias CLongDouble = Double
111
113
#else
112
114
#error("CLongDouble needs to be defined for this OpenBSD architecture")
113
115
#endif
Original file line number Diff line number Diff line change @@ -459,7 +459,8 @@ function verify_host_is_supported() {
459
459
case ${host} in
460
460
freebsd-arm64 \
461
461
| freebsd-x86_64 \
462
- | openbsd-amd64 \
462
+ | openbsd-x86_64 \
463
+ | openbsd-aarch64 \
463
464
| cygwin-x86_64 \
464
465
| haiku-x86_64 \
465
466
| linux-x86_64 \
Original file line number Diff line number Diff line change @@ -296,7 +296,7 @@ class StdlibDeploymentTarget(object):
296
296
'x86_64' ,
297
297
'aarch64' ])
298
298
299
- OpenBSD = OpenBSDPlatform ("openbsd" , archs = ["amd64 " ])
299
+ OpenBSD = OpenBSDPlatform ("openbsd" , archs = ["x86_64" , "aarch64 " ])
300
300
301
301
Cygwin = Platform ("cygwin" , archs = ["x86_64" ])
302
302
@@ -403,7 +403,9 @@ def host_target():
403
403
404
404
elif system == 'OpenBSD' :
405
405
if machine == 'amd64' :
406
- return StdlibDeploymentTarget .OpenBSD .amd64
406
+ return StdlibDeploymentTarget .OpenBSD .x86_64
407
+ elif machine == 'arm64' :
408
+ return StdlibDeploymentTarget .OpenBSD .aarch64
407
409
408
410
elif system == 'CYGWIN_NT-10.0' :
409
411
if machine == 'x86_64' :
You can’t perform that action at this time.
0 commit comments