diff options
Diffstat (limited to 'lang')
104 files changed, 4163 insertions, 25 deletions
diff --git a/lang/Makefile b/lang/Makefile index 7167c559de66..7d08745b6d77 100644 --- a/lang/Makefile +++ b/lang/Makefile @@ -372,6 +372,7 @@ SUBDIR += squeak SUBDIR += squirrel SUBDIR += starlark-rust + SUBDIR += swift510 SUBDIR += swipl SUBDIR += tauthon SUBDIR += tcbasic diff --git a/lang/erlang-runtime27/Makefile b/lang/erlang-runtime27/Makefile index 7620f8f688de..918e6f02d684 100644 --- a/lang/erlang-runtime27/Makefile +++ b/lang/erlang-runtime27/Makefile @@ -1,7 +1,6 @@ PORTNAME= erlang DISTVERSIONPREFIX= OTP- -DISTVERSION= 27.3.4 -PORTREVISION= 1 +DISTVERSION= 27.3.4.1 CATEGORIES= lang parallel java PKGNAMESUFFIX= -runtime${PORTVERSION:C/\..*//} DIST_SUBDIR= erlang @@ -95,7 +94,7 @@ CFLAGS+= -DMAP_NORESERVE=0 .endif .if ${ARCH} == i386 -MAKE_ARGS+= ARCH=x86 +MAKE_ARGS+= ARCH=x86 CONFIGURE_ARGS+= --disable-year2038 .endif diff --git a/lang/erlang-runtime27/distinfo b/lang/erlang-runtime27/distinfo index 1b2187e11c72..511fed3bfbf1 100644 --- a/lang/erlang-runtime27/distinfo +++ b/lang/erlang-runtime27/distinfo @@ -1,5 +1,5 @@ -TIMESTAMP = 1747434437 -SHA256 (erlang/erlang-otp-OTP-27.3.4_GH0.tar.gz) = a05fa5c952fdf1718121d4ca3fd0c96fcb8b54ed61e37862417478d7b6c89232 -SIZE (erlang/erlang-otp-OTP-27.3.4_GH0.tar.gz) = 62259420 +TIMESTAMP = 1750579451 +SHA256 (erlang/erlang-otp-OTP-27.3.4.1_GH0.tar.gz) = fe6e1dcbd1d3113767e0bcae2ef980317284544158f4a270a9266f7a320ad1c4 +SIZE (erlang/erlang-otp-OTP-27.3.4.1_GH0.tar.gz) = 62274778 SHA256 (erlang/erlang-corba-5.2.1_GH0.tar.gz) = e96e9dc710c0ab3282ca5045434f5bc5ff493c22ba63fcfd764ce4d6a13a7c8f SIZE (erlang/erlang-corba-5.2.1_GH0.tar.gz) = 1400553 diff --git a/lang/erlang-runtime28/Makefile b/lang/erlang-runtime28/Makefile index 640094b46e3c..96fcac5456c0 100644 --- a/lang/erlang-runtime28/Makefile +++ b/lang/erlang-runtime28/Makefile @@ -1,7 +1,6 @@ PORTNAME= erlang DISTVERSIONPREFIX= OTP- -DISTVERSION= 28.0 -PORTREVISION= 6 +DISTVERSION= 28.0.1 CATEGORIES= lang parallel java PKGNAMESUFFIX= -runtime${PORTVERSION:C/\..*//} DIST_SUBDIR= erlang diff --git a/lang/erlang-runtime28/distinfo b/lang/erlang-runtime28/distinfo index 42490236d9bd..b96644a5b069 100644 --- a/lang/erlang-runtime28/distinfo +++ b/lang/erlang-runtime28/distinfo @@ -1,5 +1,5 @@ -TIMESTAMP = 1747839017 -SHA256 (erlang/erlang-otp-OTP-28.0_GH0.tar.gz) = d26f21b6af2f8833291afee077c7a50cfbdcfa880fe3e289c6cb6df15c1953d1 -SIZE (erlang/erlang-otp-OTP-28.0_GH0.tar.gz) = 63814863 +TIMESTAMP = 1750579458 +SHA256 (erlang/erlang-otp-OTP-28.0.1_GH0.tar.gz) = a5c66958a0b9382f65345638c2cc146239721237db842bb8856a4792800dfd46 +SIZE (erlang/erlang-otp-OTP-28.0.1_GH0.tar.gz) = 63831234 SHA256 (erlang/erlang-corba-5.2.1_GH0.tar.gz) = e96e9dc710c0ab3282ca5045434f5bc5ff493c22ba63fcfd764ce4d6a13a7c8f SIZE (erlang/erlang-corba-5.2.1_GH0.tar.gz) = 1400553 diff --git a/lang/ghc/distinfo b/lang/ghc/distinfo index 07b2ca3d1090..580b61c0b40b 100644 --- a/lang/ghc/distinfo +++ b/lang/ghc/distinfo @@ -1,4 +1,4 @@ -TIMESTAMP = 1746980342 +TIMESTAMP = 1746980343 SHA256 (ghc-9.8.4-src.tar.xz) = 17e8188f3c8a5c2f73fb4e35d01032e8dc258835ec876d52c8ad8ee3d24b2fc5 SIZE (ghc-9.8.4-src.tar.xz) = 32615492 SHA256 (ghc-9.6.7-src.tar.xz) = d053bf6ce1d588a75cfe8c9316269486e9d8fb89dcdf6fd92836fa2e3df61305 @@ -15,8 +15,8 @@ SHA256 (hadrian-9.6.7-boot.tar.gz) = f81dc59b4aef59c62c645da7be0b1fb8720aba338c8 SIZE (hadrian-9.6.7-boot.tar.gz) = 1495514 SHA256 (hadrian-9.4.8-boot.tar.gz) = 5eb060655686921b086645dcbdd6268f09bc66baf8cc76fce74dea9b8b55ab5d SIZE (hadrian-9.4.8-boot.tar.gz) = 1495586 -SHA256 (hadrian-9.2.8-boot.tar.gz) = 730412e1c17309670075be8f76dbca9ebadedfa10b758e605f9e67804e9e8ac5 -SIZE (hadrian-9.2.8-boot.tar.gz) = 1473009 +SHA256 (hadrian-9.2.8-boot.tar.gz) = 21a5154159dd89c09246646c82b5ccfc0c0963d45459cb0e59709a549272c8c7 +SIZE (hadrian-9.2.8-boot.tar.gz) = 1495573 SHA256 (ghc-9.6.7-boot-amd64-freebsd.tar.xz) = d55285c5998f3f040f52e159bc3b381ddd969a64670bf6630838fde2a84eb7c6 SIZE (ghc-9.6.7-boot-amd64-freebsd.tar.xz) = 125512852 SHA256 (ghc-9.2.8-boot-amd64-freebsd.tar.xz) = 8b172a963e316a57906edb7914be765021337a685e578bc3303db072aee3eb16 diff --git a/lang/ghc92/Makefile b/lang/ghc92/Makefile index 1b38789da16f..c437b0dea4c9 100644 --- a/lang/ghc92/Makefile +++ b/lang/ghc92/Makefile @@ -18,16 +18,11 @@ BASE_PACKAGES= Cabal-3.6.3.0 array-0.5.4.0 base-4.16.4.0 binary-0.8.9.0 \ process-1.6.16.0 stm-2.5.0.2 template-haskell-2.18.0.0 \ terminfo-0.4.1.5 text-1.2.5.0 time-1.11.1.1 \ transformers-0.5.6.2 unix-2.7.2.2 xhtml-3000.2.2.1 -BOOT_GHC_VERSION= 8.10.7 -BOOT_LLVM_VERSION= 11 +BOOT_GHC_VERSION= 9.2.8 +BOOT_LLVM_VERSION= 12 MASTERDIR= ${.CURDIR}/../ghc PATCHDIR= ${.CURDIR}/files # PLIST for this port is set in the master one .include "${MASTERDIR}/Makefile" - -# This version of ncurses is needed by bootstrap compiler -.if empty(PORT_OPTIONS:MBOOT) -BUILD_DEPENDS+= ${LOCALBASE}/lib/compat/libncursesw.so.8:misc/compat12x -.endif diff --git a/lang/lfortran/Makefile b/lang/lfortran/Makefile index 936b6ca55427..f26e6cc66d7c 100644 --- a/lang/lfortran/Makefile +++ b/lang/lfortran/Makefile @@ -1,6 +1,6 @@ PORTNAME= lfortran DISTVERSIONPREFIX= v -DISTVERSION= 0.52.0 +DISTVERSION= 0.53.0 CATEGORIES= lang MAINTAINER= fortran@FreeBSD.org diff --git a/lang/lfortran/distinfo b/lang/lfortran/distinfo index 4896b64cb248..c19d6b369b1d 100644 --- a/lang/lfortran/distinfo +++ b/lang/lfortran/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1747584033 -SHA256 (lfortran-lfortran-v0.52.0_GH0.tar.gz) = 4f952fdf9d09b59073bbcbc5a50b8f50d0332b7552c7db269a5a552c05b1ecd9 -SIZE (lfortran-lfortran-v0.52.0_GH0.tar.gz) = 3248917 +TIMESTAMP = 1750594722 +SHA256 (lfortran-lfortran-v0.53.0_GH0.tar.gz) = 6ee479946db2c76dc63cedccf84988efb917f512d2affce52fd76274d9c545ef +SIZE (lfortran-lfortran-v0.53.0_GH0.tar.gz) = 3329926 diff --git a/lang/swift510/Makefile b/lang/swift510/Makefile new file mode 100644 index 000000000000..72b367b418f8 --- /dev/null +++ b/lang/swift510/Makefile @@ -0,0 +1,108 @@ +PORTNAME= swift510 +DISTVERSION= 5.10.1 +CATEGORIES= lang +DIST_SUBDIR= ${PORTNAME} + +MAINTAINER= jgopensource@proton.me +COMMENT= Swift programming language +WWW= https://www.swift.org/ + +ONLY_FOR_ARCHS= aarch64 amd64 + +BUILD_DEPENDS= bash:shells/bash \ + cmake-core>=3.19.6:devel/cmake-core +LIB_DEPENDS= libcurl.so:ftp/curl \ + libicuuc.so:devel/icu \ + libuuid.so:misc/e2fsprogs-libuuid \ + libxml2.so:textproc/libxml2 \ + libzstd.so:archivers/zstd + +USES= libedit ninja:build perl5 pkgconfig python:3.6+ \ + shebangfix sqlite:3 +USE_GITHUB= nodefault +# The common tag which applies to most repos. +tag= swift-${DISTVERSION}-RELEASE +GH_TUPLE=\ + swiftlang:indexstore-db:${tag}:indexstore_db/indexstore-db \ + swiftlang:llvm-project:${tag}:llvm_project/llvm-project \ + swiftlang:sourcekit-lsp:${tag}:sourcekit_lsp/sourcekit-lsp \ + swiftlang:swift:${tag}:swift/swift \ + swiftlang:swift-cmark:${tag}:swift_cmark/cmark \ + swiftlang:swift-corelibs-foundation:${tag}:swift_corelibs_foundation/swift-corelibs-foundation \ + swiftlang:swift-corelibs-libdispatch:${tag}:swift_corelibs_libdispatch/swift-corelibs-libdispatch \ + swiftlang:swift-corelibs-xctest:${tag}:swift_corelibs_xctest/swift-corelibs-xctest \ + swiftlang:swift-docc:${tag}:swift_docc/swift-docc \ + swiftlang:swift-docc-symbolkit:${tag}:swift_docc_symbolkit/swift-docc-symbolkit \ + swiftlang:swift-driver:${tag}:swift_driver/swift-driver \ + swiftlang:swift-experimental-string-processing:${tag}:swift_experimental_string_processing/swift-experimental-string-processing \ + swiftlang:swift-format:${tag}:swift_format/swift-format \ + swiftlang:swift-llbuild:${tag}:llbuild/llbuild \ + swiftlang:swift-lmdb:${tag}:swift_lmdb/swift-lmdb \ + swiftlang:swift-markdown:${tag}:swift_markdown/swift-markdown \ + swiftlang:swift-package-manager:${tag}:swiftpm/swiftpm \ + swiftlang:swift-stress-tester:${tag}:swift_stress_tester/swift-stress-tester \ + swiftlang:swift-syntax:${tag}:swift_syntax/swift-syntax \ + swiftlang:swift-tools-support-core:${tag}:swift_tools_support_core/swift-tools-support-core +GH_TUPLE+=\ + apple:swift-argument-parser:1.2.3:swift_argument_parser/swift-argument-parser \ + apple:swift-asn1:1.0.0:swift_asn1/swift-asn1 \ + apple:swift-certificates:1.0.1:swift_certificates/swift-certificates \ + apple:swift-collections:1.0.1:swift_collections/swift-collections \ + apple:swift-crypto:3.0.0:swift_crypto/swift-crypto \ + apple:swift-nio:2.31.2:swift_nio/swift-nio \ + apple:swift-system:1.1.1:swift_system/swift-system +GH_TUPLE+=jpsim:Yams:5.0.1:yams/yams +USE_PERL5= build + +SHEBANG_FILES=\ + swift/utils/api_checker/sdk-module-lists/infer-imports.py \ + swift/utils/api_checker/swift-api-checker.py \ + swift/utils/build-script \ + swift/utils/swift-api-dump.py \ + swift-driver/Utilities/build-script-helper.py \ + swiftpm/Utilities/bootstrap \ + +CONFLICTS= libdispatch-[0-9]* + +value_for_aarch64= aarch64 +value_for_amd64= x86_64 +swift_arch= ${value_for_${ARCH}} +early_stage_dir= ${WRKDIR}/EarlyStageDir +swift_install_prefix= ${PREFIX}/${PORTNAME} +MANDIRS= ${swift_install_prefix}/share/man + +SUB_FILES= pkg-message +SUB_LIST= SWIFT_INSTALL_PREFIX=${swift_install_prefix} + +WRKSRC= ${WRKDIR}/swift-project + +PLIST_SUB= SWIFT_ARCH=${swift_arch} \ + SWIFT_TARGET_TRIPLE=${swift_arch}-unknown-freebsd${OSREL} + +.include <bsd.port.pre.mk> + +.if ${OSVERSION} >= 1304500 && ${OSVERSION} <= 1305502 +BROKEN= Unbuildable due to a problem with libc++. See <https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=286342> +.endif + +pre-patch: + @${MKDIR} ${WRKSRC}/llbuild/lib/LLBSQLite3 + +post-patch: + @${SED} -E -e 's@^python3=python3$$@python3=${PYTHON_CMD}@' -i .bak ${WRKSRC}/swift/utils/build-script-impl + +do-build: + @${MKDIR} ${early_stage_dir} + @${SH} ${FILESDIR}/start-build.sh ${WRKSRC} ${early_stage_dir} ${swift_install_prefix} ${WRKDIR}/clang-module-cache + +do-install: + @${FIND} ${early_stage_dir}${swift_install_prefix}/bin -type f -not -name '*.py' -not -name '*.sh' -not -name '*.txt' -exec ${STRIP_CMD} '{}' ';' ; \ + ${FIND} ${early_stage_dir}${swift_install_prefix} -type f -name '*.so*' -exec ${STRIP_CMD} '{}' ';' ; \ + cd ${early_stage_dir} ; \ + ${COPYTREE_BIN} .${swift_install_prefix}/bin ${STAGEDIR} ; \ + for subdir in include lib local share; do \ + ${COPYTREE_SHARE} .${swift_install_prefix}/$${subdir} ${STAGEDIR} ; \ + done ; \ + ${RM} ${STAGEDIR}/var/run/libuuid/* + +.include <bsd.port.post.mk> diff --git a/lang/swift510/distinfo b/lang/swift510/distinfo new file mode 100644 index 000000000000..390bbe67277c --- /dev/null +++ b/lang/swift510/distinfo @@ -0,0 +1,57 @@ +TIMESTAMP = 1744804731 +SHA256 (swift510/swiftlang-indexstore-db-swift-5.10.1-RELEASE_GH0.tar.gz) = 8be52307236e21e942972417fd3c8182a7865757f7890eec167851c75d156996 +SIZE (swift510/swiftlang-indexstore-db-swift-5.10.1-RELEASE_GH0.tar.gz) = 909365 +SHA256 (swift510/swiftlang-llvm-project-swift-5.10.1-RELEASE_GH0.tar.gz) = fad2de34c6c005b7bc63ce7b4f20d6cdf0e1d60109a7a589ffd782180c23102b +SIZE (swift510/swiftlang-llvm-project-swift-5.10.1-RELEASE_GH0.tar.gz) = 171145818 +SHA256 (swift510/swiftlang-sourcekit-lsp-swift-5.10.1-RELEASE_GH0.tar.gz) = f83aabe6e66adc2d3ffb7e948ddfd805f7f58fd43c6b33d48bb4a50186ce0abb +SIZE (swift510/swiftlang-sourcekit-lsp-swift-5.10.1-RELEASE_GH0.tar.gz) = 301167 +SHA256 (swift510/swiftlang-swift-swift-5.10.1-RELEASE_GH0.tar.gz) = 087c59a1b79c46dd23f8e6cb4fe12a27935a5b6581282f48db952827bb3fdf57 +SIZE (swift510/swiftlang-swift-swift-5.10.1-RELEASE_GH0.tar.gz) = 31977733 +SHA256 (swift510/swiftlang-swift-cmark-swift-5.10.1-RELEASE_GH0.tar.gz) = 6d209b8bf81fe0d67ae6d55913e7750ec752bc7fc29fc0ef5da2fdf8a6057406 +SIZE (swift510/swiftlang-swift-cmark-swift-5.10.1-RELEASE_GH0.tar.gz) = 311407 +SHA256 (swift510/swiftlang-swift-corelibs-foundation-swift-5.10.1-RELEASE_GH0.tar.gz) = 94dadc18f527f25cf1ce486d0ddce7de00f725063bc43526bdb73e534c8d97c3 +SIZE (swift510/swiftlang-swift-corelibs-foundation-swift-5.10.1-RELEASE_GH0.tar.gz) = 4479830 +SHA256 (swift510/swiftlang-swift-corelibs-libdispatch-swift-5.10.1-RELEASE_GH0.tar.gz) = affa3544b0fdb60f8f175bc0d2846177436d5848ef8ca73e3e560d23986f38b3 +SIZE (swift510/swiftlang-swift-corelibs-libdispatch-swift-5.10.1-RELEASE_GH0.tar.gz) = 594770 +SHA256 (swift510/swiftlang-swift-corelibs-xctest-swift-5.10.1-RELEASE_GH0.tar.gz) = cec269b435a9f32edcf90958abec16fcf50febcb99e389ed56e9e692c3270e27 +SIZE (swift510/swiftlang-swift-corelibs-xctest-swift-5.10.1-RELEASE_GH0.tar.gz) = 85377 +SHA256 (swift510/swiftlang-swift-docc-swift-5.10.1-RELEASE_GH0.tar.gz) = 1712b83aef420815e0cae2c10e43012435b249e3d138b2a6700adb18b4fc5b81 +SIZE (swift510/swiftlang-swift-docc-swift-5.10.1-RELEASE_GH0.tar.gz) = 16281601 +SHA256 (swift510/swiftlang-swift-docc-symbolkit-swift-5.10.1-RELEASE_GH0.tar.gz) = 2675a9faa010623e9252f84cefc82fbce217a6f3860c7495311cb9bdffa82159 +SIZE (swift510/swiftlang-swift-docc-symbolkit-swift-5.10.1-RELEASE_GH0.tar.gz) = 171631 +SHA256 (swift510/swiftlang-swift-driver-swift-5.10.1-RELEASE_GH0.tar.gz) = 75530eab66f4dffb9cecf422d0c5e582f08f84c8289ce245d48010e73ad1fc71 +SIZE (swift510/swiftlang-swift-driver-swift-5.10.1-RELEASE_GH0.tar.gz) = 2444415 +SHA256 (swift510/swiftlang-swift-experimental-string-processing-swift-5.10.1-RELEASE_GH0.tar.gz) = 7e6ea60653b580abaf0801d697971610e7e22b4eb427edcee486b741b14d2724 +SIZE (swift510/swiftlang-swift-experimental-string-processing-swift-5.10.1-RELEASE_GH0.tar.gz) = 2579674 +SHA256 (swift510/swiftlang-swift-format-swift-5.10.1-RELEASE_GH0.tar.gz) = 1e204fed64ef34217cc871b49a18ab4ddca4930945ac5f564723aadc3daf0bc5 +SIZE (swift510/swiftlang-swift-format-swift-5.10.1-RELEASE_GH0.tar.gz) = 253210 +SHA256 (swift510/swiftlang-swift-llbuild-swift-5.10.1-RELEASE_GH0.tar.gz) = 64d135c1aaf96636b0ff6a2682e605474fe9e33f740a8ba2a3c469e2c8ae9f38 +SIZE (swift510/swiftlang-swift-llbuild-swift-5.10.1-RELEASE_GH0.tar.gz) = 7092051 +SHA256 (swift510/swiftlang-swift-lmdb-swift-5.10.1-RELEASE_GH0.tar.gz) = fd9279b0a007f7c09bc28c614ecd0b055642aa3b08caeee607ca2c4904881ead +SIZE (swift510/swiftlang-swift-lmdb-swift-5.10.1-RELEASE_GH0.tar.gz) = 153468 +SHA256 (swift510/swiftlang-swift-markdown-swift-5.10.1-RELEASE_GH0.tar.gz) = 568335f685b65f941edbb6771b4d13172ab8a538bf57a040bf8b61cf5717ac10 +SIZE (swift510/swiftlang-swift-markdown-swift-5.10.1-RELEASE_GH0.tar.gz) = 107990 +SHA256 (swift510/swiftlang-swift-package-manager-swift-5.10.1-RELEASE_GH0.tar.gz) = 3d35e35b6e7a061042d3cd4913030525462faa357901a91a2d2f037d12e5987c +SIZE (swift510/swiftlang-swift-package-manager-swift-5.10.1-RELEASE_GH0.tar.gz) = 1522538 +SHA256 (swift510/swiftlang-swift-stress-tester-swift-5.10.1-RELEASE_GH0.tar.gz) = d5ef9fa05b28f773423a77caed1687f0744b01627fce50989c9ef09f76211c06 +SIZE (swift510/swiftlang-swift-stress-tester-swift-5.10.1-RELEASE_GH0.tar.gz) = 97998 +SHA256 (swift510/swiftlang-swift-syntax-swift-5.10.1-RELEASE_GH0.tar.gz) = 500ff2c6d9435311fa42ad2e87927a3025b6c3682c18ecb9710c522c0be52a53 +SIZE (swift510/swiftlang-swift-syntax-swift-5.10.1-RELEASE_GH0.tar.gz) = 1142270 +SHA256 (swift510/swiftlang-swift-tools-support-core-swift-5.10.1-RELEASE_GH0.tar.gz) = fbc2d5dcf4eb27e7e786a19559e4ab5af6469238e3e89b910511145874bdfc52 +SIZE (swift510/swiftlang-swift-tools-support-core-swift-5.10.1-RELEASE_GH0.tar.gz) = 240649 +SHA256 (swift510/apple-swift-argument-parser-1.2.3_GH0.tar.gz) = 4a10bbef290a2167c5cc340b39f1f7ff6a8cf4e1b5433b68548bf5f1e542e908 +SIZE (swift510/apple-swift-argument-parser-1.2.3_GH0.tar.gz) = 645638 +SHA256 (swift510/apple-swift-asn1-1.0.0_GH0.tar.gz) = e0da995ae53e6fcf8251887f44d4030f6600e2f8f8451d9c92fcaf52b41b6c35 +SIZE (swift510/apple-swift-asn1-1.0.0_GH0.tar.gz) = 72780 +SHA256 (swift510/apple-swift-certificates-1.0.1_GH0.tar.gz) = fcaca458aab45ee69b0f678b72c2194b15664cc5f6f5e48d0e3f62bc5d1202ca +SIZE (swift510/apple-swift-certificates-1.0.1_GH0.tar.gz) = 456979 +SHA256 (swift510/apple-swift-collections-1.0.1_GH0.tar.gz) = 575cf0f88d9068411f9acc6e3ca5d542bef1cc9e87dc5d69f7b5a1d5aec8c6b6 +SIZE (swift510/apple-swift-collections-1.0.1_GH0.tar.gz) = 3787804 +SHA256 (swift510/apple-swift-crypto-3.0.0_GH0.tar.gz) = 5c860c0306d0393ff06268f361aaf958656e1288353a0e23c3ad20de04319154 +SIZE (swift510/apple-swift-crypto-3.0.0_GH0.tar.gz) = 6840005 +SHA256 (swift510/apple-swift-nio-2.31.2_GH0.tar.gz) = 8818b8e991d36e886b207ae1023fa43c5eada7d6a1951a52ad70f7f71f57d9fe +SIZE (swift510/apple-swift-nio-2.31.2_GH0.tar.gz) = 761397 +SHA256 (swift510/apple-swift-system-1.1.1_GH0.tar.gz) = 865b8c380455eef27e73109835142920c60ae4c4f4178a3d12ad04acc83f1371 +SIZE (swift510/apple-swift-system-1.1.1_GH0.tar.gz) = 69981 +SHA256 (swift510/jpsim-Yams-5.0.1_GH0.tar.gz) = ec1ad699c30f0db45520006c63a88cc1c946a7d7b36dff32a96460388c0a4af2 +SIZE (swift510/jpsim-Yams-5.0.1_GH0.tar.gz) = 658324 diff --git a/lang/swift510/files/patch-llbuild_Package.swift b/lang/swift510/files/patch-llbuild_Package.swift new file mode 100644 index 000000000000..e4621f4e7a7b --- /dev/null +++ b/lang/swift510/files/patch-llbuild_Package.swift @@ -0,0 +1,33 @@ +--- llbuild/Package.swift.orig 2024-01-09 06:44:05 UTC ++++ llbuild/Package.swift +@@ -71,6 +71,13 @@ let package = Package( + exclude: [] + ), + ++ // MARK: sqlite3 as a system library ++ .systemLibrary( ++ name: "LLBSQLite3", ++ path: "lib/LLBSQLite3", ++ pkgConfig: "sqlite3" ++ ), ++ + // MARK: Components + + .target( +@@ -80,7 +87,7 @@ let package = Package( + ), + .target( + name: "llbuildCore", +- dependencies: ["llbuildBasic"], ++ dependencies: ["llbuildBasic", "LLBSQLite3"], + path: "lib/Core", + linkerSettings: [.linkedLibrary("sqlite3")] + ), +@@ -227,6 +234,7 @@ let package = Package( + path: "lib/llvm/Support", + linkerSettings: [ + .linkedLibrary("m", .when(platforms: [.linux])), ++ .linkedLibrary("execinfo"), + .linkedLibrary("ncurses", .when(platforms: [.linux, .macOS, .android]))] + ), + ], diff --git a/lang/swift510/files/patch-llbuild_include_llvm_Config_config.h b/lang/swift510/files/patch-llbuild_include_llvm_Config_config.h new file mode 100644 index 000000000000..94ba8c26ee4c --- /dev/null +++ b/lang/swift510/files/patch-llbuild_include_llvm_Config_config.h @@ -0,0 +1,11 @@ +--- llbuild/include/llvm/Config/config.h.orig 2024-01-09 06:44:05 UTC ++++ llbuild/include/llvm/Config/config.h +@@ -131,7 +131,7 @@ + /* #undef HAVE_LSEEK64 */ + + /* Define to 1 if you have the `mallctl' function. */ +-/* #undef HAVE_MALLCTL */ ++#define HAVE_MALLCTL 1 + + /* Define to 1 if you have the `mallinfo' function. */ + /* #undef HAVE_MALLINFO */ diff --git a/lang/swift510/files/patch-llbuild_lib_LLBSQLite3_module.modulemap b/lang/swift510/files/patch-llbuild_lib_LLBSQLite3_module.modulemap new file mode 100644 index 000000000000..20e392f38485 --- /dev/null +++ b/lang/swift510/files/patch-llbuild_lib_LLBSQLite3_module.modulemap @@ -0,0 +1,8 @@ +--- llbuild/lib/LLBSQLite3/module.modulemap.orig 2025-01-01 00:00:00 UTC ++++ llbuild/lib/LLBSQLite3/module.modulemap +@@ -0,0 +1,5 @@ ++module LLBSQLite3 [system] { ++ header "sqlite.h" ++ link "sqlite3" ++ export * ++} diff --git a/lang/swift510/files/patch-llbuild_lib_LLBSQLite3_sqlite.h b/lang/swift510/files/patch-llbuild_lib_LLBSQLite3_sqlite.h new file mode 100644 index 000000000000..7ae3d43f097f --- /dev/null +++ b/lang/swift510/files/patch-llbuild_lib_LLBSQLite3_sqlite.h @@ -0,0 +1,17 @@ +--- llbuild/lib/LLBSQLite3/sqlite.h.orig 2025-01-01 00:00:00 UTC ++++ llbuild/lib/LLBSQLite3/sqlite.h +@@ -0,0 +1,14 @@ ++//===----------------------------------------------------------------------===// ++// ++// This source file is part of the Swift open source project ++// ++// Copyright (c) 2014-2020 Apple Inc. and the Swift project authors ++// Licensed under Apache License v2.0 with Runtime Library Exception ++// ++// See http://swift.org/LICENSE.txt for license information ++// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors ++// ++//===----------------------------------------------------------------------===// ++ ++#pragma once ++#include <sqlite3.h> diff --git a/lang/swift510/files/patch-llbuild_utils_adjust-times_adjust-times.cpp b/lang/swift510/files/patch-llbuild_utils_adjust-times_adjust-times.cpp new file mode 100644 index 000000000000..405d2a985382 --- /dev/null +++ b/lang/swift510/files/patch-llbuild_utils_adjust-times_adjust-times.cpp @@ -0,0 +1,11 @@ +--- llbuild/utils/adjust-times/adjust-times.cpp.orig 2024-01-09 06:44:05 UTC ++++ llbuild/utils/adjust-times/adjust-times.cpp +@@ -50,7 +50,7 @@ static int file_time_set_fixed(const char* filename, s + struct timeval times[2] = { tv, tv }; + return utimes(filename, times); + } +-#elif defined __linux__ ++#elif defined __linux__ || defined(__FreeBSD__) + struct timespec times[2] = { time_to_set, time_to_set }; + return utimensat(AT_FDCWD, filename, times, 0); + #else diff --git a/lang/swift510/files/patch-llvm-project_clang_tools_IndexStore_IndexStore.exports b/lang/swift510/files/patch-llvm-project_clang_tools_IndexStore_IndexStore.exports new file mode 100644 index 000000000000..5c7f5c4c371e --- /dev/null +++ b/lang/swift510/files/patch-llvm-project_clang_tools_IndexStore_IndexStore.exports @@ -0,0 +1,42 @@ +--- llvm-project/clang/tools/IndexStore/IndexStore.exports.orig 2024-05-24 18:46:43 UTC ++++ llvm-project/clang/tools/IndexStore/IndexStore.exports +@@ -10,9 +10,7 @@ indexstore_store_get_unit_name_from_output_path + indexstore_store_dispose + indexstore_store_get_unit_modification_time + indexstore_store_get_unit_name_from_output_path +-indexstore_store_units_apply + indexstore_store_units_apply_f +-indexstore_store_set_unit_event_handler + indexstore_store_set_unit_event_handler_f + indexstore_store_start_unit_event_listening + indexstore_store_stop_unit_event_listening +@@ -33,19 +31,13 @@ indexstore_occurrence_get_line_col + indexstore_occurrence_get_symbol + indexstore_occurrence_get_roles + indexstore_occurrence_get_line_col +-indexstore_occurrence_relations_apply + indexstore_occurrence_relations_apply_f + indexstore_record_reader_create + indexstore_record_reader_dispose +-indexstore_record_reader_search_symbols + indexstore_record_reader_search_symbols_f +-indexstore_record_reader_symbols_apply + indexstore_record_reader_symbols_apply_f +-indexstore_record_reader_occurrences_apply + indexstore_record_reader_occurrences_apply_f +-indexstore_record_reader_occurrences_in_line_range_apply + indexstore_record_reader_occurrences_in_line_range_apply_f +-indexstore_record_reader_occurrences_of_symbols_apply + indexstore_record_reader_occurrences_of_symbols_apply_f + indexstore_unit_dependency_get_kind + indexstore_unit_dependency_get_filepath +@@ -68,9 +60,7 @@ indexstore_unit_reader_get_target + indexstore_unit_reader_get_output_file + indexstore_unit_reader_get_sysroot_path + indexstore_unit_reader_get_target +-indexstore_unit_reader_dependencies_apply + indexstore_unit_reader_dependencies_apply_f +-indexstore_unit_reader_includes_apply + indexstore_unit_reader_includes_apply_f + indexstore_unit_reader_has_main_file + indexstore_unit_reader_is_debug_compilation diff --git a/lang/swift510/files/patch-llvm-project_compiler-rt_cmake_config-ix.cmake b/lang/swift510/files/patch-llvm-project_compiler-rt_cmake_config-ix.cmake new file mode 100644 index 000000000000..68b83511e683 --- /dev/null +++ b/lang/swift510/files/patch-llvm-project_compiler-rt_cmake_config-ix.cmake @@ -0,0 +1,13 @@ +--- llvm-project/compiler-rt/cmake/config-ix.cmake.orig 2024-05-24 18:46:43 UTC ++++ llvm-project/compiler-rt/cmake/config-ix.cmake +@@ -237,6 +237,10 @@ test_targets() + + test_targets() + ++if(COMPILER_RT_SUPPORTED_ARCH) ++ list(REMOVE_ITEM COMPILER_RT_SUPPORTED_ARCH i386) ++endif() ++ + # Returns a list of architecture specific target cflags in @out_var list. + function(get_target_flags_for_arch arch out_var) + list(FIND COMPILER_RT_SUPPORTED_ARCH ${arch} ARCH_INDEX) diff --git a/lang/swift510/files/patch-llvm-project_compiler-rt_lib_tsan_dd_CMakeLists.txt b/lang/swift510/files/patch-llvm-project_compiler-rt_lib_tsan_dd_CMakeLists.txt new file mode 100644 index 000000000000..e0bc673735d5 --- /dev/null +++ b/lang/swift510/files/patch-llvm-project_compiler-rt_lib_tsan_dd_CMakeLists.txt @@ -0,0 +1,11 @@ +--- llvm-project/compiler-rt/lib/tsan/dd/CMakeLists.txt.orig 2024-05-24 18:46:43 UTC ++++ llvm-project/compiler-rt/lib/tsan/dd/CMakeLists.txt +@@ -23,7 +23,7 @@ set_target_properties(dd PROPERTIES FOLDER "Compiler-R + set_target_properties(dd PROPERTIES FOLDER "Compiler-RT Misc") + + # Deadlock detector is currently supported on 64-bit Linux only. +-if(CAN_TARGET_x86_64 AND UNIX AND NOT APPLE AND NOT ANDROID) ++if(FALSE) + set(arch "x86_64") + add_compiler_rt_runtime(clang_rt.dd + STATIC diff --git a/lang/swift510/files/patch-swift-asn1_cmake_modules_SwiftSupport.cmake b/lang/swift510/files/patch-swift-asn1_cmake_modules_SwiftSupport.cmake new file mode 100644 index 000000000000..6f7457b09293 --- /dev/null +++ b/lang/swift510/files/patch-swift-asn1_cmake_modules_SwiftSupport.cmake @@ -0,0 +1,15 @@ +--- swift-asn1/cmake/modules/SwiftSupport.cmake.orig 2023-09-18 10:20:51 UTC ++++ swift-asn1/cmake/modules/SwiftSupport.cmake +@@ -42,6 +42,12 @@ function(get_swift_host_arch result_var_name) + set("${result_var_name}" "armv7" PARENT_SCOPE) + elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "AMD64") + set("${result_var_name}" "x86_64" PARENT_SCOPE) ++ elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "amd64") ++ 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 "IA64") + set("${result_var_name}" "itanium" PARENT_SCOPE) + elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86") diff --git a/lang/swift510/files/patch-swift-certificates_cmake_modules_SwiftSupport.cmake b/lang/swift510/files/patch-swift-certificates_cmake_modules_SwiftSupport.cmake new file mode 100644 index 000000000000..98f5546321e8 --- /dev/null +++ b/lang/swift510/files/patch-swift-certificates_cmake_modules_SwiftSupport.cmake @@ -0,0 +1,15 @@ +--- swift-certificates/cmake/modules/SwiftSupport.cmake.orig 2023-09-25 17:11:14 UTC ++++ swift-certificates/cmake/modules/SwiftSupport.cmake +@@ -42,6 +42,12 @@ function(get_swift_host_arch result_var_name) + set("${result_var_name}" "armv7" PARENT_SCOPE) + elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "AMD64") + set("${result_var_name}" "x86_64" PARENT_SCOPE) ++ elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "amd64") ++ 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 "IA64") + set("${result_var_name}" "itanium" PARENT_SCOPE) + elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86") diff --git a/lang/swift510/files/patch-swift-corelibs-foundation_CoreFoundation_Base.subproj_CFPlatform.c b/lang/swift510/files/patch-swift-corelibs-foundation_CoreFoundation_Base.subproj_CFPlatform.c new file mode 100644 index 000000000000..fd55c454982b --- /dev/null +++ b/lang/swift510/files/patch-swift-corelibs-foundation_CoreFoundation_Base.subproj_CFPlatform.c @@ -0,0 +1,26 @@ +--- swift-corelibs-foundation/CoreFoundation/Base.subproj/CFPlatform.c.orig 2024-05-31 00:46:27 UTC ++++ swift-corelibs-foundation/CoreFoundation/Base.subproj/CFPlatform.c +@@ -125,7 +125,7 @@ static inline void _CFSetProgramNameFromPath(const cha + __CFprogname = (__CFprogname ? __CFprogname + 1 : __CFProcessPath); + } + +-#if TARGET_OS_BSD && defined(__OpenBSD__) ++#if TARGET_OS_BSD && (defined(__OpenBSD__) || defined(__FreeBSD__)) + #include <sys/types.h> + #include <sys/sysctl.h> + #include <sys/exec.h> +@@ -199,6 +199,14 @@ const char *_CFProcessPath(void) { + struct ps_strings *ps = _ps.val; + char *res = realpath(ps->ps_argvstr[0], NULL); + argv0 = res? res: strdup(ps->ps_argvstr[0]); ++ } ++#elif defined(__FreeBSD__) ++ int mib[2] = {CTL_KERN, KERN_PS_STRINGS}; ++ struct ps_strings *ps; ++ size_t oldlen = sizeof(ps); ++ if (sysctl(mib, 2, &ps, &oldlen, NULL, 0) != -1 && oldlen == sizeof(ps)) { ++ char *res = realpath(ps->ps_argvstr[0], NULL); ++ argv0 = (res != NULL) ? res : strdup(ps->ps_argvstr[0]); + } + #endif + diff --git a/lang/swift510/files/patch-swift-corelibs-foundation_CoreFoundation_Base.subproj_CoreFoundation__Prefix.h b/lang/swift510/files/patch-swift-corelibs-foundation_CoreFoundation_Base.subproj_CoreFoundation__Prefix.h new file mode 100644 index 000000000000..68089e02d030 --- /dev/null +++ b/lang/swift510/files/patch-swift-corelibs-foundation_CoreFoundation_Base.subproj_CoreFoundation__Prefix.h @@ -0,0 +1,13 @@ +--- swift-corelibs-foundation/CoreFoundation/Base.subproj/CoreFoundation_Prefix.h.orig 2024-05-31 00:46:27 UTC ++++ swift-corelibs-foundation/CoreFoundation/Base.subproj/CoreFoundation_Prefix.h +@@ -260,6 +260,10 @@ CF_INLINE uint64_t mach_absolute_time() { + ULONGLONG ullTime; + QueryUnbiasedInterruptTimePrecise(&ullTime); + return ullTime; ++#elif defined(__FreeBSD__) ++ struct timespec ts; ++ clock_gettime(CLOCK_UPTIME, &ts); ++ return (uint64_t)ts.tv_nsec + (uint64_t)ts.tv_sec * 1000000000UL; + #elif TARGET_OS_LINUX || TARGET_OS_BSD || TARGET_OS_MAC + struct timespec ts; + clock_gettime(CLOCK_MONOTONIC, &ts); diff --git a/lang/swift510/files/patch-swift-corelibs-foundation_CoreFoundation_NumberDate.subproj_CFDate.c b/lang/swift510/files/patch-swift-corelibs-foundation_CoreFoundation_NumberDate.subproj_CFDate.c new file mode 100644 index 000000000000..33a067383138 --- /dev/null +++ b/lang/swift510/files/patch-swift-corelibs-foundation_CoreFoundation_NumberDate.subproj_CFDate.c @@ -0,0 +1,13 @@ +--- swift-corelibs-foundation/CoreFoundation/NumberDate.subproj/CFDate.c.orig 2024-05-31 00:46:27 UTC ++++ swift-corelibs-foundation/CoreFoundation/NumberDate.subproj/CFDate.c +@@ -176,6 +176,10 @@ CF_PRIVATE void __CFDateInitialize(void) { + // To get seconds we need to divide the value by 1e7 (10000000). + __CFTSRRate = 1.0e7; + __CF1_TSRRate = 1.0 / __CFTSRRate; ++#elif defined(__FreeBSD__) ++ // FreeBSD uses nanoseconds ++ __CFTSRRate = 1.0E9; ++ __CF1_TSRRate = 1.0 / __CFTSRRate; + #elif TARGET_OS_LINUX || TARGET_OS_BSD || TARGET_OS_WASI + struct timespec res; + if (clock_getres(CLOCK_MONOTONIC, &res) != 0) { diff --git a/lang/swift510/files/patch-swift-corelibs-foundation_CoreFoundation_PlugIn.subproj_CFBundle__Internal.h b/lang/swift510/files/patch-swift-corelibs-foundation_CoreFoundation_PlugIn.subproj_CFBundle__Internal.h new file mode 100644 index 000000000000..29e750e20138 --- /dev/null +++ b/lang/swift510/files/patch-swift-corelibs-foundation_CoreFoundation_PlugIn.subproj_CFBundle__Internal.h @@ -0,0 +1,11 @@ +--- swift-corelibs-foundation/CoreFoundation/PlugIn.subproj/CFBundle_Internal.h.orig 2024-05-31 00:46:27 UTC ++++ swift-corelibs-foundation/CoreFoundation/PlugIn.subproj/CFBundle_Internal.h +@@ -429,7 +429,7 @@ static bool _CFGetPathFromFileDescriptor(int fd, char + // The buffer must be PATH_MAX long or more. + static bool _CFGetPathFromFileDescriptor(int fd, char *path); + +-#if TARGET_OS_MAC || (TARGET_OS_BSD && !defined(__OpenBSD__)) ++#if TARGET_OS_MAC + + static bool _CFGetPathFromFileDescriptor(int fd, char *path) { + return fcntl(fd, F_GETPATH, path) != -1; diff --git a/lang/swift510/files/patch-swift-corelibs-foundation_CoreFoundation_RunLoop.subproj_CFRunLoop.c b/lang/swift510/files/patch-swift-corelibs-foundation_CoreFoundation_RunLoop.subproj_CFRunLoop.c new file mode 100644 index 000000000000..7b8c62788bd9 --- /dev/null +++ b/lang/swift510/files/patch-swift-corelibs-foundation_CoreFoundation_RunLoop.subproj_CFRunLoop.c @@ -0,0 +1,324 @@ +--- swift-corelibs-foundation/CoreFoundation/RunLoop.subproj/CFRunLoop.c.orig 2024-05-31 00:46:27 UTC ++++ swift-corelibs-foundation/CoreFoundation/RunLoop.subproj/CFRunLoop.c +@@ -115,6 +115,14 @@ extern void _dispatch_main_queue_callback_4CF(void *_N + dispatch_runloop_handle_t _dispatch_get_main_queue_port_4CF(void); + extern void _dispatch_main_queue_callback_4CF(void *_Null_unspecified msg); + ++#elif defined(__FreeBSD__) ++ ++#include <sys/event.h> ++#include <dlfcn.h> ++ ++extern dispatch_runloop_handle_t _dispatch_get_main_queue_port_4CF(void); ++extern void _dispatch_main_queue_callback_4CF(void *_Null_unspecified msg); ++ + #else + dispatch_runloop_handle_t _dispatch_get_main_queue_port_4CF(void); + extern void _dispatch_main_queue_callback_4CF(void *_Null_unspecified msg); +@@ -451,6 +459,98 @@ CF_INLINE void __CFPortSetFree(__CFPortSet portSet) { + CF_INLINE void __CFPortSetFree(__CFPortSet portSet) { + close(portSet); + } ++ ++#elif defined(__FreeBSD__) ++ ++// A file descriptor. ++typedef int __CFPort; ++// A timer port is a kqueue which monitors a single EVFILT_TIMER event (when the timer is armed). ++// A wakeup port is a kqueue which monitors a single EVFILT_USER event. ++ ++#define CFPORT_NULL (-1) ++ ++// A kqueue file descriptor. ++typedef int __CFPortSet; ++ ++#define CFPORTSET_NULL (-1) ++ ++ ++static void __THE_SYSTEM_HAS_NO_PORTS_AVAILABLE__(kern_return_t ret) __attribute__((noinline)); ++static void __THE_SYSTEM_HAS_NO_PORTS_AVAILABLE__(kern_return_t ret) { HALT; }; ++ ++static __CFPort __CFPortAllocate(uintptr_t guard) { ++ __CFPort kq = kqueuex(KQUEUE_CLOEXEC); ++ if (kq == -1) { ++ __THE_SYSTEM_HAS_NO_PORTS_AVAILABLE__(errno); ++ return CFPORT_NULL; ++ } ++ struct kevent kev = { ++ .ident = 0, ++ .filter = EVFILT_USER, ++ .flags = EV_ADD | EV_CLEAR, ++ }; ++ int r = kevent(kq, &kev, 1, NULL, 0, NULL); ++ if (r == -1) { ++ HALT; ++ return CFPORT_NULL; ++ } ++ return kq; ++} ++ ++static void __CFPortFree(__CFPort port, uintptr_t guard) { ++ close(port); ++} ++ ++static void __THE_SYSTEM_HAS_NO_PORT_SETS_AVAILABLE__(kern_return_t ret) __attribute__((noinline)); ++static void __THE_SYSTEM_HAS_NO_PORT_SETS_AVAILABLE__(kern_return_t ret) { HALT; } ++ ++static __CFPortSet __CFPortSetAllocate(void) { ++ __CFPort kq = kqueuex(KQUEUE_CLOEXEC); ++ if (kq == -1) { ++ __THE_SYSTEM_HAS_NO_PORT_SETS_AVAILABLE__(errno); ++ return CFPORT_NULL; ++ } ++ return kq; ++} ++ ++static kern_return_t __CFPortSetInsert(__CFPort port, __CFPortSet portSet) { ++ if (port == CFPORT_NULL) { ++ return -1; ++ } ++ struct kevent kev = { ++ .ident = (uintptr_t)port, ++ .filter = EVFILT_READ, ++ .flags = EV_ADD, ++ }; ++ int r = kevent(portSet, &kev, 1, NULL, 0, NULL); ++ if (r == -1) { ++ return errno; ++ } else { ++ return 0; ++ } ++} ++ ++static kern_return_t __CFPortSetRemove(__CFPort port, __CFPortSet portSet) { ++ if (port == CFPORT_NULL) { ++ return -1; ++ } ++ struct kevent kev = { ++ .ident = (uintptr_t)port, ++ .filter = EVFILT_READ, ++ .flags = EV_DELETE, ++ }; ++ int r = kevent(portSet, &kev, 1, NULL, 0, NULL); ++ if (r == -1) { ++ return errno; ++ } else { ++ return 0; ++ } ++} ++ ++static void __CFPortSetFree(__CFPortSet portSet) { ++ close(portSet); ++} ++ + #elif TARGET_OS_BSD + + #include <sys/types.h> +@@ -823,6 +923,58 @@ static kern_return_t mk_timer_cancel(HANDLE name, Abso + } + return (int)res; + } ++#elif defined(__FreeBSD__) ++static __CFPort mk_timer_create(void) { ++ __CFPort kq = kqueuex(KQUEUE_CLOEXEC); ++ if (kq == -1) { ++ HALT; ++ return CFPORT_NULL; ++ } ++ return kq; ++} ++ ++static kern_return_t mk_timer_destroy(__CFPort name) { ++ return close(name); ++} ++ ++static kern_return_t mk_timer_cancel(__CFPort timer, AbsoluteTime *result_time) { ++ struct kevent kev = { ++ .ident = 0, ++ .filter = EVFILT_TIMER, ++ .flags = EV_DELETE, ++ }; ++ int r = kevent(timer, &kev, 1, NULL, 0, NULL); ++ // The returned values are ignored. ++ *result_time = (struct UnsignedWide){ .hi = 0, .lo = 0 }; ++ return 0; ++} ++ ++static kern_return_t mk_timer_arm(__CFPort timer, uint64_t expire_time) { ++ struct kevent kev = { ++ .ident = 0, ++ .filter = EVFILT_TIMER, ++ .flags = EV_ADD, ++ .fflags = NOTE_NSECONDS | NOTE_ABSTIME, ++ .data = (int64_t)expire_time, ++ }; ++ int r = kevent(timer, &kev, 1, NULL, 0, NULL); ++ // The returned value is ignored. ++ return 0; ++} ++ ++static Boolean __CFPortTriggerWakeup(__CFPort wakeupPort) { ++ struct kevent kev = { ++ .ident = 0, ++ .filter = EVFILT_USER, ++ .fflags = NOTE_TRIGGER, ++ }; ++ int r = kevent(wakeupPort, &kev, 1, NULL, 0, NULL); ++ if (r == -1) { ++ return false; ++ } else { ++ return true; ++ } ++} + #elif TARGET_OS_BSD + /* + * This implementation of the mk_timer_* stubs is defined with the +@@ -1136,7 +1288,7 @@ static CFRunLoopModeRef __CFRunLoopCopyMode(CFRunLoopR + if (KERN_SUCCESS != ret) CRASH("*** Unable to insert timer port into port set. (%d) ***", ret); + #endif + rlm->_timerPort = CFPORT_NULL; +-#if TARGET_OS_BSD ++#if TARGET_OS_BSD && !defined(__FreeBSD__) + rlm->_timerPort = mk_timer_create(rlm->_portSet); + #else + rlm->_timerPort = mk_timer_create(); +@@ -2412,7 +2564,7 @@ static void __CFArmNextTimerInMode(CFRunLoopModeRef rl + // <rdar://problem/14447675> + + // Cancel the mk timer +- if (rlm->_mkTimerArmed && rlm->_timerPort) { ++ if (rlm->_mkTimerArmed && rlm->_timerPort != CFPORT_NULL) { + AbsoluteTime dummy; + mk_timer_cancel(rlm->_timerPort, &dummy); + rlm->_mkTimerArmed = false; +@@ -2430,20 +2582,20 @@ static void __CFArmNextTimerInMode(CFRunLoopModeRef rl + } + + // Arm the mk timer +- if (rlm->_timerPort) { ++ if (rlm->_timerPort != CFPORT_NULL) { + mk_timer_arm(rlm->_timerPort, nextSoftDeadline); + rlm->_mkTimerArmed = true; + } + } + #else +- if (rlm->_timerPort) { ++ if (rlm->_timerPort != CFPORT_NULL) { + mk_timer_arm(rlm->_timerPort, nextSoftDeadline); + } + #endif + } else if (nextSoftDeadline == UINT64_MAX) { + // Disarm the timers - there is no timer scheduled + +- if (rlm->_mkTimerArmed && rlm->_timerPort) { ++ if (rlm->_mkTimerArmed && rlm->_timerPort != CFPORT_NULL) { + AbsoluteTime dummy; + mk_timer_cancel(rlm->_timerPort, &dummy); + rlm->_mkTimerArmed = false; +@@ -2916,6 +3068,56 @@ static Boolean __CFRunLoopWaitForMultipleObjects(__CFP + return result; + } + ++#elif defined(__FreeBSD__) ++ ++#define TIMEOUT_INFINITY (-1) ++ ++static Boolean __CFRunLoopServicePorts(__CFPortSet portSet, __CFPort singlePort, __CFPort *livePort, int timeout) { ++ *livePort = CFPORT_NULL; ++ if (TIMEOUT_INFINITY == timeout) { ++ CFRUNLOOP_SLEEP(); ++ } else { ++ CFRUNLOOP_POLL(); ++ } ++ const struct timespec poll_ts = { .tv_sec = 0, .tv_nsec = 0 }; ++ struct kevent kev; ++ if (portSet != CFPORTSET_NULL) { ++ // Find out which port has an event waiting. ++ int r = kevent(portSet, NULL, 0, &kev, 1, (timeout == TIMEOUT_INFINITY) ? NULL : &poll_ts); ++ CFRUNLOOP_WAKEUP(r); ++ if (r == 1) { ++ int kq2 = (int)kev.ident; ++ // Receive the event. ++ int r2 = kevent(kq2, NULL, 0, &kev, 1, &poll_ts); ++ if (r2 == 1) { ++ *livePort = kq2; ++ return true; ++ } else if (r2 == 0) { ++ return false; ++ } else { ++ HALT; ++ return false; ++ } ++ } else if (r == 0) { ++ return false; ++ } else { ++ HALT; ++ return false; ++ } ++ } else { ++ int r = kevent(singlePort, NULL, 0, &kev, 1, (timeout == TIMEOUT_INFINITY) ? NULL : &poll_ts); ++ CFRUNLOOP_WAKEUP(r); ++ if (r == 1) { ++ *livePort = singlePort; ++ return true; ++ } else if (r == 0) { ++ return false; ++ } else { ++ HALT; ++ return false; ++ } ++ } ++} + #endif + + /* rl, rlm are locked on entrance and exit */ +@@ -3034,6 +3236,10 @@ static int32_t __CFRunLoopRun(CFRunLoopRef rl, CFRunLo + if (__CFRunLoopWaitForMultipleObjects(NULL, &dispatchPort, 0, 0, &livePort, NULL)) { + goto handle_msg; + } ++#elif defined(__FreeBSD__) ++ if (__CFRunLoopServicePorts(CFPORTSET_NULL, dispatchPort, &livePort, 0)) { ++ goto handle_msg; ++ } + #elif TARGET_OS_BSD + if (__CFRunLoopServiceFileDescriptors(CFPORTSET_NULL, dispatchPort, 0, &livePort)) { + goto handle_msg; +@@ -3095,6 +3301,8 @@ static int32_t __CFRunLoopRun(CFRunLoopRef rl, CFRunLo + __CFRunLoopWaitForMultipleObjects(waitSet, NULL, poll ? 0 : TIMEOUT_INFINITY, rlm->_msgQMask, &livePort, &windowsMessageReceived); + #elif TARGET_OS_LINUX + __CFRunLoopServiceFileDescriptors(waitSet, CFPORT_NULL, poll ? 0 : TIMEOUT_INFINITY, &livePort); ++#elif defined(__FreeBSD__) ++ __CFRunLoopServicePorts(waitSet, CFPORT_NULL, &livePort, poll ? 0 : TIMEOUT_INFINITY); + #elif TARGET_OS_BSD + __CFRunLoopServiceFileDescriptors(waitSet, CFPORT_NULL, poll ? 0 : TIMEOUT_INFINITY, &livePort); + #else +@@ -3406,6 +3614,9 @@ void CFRunLoopWakeUp(CFRunLoopRef rl) { + CFAssert1(0 == ret, __kCFLogAssertion, "%s(): Unable to send wake message to eventfd", __PRETTY_FUNCTION__); + #elif TARGET_OS_WIN32 + SetEvent(rl->_wakeUpPort); ++#elif defined(__FreeBSD__) ++ Boolean success = __CFPortTriggerWakeup(rl->_wakeUpPort); ++ if (!success) HALT; + #elif TARGET_OS_BSD + __CFPortTrigger(rl->_wakeUpPort); + #else +@@ -4131,6 +4342,10 @@ CFRunLoopSourceRef CFRunLoopSourceCreate(CFAllocatorRe + size = sizeof(CFRunLoopSourceContext); + break; + case 1: ++#if defined(__FreeBSD__) ++ // V1 sources are not implemented on FreeBSD yet ++ HALT; ++#endif + size = sizeof(CFRunLoopSourceContext1); + break; + } +@@ -4275,7 +4490,7 @@ static CFStringRef __CFRunLoopObserverCopyDescription( + } + #if TARGET_OS_WIN32 + result = CFStringCreateWithFormat(kCFAllocatorSystemDefault, NULL, CFSTR("<CFRunLoopObserver %p [%p]>{valid = %s, activities = 0x%x, repeats = %s, order = %d, callout = %p, context = %@}"), cf, CFGetAllocator(rlo), __CFIsValid(rlo) ? "Yes" : "No", rlo->_activities, __CFRunLoopObserverRepeats(rlo) ? "Yes" : "No", rlo->_order, rlo->_callout, contextDesc); +-#elif TARGET_OS_MAC || (TARGET_OS_LINUX && !TARGET_OS_CYGWIN) ++#elif TARGET_OS_MAC || (TARGET_OS_LINUX && !TARGET_OS_CYGWIN) || defined(__FreeBSD__) + void *addr = rlo->_callout; + Dl_info info; + const char *name = (dladdr(addr, &info) && info.dli_saddr == addr && info.dli_sname) ? info.dli_sname : "???"; diff --git a/lang/swift510/files/patch-swift-corelibs-foundation_Sources_Foundation_FileManager+POSIX.swift b/lang/swift510/files/patch-swift-corelibs-foundation_Sources_Foundation_FileManager+POSIX.swift new file mode 100644 index 000000000000..0056f21febc2 --- /dev/null +++ b/lang/swift510/files/patch-swift-corelibs-foundation_Sources_Foundation_FileManager+POSIX.swift @@ -0,0 +1,11 @@ +--- swift-corelibs-foundation/Sources/Foundation/FileManager+POSIX.swift.orig 2024-05-31 00:46:27 UTC ++++ swift-corelibs-foundation/Sources/Foundation/FileManager+POSIX.swift +@@ -70,7 +70,7 @@ extension FileManager { + } + urls = mountPoints(statBuf, Int(fsCount)) + } +-#elseif os(OpenBSD) ++#elseif os(OpenBSD) || os(FreeBSD) + func mountPoints(_ statBufs: UnsafePointer<statfs>, _ fsCount: Int) -> [URL] { + var urls: [URL] = [] + diff --git a/lang/swift510/files/patch-swift-corelibs-foundation_Sources_Foundation_FileManager.swift b/lang/swift510/files/patch-swift-corelibs-foundation_Sources_Foundation_FileManager.swift new file mode 100644 index 000000000000..99e66583fe93 --- /dev/null +++ b/lang/swift510/files/patch-swift-corelibs-foundation_Sources_Foundation_FileManager.swift @@ -0,0 +1,29 @@ +--- swift-corelibs-foundation/Sources/Foundation/FileManager.swift.orig 2024-05-31 00:46:27 UTC ++++ swift-corelibs-foundation/Sources/Foundation/FileManager.swift +@@ -389,7 +389,7 @@ open class FileManager : NSObject { + } + #if os(macOS) || os(iOS) + let modeT = number.uint16Value +- #elseif os(Linux) || os(Android) || os(Windows) || os(OpenBSD) ++ #elseif os(Linux) || os(Android) || os(Windows) || os(OpenBSD) || os(FreeBSD) + let modeT = number.uint32Value + #endif + #if os(Windows) +@@ -465,7 +465,7 @@ open class FileManager : NSObject { + flags |= flagsToSet + flags &= ~flagsToUnset + +- guard chflags(fsRep, flags) == 0 else { ++ guard chflags(fsRep, UInt(flags)) == 0 else { + throw _NSErrorWithErrno(errno, reading: false, path: path) + } + #endif +@@ -872,7 +872,7 @@ open class FileManager : NSObject { + #elseif canImport(Darwin) + return Int(mode & ~UInt32(S_IFMT)) + #else +- return Int(mode & ~S_IFMT) ++ return Int(mode & ~UInt32(S_IFMT)) + #endif + } + diff --git a/lang/swift510/files/patch-swift-corelibs-foundation_Sources_Foundation_Host.swift b/lang/swift510/files/patch-swift-corelibs-foundation_Sources_Foundation_Host.swift new file mode 100644 index 000000000000..9d01c22f13be --- /dev/null +++ b/lang/swift510/files/patch-swift-corelibs-foundation_Sources_Foundation_Host.swift @@ -0,0 +1,29 @@ +--- swift-corelibs-foundation/Sources/Foundation/Host.swift.orig 2024-05-31 00:46:27 UTC ++++ swift-corelibs-foundation/Sources/Foundation/Host.swift +@@ -186,7 +186,7 @@ open class Host: NSObject { + let family = ifa_addr.pointee.sa_family + if family == sa_family_t(AF_INET) || family == sa_family_t(AF_INET6) { + let sa_len: socklen_t = socklen_t((family == sa_family_t(AF_INET6)) ? MemoryLayout<sockaddr_in6>.size : MemoryLayout<sockaddr_in>.size) +-#if os(OpenBSD) ++#if os(OpenBSD) || os(FreeBSD) + let hostlen = size_t(NI_MAXHOST) + #else + let hostlen = socklen_t(NI_MAXHOST) +@@ -281,7 +281,7 @@ open class Host: NSObject { + } + var hints = addrinfo() + hints.ai_family = PF_UNSPEC +-#if os(macOS) || os(iOS) || os(Android) || os(OpenBSD) ++#if os(macOS) || os(iOS) || os(Android) || os(OpenBSD) || os(FreeBSD) + hints.ai_socktype = SOCK_STREAM + #else + hints.ai_socktype = Int32(SOCK_STREAM.rawValue) +@@ -311,7 +311,7 @@ open class Host: NSObject { + } + let sa_len: socklen_t = socklen_t((family == AF_INET6) ? MemoryLayout<sockaddr_in6>.size : MemoryLayout<sockaddr_in>.size) + let lookupInfo = { (content: inout [String], flags: Int32) in +-#if os(OpenBSD) ++#if os(OpenBSD) || os(FreeBSD) + let hostlen = size_t(NI_MAXHOST) + #else + let hostlen = socklen_t(NI_MAXHOST) diff --git a/lang/swift510/files/patch-swift-corelibs-foundation_Sources_Foundation_NSError.swift b/lang/swift510/files/patch-swift-corelibs-foundation_Sources_Foundation_NSError.swift new file mode 100644 index 000000000000..cf3f6350f787 --- /dev/null +++ b/lang/swift510/files/patch-swift-corelibs-foundation_Sources_Foundation_NSError.swift @@ -0,0 +1,20 @@ +--- swift-corelibs-foundation/Sources/Foundation/NSError.swift.orig 2024-05-31 00:46:27 UTC ++++ swift-corelibs-foundation/Sources/Foundation/NSError.swift +@@ -1342,7 +1342,7 @@ extension POSIXError { + /// Bad message. + public static var EBADMSG: POSIXError.Code { return .EBADMSG } + +- #if !os(OpenBSD) ++ #if !os(OpenBSD) && !os(FreeBSD) + /// Reserved. + public static var EMULTIHOP: POSIXError.Code { return .EMULTIHOP } + +@@ -1362,7 +1362,7 @@ extension POSIXError { + /// Protocol error. + public static var EPROTO: POSIXError.Code { return .EPROTO } + +- #if !os(OpenBSD) ++ #if !os(OpenBSD) && !os(FreeBSD) + /// STREAM ioctl timeout. + public static var ETIME: POSIXError.Code { return .ETIME } + #endif diff --git a/lang/swift510/files/patch-swift-corelibs-foundation_Sources_Foundation_NSLock.swift b/lang/swift510/files/patch-swift-corelibs-foundation_Sources_Foundation_NSLock.swift new file mode 100644 index 000000000000..d4e2c89b2f39 --- /dev/null +++ b/lang/swift510/files/patch-swift-corelibs-foundation_Sources_Foundation_NSLock.swift @@ -0,0 +1,28 @@ +--- swift-corelibs-foundation/Sources/Foundation/NSLock.swift.orig 2024-05-31 00:46:27 UTC ++++ swift-corelibs-foundation/Sources/Foundation/NSLock.swift +@@ -26,7 +26,7 @@ private typealias _ConditionVariablePointer = UnsafeMu + private typealias _MutexPointer = UnsafeMutablePointer<SRWLOCK> + private typealias _RecursiveMutexPointer = UnsafeMutablePointer<CRITICAL_SECTION> + private typealias _ConditionVariablePointer = UnsafeMutablePointer<CONDITION_VARIABLE> +-#elseif CYGWIN || os(OpenBSD) ++#elseif CYGWIN || os(OpenBSD) || os(FreeBSD) + private typealias _MutexPointer = UnsafeMutablePointer<pthread_mutex_t?> + private typealias _RecursiveMutexPointer = UnsafeMutablePointer<pthread_mutex_t?> + private typealias _ConditionVariablePointer = UnsafeMutablePointer<pthread_cond_t?> +@@ -248,14 +248,14 @@ open class NSRecursiveLock: NSObject, NSLocking { + InitializeConditionVariable(timeoutCond) + InitializeSRWLock(timeoutMutex) + #else +-#if CYGWIN || os(OpenBSD) ++#if CYGWIN || os(OpenBSD) || os(FreeBSD) + var attrib : pthread_mutexattr_t? = nil + #else + var attrib = pthread_mutexattr_t() + #endif + withUnsafeMutablePointer(to: &attrib) { attrs in + pthread_mutexattr_init(attrs) +-#if os(OpenBSD) ++#if os(OpenBSD) || os(FreeBSD) + let type = Int32(PTHREAD_MUTEX_RECURSIVE.rawValue) + #else + let type = Int32(PTHREAD_MUTEX_RECURSIVE) diff --git a/lang/swift510/files/patch-swift-corelibs-foundation_Sources_Foundation_NSPlatform.swift b/lang/swift510/files/patch-swift-corelibs-foundation_Sources_Foundation_NSPlatform.swift new file mode 100644 index 000000000000..dc6f7aed9f76 --- /dev/null +++ b/lang/swift510/files/patch-swift-corelibs-foundation_Sources_Foundation_NSPlatform.swift @@ -0,0 +1,11 @@ +--- swift-corelibs-foundation/Sources/Foundation/NSPlatform.swift.orig 2024-05-31 00:46:27 UTC ++++ swift-corelibs-foundation/Sources/Foundation/NSPlatform.swift +@@ -9,7 +9,7 @@ fileprivate let _NSPageSize = Int(vm_page_size) + + #if os(macOS) || os(iOS) + fileprivate let _NSPageSize = Int(vm_page_size) +-#elseif os(Linux) || os(Android) || os(OpenBSD) ++#elseif os(Linux) || os(Android) || os(OpenBSD) || os(FreeBSD) + fileprivate let _NSPageSize = Int(getpagesize()) + #elseif os(Windows) + import WinSDK diff --git a/lang/swift510/files/patch-swift-corelibs-foundation_Sources_Foundation_NSSwiftRuntime.swift b/lang/swift510/files/patch-swift-corelibs-foundation_Sources_Foundation_NSSwiftRuntime.swift new file mode 100644 index 000000000000..4729c4e61f1b --- /dev/null +++ b/lang/swift510/files/patch-swift-corelibs-foundation_Sources_Foundation_NSSwiftRuntime.swift @@ -0,0 +1,11 @@ +--- swift-corelibs-foundation/Sources/Foundation/NSSwiftRuntime.swift.orig 2024-05-31 00:46:27 UTC ++++ swift-corelibs-foundation/Sources/Foundation/NSSwiftRuntime.swift +@@ -14,7 +14,7 @@ + // This mimics the behavior of the swift sdk overlay on Darwin + #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) + @_exported import Darwin +-#elseif os(Linux) || os(Android) || CYGWIN || os(OpenBSD) ++#elseif os(Linux) || os(Android) || CYGWIN || os(OpenBSD) || os(FreeBSD) + @_exported import Glibc + #elseif os(WASI) + @_exported import WASILibc diff --git a/lang/swift510/files/patch-swift-corelibs-foundation_Sources_Foundation_Port.swift b/lang/swift510/files/patch-swift-corelibs-foundation_Sources_Foundation_Port.swift new file mode 100644 index 000000000000..1f25444c22ad --- /dev/null +++ b/lang/swift510/files/patch-swift-corelibs-foundation_Sources_Foundation_Port.swift @@ -0,0 +1,31 @@ +--- swift-corelibs-foundation/Sources/Foundation/Port.swift.orig 2024-05-31 00:46:27 UTC ++++ swift-corelibs-foundation/Sources/Foundation/Port.swift +@@ -83,21 +83,20 @@ public protocol PortDelegate: AnyObject { + func handle(_ message: PortMessage) + } + +-#if canImport(Glibc) && !os(Android) && !os(OpenBSD) ++#if canImport(Glibc) + import Glibc +-fileprivate let SOCK_STREAM = Int32(Glibc.SOCK_STREAM.rawValue) +-fileprivate let SOCK_DGRAM = Int32(Glibc.SOCK_DGRAM.rawValue) +-fileprivate let IPPROTO_TCP = Int32(Glibc.IPPROTO_TCP) +-#endif +- +-#if canImport(Glibc) && os(Android) || os(OpenBSD) +-import Glibc ++#if os(Android) || os(OpenBSD) || os(FreeBSD) + fileprivate let SOCK_STREAM = Int32(Glibc.SOCK_STREAM) + fileprivate let SOCK_DGRAM = Int32(Glibc.SOCK_DGRAM) + fileprivate let IPPROTO_TCP = Int32(Glibc.IPPROTO_TCP) + fileprivate let INADDR_ANY: in_addr_t = 0 + #if os(OpenBSD) + fileprivate let INADDR_LOOPBACK = 0x7f000001 ++#endif ++#else ++fileprivate let SOCK_STREAM = Int32(Glibc.SOCK_STREAM.rawValue) ++fileprivate let SOCK_DGRAM = Int32(Glibc.SOCK_DGRAM.rawValue) ++fileprivate let IPPROTO_TCP = Int32(Glibc.IPPROTO_TCP) + #endif + #endif + diff --git a/lang/swift510/files/patch-swift-corelibs-foundation_Sources_Foundation_Process.swift b/lang/swift510/files/patch-swift-corelibs-foundation_Sources_Foundation_Process.swift new file mode 100644 index 000000000000..7ff78cb43e04 --- /dev/null +++ b/lang/swift510/files/patch-swift-corelibs-foundation_Sources_Foundation_Process.swift @@ -0,0 +1,29 @@ +--- swift-corelibs-foundation/Sources/Foundation/Process.swift.orig 2024-05-31 00:46:27 UTC ++++ swift-corelibs-foundation/Sources/Foundation/Process.swift +@@ -19,6 +19,8 @@ import Darwin + import Darwin + #endif + ++import Glibc ++ + extension Process { + public enum TerminationReason : Int { + case exit +@@ -776,7 +778,7 @@ open class Process: NSObject { + } + + var taskSocketPair : [Int32] = [0, 0] +-#if os(macOS) || os(iOS) || os(Android) || os(OpenBSD) ++#if os(macOS) || os(iOS) || os(Android) || os(OpenBSD) || os(FreeBSD) + socketpair(AF_UNIX, SOCK_STREAM, 0, &taskSocketPair) + #else + socketpair(AF_UNIX, Int32(SOCK_STREAM.rawValue), 0, &taskSocketPair) +@@ -923,7 +925,7 @@ open class Process: NSObject { + try _throwIfPosixError(_CFPosixSpawnFileActionsAddClose(fileActions, fd)) + } + +-#if canImport(Darwin) || os(Android) || os(OpenBSD) ++#if canImport(Darwin) || os(Android) || os(OpenBSD) || os(FreeBSD) + var spawnAttrs: posix_spawnattr_t? = nil + #else + var spawnAttrs: posix_spawnattr_t = posix_spawnattr_t() diff --git a/lang/swift510/files/patch-swift-corelibs-foundation_Sources_Foundation_Thread.swift b/lang/swift510/files/patch-swift-corelibs-foundation_Sources_Foundation_Thread.swift new file mode 100644 index 000000000000..75847c6fada9 --- /dev/null +++ b/lang/swift510/files/patch-swift-corelibs-foundation_Sources_Foundation_Thread.swift @@ -0,0 +1,38 @@ +--- swift-corelibs-foundation/Sources/Foundation/Thread.swift.orig 2024-05-31 00:46:27 UTC ++++ swift-corelibs-foundation/Sources/Foundation/Thread.swift +@@ -214,7 +214,7 @@ open class Thread : NSObject { + get { _attrStorage.value } + set { _attrStorage.value = newValue } + } +-#elseif CYGWIN || os(OpenBSD) ++#elseif CYGWIN || os(OpenBSD) || os(FreeBSD) + internal var _attr : pthread_attr_t? = nil + #else + internal var _attr = pthread_attr_t() +@@ -254,7 +254,7 @@ open class Thread : NSObject { + _status = .finished + return + } +-#if CYGWIN || os(OpenBSD) ++#if CYGWIN || os(OpenBSD) || os(FreeBSD) + if let attr = self._attr { + _thread = self.withRetainedReference { + return _CFThreadCreate(attr, NSThreadStart, $0) +@@ -362,7 +362,7 @@ open class Thread : NSObject { + let maxSupportedStackDepth = 128; + let addrs = UnsafeMutablePointer<UnsafeMutableRawPointer?>.allocate(capacity: maxSupportedStackDepth) + defer { addrs.deallocate() } +-#if os(Android) || os(OpenBSD) ++#if os(Android) || os(OpenBSD) || os(FreeBSD) + let count = 0 + #elseif os(Windows) + let count = RtlCaptureStackBackTrace(0, DWORD(maxSupportedStackDepth), +@@ -383,7 +383,7 @@ open class Thread : NSObject { + } + + open class var callStackSymbols: [String] { +-#if os(Android) || os(OpenBSD) ++#if os(Android) || os(OpenBSD) || os(FreeBSD) + return [] + #elseif os(Windows) + let hProcess: HANDLE = GetCurrentProcess() diff --git a/lang/swift510/files/patch-swift-corelibs-foundation_cmake_modules_SwiftSupport.cmake b/lang/swift510/files/patch-swift-corelibs-foundation_cmake_modules_SwiftSupport.cmake new file mode 100644 index 000000000000..56d780d239c5 --- /dev/null +++ b/lang/swift510/files/patch-swift-corelibs-foundation_cmake_modules_SwiftSupport.cmake @@ -0,0 +1,15 @@ +--- 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") diff --git a/lang/swift510/files/patch-swift-corelibs-libdispatch_cmake_modules_SwiftSupport.cmake b/lang/swift510/files/patch-swift-corelibs-libdispatch_cmake_modules_SwiftSupport.cmake new file mode 100644 index 000000000000..c1255943f20a --- /dev/null +++ b/lang/swift510/files/patch-swift-corelibs-libdispatch_cmake_modules_SwiftSupport.cmake @@ -0,0 +1,11 @@ +--- swift-corelibs-libdispatch/cmake/modules/SwiftSupport.cmake.orig 2023-06-15 00:55:45 UTC ++++ swift-corelibs-libdispatch/cmake/modules/SwiftSupport.cmake +@@ -29,6 +29,8 @@ function(get_swift_host_arch result_var_name) + set("${result_var_name}" "armv7" PARENT_SCOPE) + elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "AMD64") + set("${result_var_name}" "x86_64" PARENT_SCOPE) ++ elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "amd64") ++ set("${result_var_name}" "x86_64" PARENT_SCOPE) + elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "IA64") + set("${result_var_name}" "itanium" PARENT_SCOPE) + elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86") diff --git a/lang/swift510/files/patch-swift-corelibs-libdispatch_dispatch_source.h b/lang/swift510/files/patch-swift-corelibs-libdispatch_dispatch_source.h new file mode 100644 index 000000000000..85ba89d4a612 --- /dev/null +++ b/lang/swift510/files/patch-swift-corelibs-libdispatch_dispatch_source.h @@ -0,0 +1,29 @@ +--- swift-corelibs-libdispatch/dispatch/source.h.orig 2023-06-15 00:55:45 UTC ++++ swift-corelibs-libdispatch/dispatch/source.h +@@ -116,7 +116,7 @@ DISPATCH_SOURCE_TYPE_DECL(data_replace); + * The mask is a mask of desired events from dispatch_source_mach_send_flags_t. + */ + #define DISPATCH_SOURCE_TYPE_MACH_SEND (&_dispatch_source_type_mach_send) +-API_AVAILABLE(macos(10.6), ios(4.0)) DISPATCH_LINUX_UNAVAILABLE() ++API_AVAILABLE(macos(10.6), ios(4.0)) DISPATCH_LINUX_UNAVAILABLE() DISPATCH_FREEBSD_UNAVAILABLE() + DISPATCH_SOURCE_TYPE_DECL(mach_send); + + /*! +@@ -126,7 +126,7 @@ DISPATCH_SOURCE_TYPE_DECL(mach_send); + * The mask is unused (pass zero for now). + */ + #define DISPATCH_SOURCE_TYPE_MACH_RECV (&_dispatch_source_type_mach_recv) +-API_AVAILABLE(macos(10.6), ios(4.0)) DISPATCH_LINUX_UNAVAILABLE() ++API_AVAILABLE(macos(10.6), ios(4.0)) DISPATCH_LINUX_UNAVAILABLE() DISPATCH_FREEBSD_UNAVAILABLE() + DISPATCH_SOURCE_TYPE_DECL(mach_recv); + + /*! +@@ -139,7 +139,7 @@ DISPATCH_SOURCE_TYPE_DECL(mach_recv); + */ + #define DISPATCH_SOURCE_TYPE_MEMORYPRESSURE \ + (&_dispatch_source_type_memorypressure) +-API_AVAILABLE(macos(10.9), ios(8.0)) DISPATCH_LINUX_UNAVAILABLE() ++API_AVAILABLE(macos(10.9), ios(8.0)) DISPATCH_LINUX_UNAVAILABLE() DISPATCH_FREEBSD_UNAVAILABLE() + DISPATCH_SOURCE_TYPE_DECL(memorypressure); + + /*! diff --git a/lang/swift510/files/patch-swift-corelibs-libdispatch_src_apply.c b/lang/swift510/files/patch-swift-corelibs-libdispatch_src_apply.c new file mode 100644 index 000000000000..197d1ae73ccf --- /dev/null +++ b/lang/swift510/files/patch-swift-corelibs-libdispatch_src_apply.c @@ -0,0 +1,10 @@ +--- swift-corelibs-libdispatch/src/apply.c.orig 2023-06-15 00:55:45 UTC ++++ swift-corelibs-libdispatch/src/apply.c +@@ -363,6 +363,6 @@ dispatch_apply(size_t iterations, dispatch_queue_t dq, + dispatch_apply(size_t iterations, dispatch_queue_t dq, void (^work)(size_t)) + { + dispatch_apply_f(iterations, dq, work, +- (dispatch_apply_function_t)_dispatch_Block_invoke(work)); ++ (dispatch_apply_function_t)(void *)_dispatch_Block_invoke(work)); + } + #endif diff --git a/lang/swift510/files/patch-swift-corelibs-libdispatch_src_data.c b/lang/swift510/files/patch-swift-corelibs-libdispatch_src_data.c new file mode 100644 index 000000000000..2fe79a379376 --- /dev/null +++ b/lang/swift510/files/patch-swift-corelibs-libdispatch_src_data.c @@ -0,0 +1,11 @@ +--- swift-corelibs-libdispatch/src/data.c.orig 2023-06-15 00:55:45 UTC ++++ swift-corelibs-libdispatch/src/data.c +@@ -600,7 +600,7 @@ dispatch_data_apply(dispatch_data_t dd, dispatch_data_ + return true; + } + return _dispatch_data_apply(dd, 0, 0, dd->size, applier, +- (dispatch_data_applier_function_t)_dispatch_Block_invoke(applier)); ++ (dispatch_data_applier_function_t)(void *)_dispatch_Block_invoke(applier)); + } + + static dispatch_data_t diff --git a/lang/swift510/files/patch-swift-corelibs-libdispatch_src_event_event__config.h b/lang/swift510/files/patch-swift-corelibs-libdispatch_src_event_event__config.h new file mode 100644 index 000000000000..8ad2077a4db1 --- /dev/null +++ b/lang/swift510/files/patch-swift-corelibs-libdispatch_src_event_event__config.h @@ -0,0 +1,19 @@ +--- swift-corelibs-libdispatch/src/event/event_config.h.orig 2023-06-15 00:55:45 UTC ++++ swift-corelibs-libdispatch/src/event/event_config.h +@@ -116,10 +116,14 @@ + # define NOTE_FUNLOCK 0x00000100 + # endif + +-// FreeBSD's kevent does not support those + # ifndef NOTE_ABSOLUTE +-# define NOTE_ABSOLUTE 0 ++# if defined(__FreeBSD__) ++# define NOTE_ABSOLUTE NOTE_ABSTIME ++# else ++# error NOTE_ABSOLUTE must be defined for kevent-based timers to function properly + # endif ++# endif ++// FreeBSD's kevent does not support NOTE_EXITSTATUS + # ifndef NOTE_EXITSTATUS + # define NOTE_EXITSTATUS 0 + # endif diff --git a/lang/swift510/files/patch-swift-corelibs-libdispatch_src_event_event__kevent.c b/lang/swift510/files/patch-swift-corelibs-libdispatch_src_event_event__kevent.c new file mode 100644 index 000000000000..ef5b8b850e42 --- /dev/null +++ b/lang/swift510/files/patch-swift-corelibs-libdispatch_src_event_event__kevent.c @@ -0,0 +1,141 @@ +--- swift-corelibs-libdispatch/src/event/event_kevent.c.orig 2023-06-15 00:55:45 UTC ++++ swift-corelibs-libdispatch/src/event/event_kevent.c +@@ -24,6 +24,9 @@ + #include "protocol.h" + #include "protocolServer.h" + #endif ++#if defined(__FreeBSD__) ++#include <sys/sysctl.h> ++#endif + + #if DISPATCH_USE_KEVENT_WORKQUEUE && !DISPATCH_USE_KEVENT_QOS + #error unsupported configuration +@@ -50,10 +53,12 @@ DISPATCH_STATIC_GLOBAL(struct dispatch_muxnote_bucket_ + #define DISPATCH_NOTE_CLOCK_WALL NOTE_NSECONDS | NOTE_MACH_CONTINUOUS_TIME + #define DISPATCH_NOTE_CLOCK_MONOTONIC NOTE_MACHTIME | NOTE_MACH_CONTINUOUS_TIME + #define DISPATCH_NOTE_CLOCK_UPTIME NOTE_MACHTIME ++#elif defined(__FreeBSD__) ++#define DISPATCH_NOTE_CLOCK_WALL NOTE_NSECONDS ++#define DISPATCH_NOTE_CLOCK_MONOTONIC NOTE_NSECONDS ++#define DISPATCH_NOTE_CLOCK_UPTIME NOTE_NSECONDS + #else +-#define DISPATCH_NOTE_CLOCK_WALL 0 +-#define DISPATCH_NOTE_CLOCK_MONOTONIC 0 +-#define DISPATCH_NOTE_CLOCK_UPTIME 0 ++#error DISPATCH_NOTE_CLOCK_* constants not defined for this platform + #endif + + static const uint32_t _dispatch_timer_index_to_fflags[] = { +@@ -388,9 +393,12 @@ _dispatch_kevent_print_error(dispatch_kevent_t ke) + switch (ke->data) { + case 0: + return; ++#if DISPATCH_USE_KEVENT_QOS + case ERANGE: /* A broken QoS was passed to kevent_id() */ + DISPATCH_INTERNAL_CRASH(ke->qos, "Invalid kevent priority"); ++#endif + default: ++#if HAVE_MACH + // log the unexpected error + _dispatch_bug_kevent_client("kevent", _evfiltstr(ke->filter), + !ke->udata ? NULL : +@@ -398,6 +406,9 @@ _dispatch_kevent_print_error(dispatch_kevent_t ke) + ke->flags & EV_ADD ? "add" : + ke->flags & EV_ENABLE ? "enable" : "monitor", + (int)ke->data, ke->ident, ke->udata, du); ++#else ++ (void)0; ++#endif + } + } + +@@ -591,7 +602,6 @@ _dispatch_kq_create(intptr_t *fd_ptr) + guardid_t guard = (uintptr_t)fd_ptr; + kqfd = guarded_kqueue_np(&guard, GUARD_CLOSE | GUARD_DUP); + #else +- (void)guard_ptr; + kqfd = kqueue(); + #endif + if (kqfd == -1) { +@@ -743,7 +753,7 @@ retry: + switch (err) { + case ENOMEM: + _dispatch_temporary_resource_shortage(); +- /* FALLTHROUGH */ ++ DISPATCH_FALLTHROUGH; + case EINTR: + goto retry; + case EBADF: +@@ -754,7 +764,7 @@ retry: + (flags & KEVENT_FLAG_DYNAMIC_KQ_MUST_EXIST)) { + return 0; + } +- /* FALLTHROUGH */ ++ DISPATCH_FALLTHROUGH; + #endif // DISPATCH_USE_KEVENT_WORKLOOP + default: + DISPATCH_CLIENT_CRASH(err, "Unexpected error from kevent"); +@@ -860,7 +870,6 @@ _dispatch_kq_unote_set_kevent(dispatch_unote_t _du, di + du->du_priority), + #endif + }; +- (void)pp; // if DISPATCH_USE_KEVENT_QOS == 0 + } + + DISPATCH_ALWAYS_INLINE +@@ -985,6 +994,7 @@ _dispatch_sync_ipc_handoff_end(dispatch_wlh_t wlh, mac + } + #endif + ++#if !defined(__FreeBSD__) + DISPATCH_NOINLINE + static bool + _dispatch_kq_unote_update(dispatch_wlh_t wlh, dispatch_unote_t _du, +@@ -1055,6 +1065,7 @@ done: + dispatch_assume_zero(r); + return true; + } ++#endif + + #pragma mark dispatch_muxnote_t + +@@ -1300,6 +1311,7 @@ enum { + DISPATCH_WORKLOOP_SYNC_END, + }; + ++#if 0 + static char const * const _dispatch_workloop_actions[] = { + [DISPATCH_WORKLOOP_ASYNC] = "async", + [DISPATCH_WORKLOOP_ASYNC_FROM_SYNC] = "async (from sync)", +@@ -1316,6 +1328,7 @@ static char const * const _dispatch_workloop_actions[] + [DISPATCH_WORKLOOP_SYNC_WAKE] = "sync-wake", + [DISPATCH_WORKLOOP_SYNC_END] = "sync-end", + }; ++#endif + + void + _dispatch_event_loop_atfork_child(void) +@@ -2326,6 +2339,23 @@ _dispatch_event_loop_timer_program(dispatch_timer_heap + pthread_priority_t pp = _PTHREAD_PRIORITY_EVENT_MANAGER_FLAG; + if (wlh != DISPATCH_WLH_ANON) { + pp = _dispatch_qos_to_pp(dth[tidx].dth_max_qos); ++ } ++#endif ++#if defined(__FreeBSD__) ++ dispatch_clock_t clock = DISPATCH_TIMER_CLOCK(tidx); ++ if (clock == DISPATCH_CLOCK_UPTIME || clock == DISPATCH_CLOCK_MONOTONIC) { ++ /* ++ * On FreeBSD these clocks are based on system boot time. ++ * However, kevent() on FreeBSD accepts only values based on ++ * the Unix epoch. For this reason we apply a correction. ++ */ ++ static const int mib[] = { CTL_KERN, KERN_BOOTTIME }; ++ struct timeval boottime; ++ size_t oldlen = sizeof(struct timeval); ++ int r = sysctl(mib, 2, &boottime, &oldlen, NULL, 0); ++ if (r == 0 && oldlen == sizeof(struct timeval)) { ++ target += _dispatch_timeval_to_nano(boottime); ++ } + } + #endif + dispatch_kevent_s ke = { diff --git a/lang/swift510/files/patch-swift-corelibs-libdispatch_src_event_workqueue.c b/lang/swift510/files/patch-swift-corelibs-libdispatch_src_event_workqueue.c new file mode 100644 index 000000000000..469c0d0395ea --- /dev/null +++ b/lang/swift510/files/patch-swift-corelibs-libdispatch_src_event_workqueue.c @@ -0,0 +1,106 @@ +--- swift-corelibs-libdispatch/src/event/workqueue.c.orig 2023-06-15 00:55:45 UTC ++++ swift-corelibs-libdispatch/src/event/workqueue.c +@@ -22,6 +22,14 @@ + + #if DISPATCH_USE_INTERNAL_WORKQUEUE + ++#if defined(__FreeBSD__) ++#include <stdlib.h> ++#include <unistd.h> ++#include <sys/param.h> ++#include <sys/sysctl.h> ++#include <sys/user.h> ++#endif ++ + #if defined(_WIN32) + #include <wct.h> + #endif +@@ -31,7 +39,7 @@ + * executing the work enqueued on libdispatch's pthread + * root queues and dynamically adjusts its size. + * +- * The dynamic monitoring could be implemented using either ++ * The dynamic monitoring could be implemented on Linux using either + * (a) low-frequency user-level approximation of the number of runnable + * worker threads via reading the /proc file system + * (b) a Linux kernel extension that hooks the process change handler +@@ -183,6 +191,79 @@ _dispatch_workq_count_runnable_workers(dispatch_workq_ + mon->num_runnable = running_count; + + _dispatch_unfair_lock_unlock(&mon->registered_tid_lock); ++} ++#elif defined(__FreeBSD__) ++/* ++ * Count the number of runnable worker threads by obtaining information about ++ * all threads in the current process by means of sysctl(). ++ * Because the caller expects that we always compute num_runnable, we always ++ * compute a value, even when we can't really compute the correct value. ++ */ ++static void ++_dispatch_workq_count_runnable_workers(dispatch_workq_monitor_t mon) ++{ ++ int runnable_count = 0; ++ int pid = (int)getpid(); ++ int mib[] = {CTL_KERN, KERN_PROC, (KERN_PROC_PID | KERN_PROC_INC_THREAD), pid}; ++ size_t oldlen = 0; ++ struct kinfo_proc *buf = NULL; ++ int r; ++ ++ // Find out what size of buffer we need. ++ r = sysctl(mib, nitems(mib), NULL, &oldlen, NULL, 0); ++ if (r == -1) { ++ goto fail; ++ } ++ ++ buf = malloc(oldlen); ++ if (buf == NULL) { ++ goto fail; ++ } ++ ++ /* ++ * Note: Between the previous sysctl() call and this call the number of ++ * threads in the process might have increased and thus the buffer ++ * might be too small to actually accomodate all threads. ++ */ ++ r = sysctl(mib, nitems(mib), buf, &oldlen, NULL, 0); ++ if (r == -1 && errno != ENOMEM) { ++ goto fail; ++ } ++ ++ int n_all_threads = (int)(oldlen / sizeof(struct kinfo_proc)); ++ ++ // Verify that our idea of sizeof(struct kinfo_proc) matches the kernel's. ++ if (n_all_threads > 0) { ++ if (buf[0].ki_structsize != sizeof(struct kinfo_proc)) { ++ goto fail; ++ } ++ } ++ ++ _dispatch_unfair_lock_lock(&mon->registered_tid_lock); ++ ++ for (int i = 0; i < mon->num_registered_tids; i++) { ++ dispatch_tid tid = mon->registered_tids[i]; ++ for (int j = 0; j < n_all_threads; j++) { ++ if ((dispatch_tid)buf[j].ki_tid == tid) { ++ if (buf[j].ki_stat == SRUN) { ++ runnable_count++; ++ } ++ break; ++ } ++ } ++ } ++ ++ mon->num_runnable = runnable_count; ++ ++ _dispatch_unfair_lock_unlock(&mon->registered_tid_lock); ++ ++ free(buf); ++ return; ++ ++ fail: _dispatch_unfair_lock_lock(&mon->registered_tid_lock); ++ mon->num_runnable = runnable_count; ++ _dispatch_unfair_lock_unlock(&mon->registered_tid_lock); ++ free(buf); + } + #elif defined(_WIN32) + static void diff --git a/lang/swift510/files/patch-swift-corelibs-libdispatch_src_event_workqueue__internal.h b/lang/swift510/files/patch-swift-corelibs-libdispatch_src_event_workqueue__internal.h new file mode 100644 index 000000000000..93176caf63e8 --- /dev/null +++ b/lang/swift510/files/patch-swift-corelibs-libdispatch_src_event_workqueue__internal.h @@ -0,0 +1,11 @@ +--- swift-corelibs-libdispatch/src/event/workqueue_internal.h.orig 2023-06-15 00:55:45 UTC ++++ swift-corelibs-libdispatch/src/event/workqueue_internal.h +@@ -30,7 +30,7 @@ void _dispatch_workq_worker_unregister(dispatch_queue_ + void _dispatch_workq_worker_register(dispatch_queue_global_t root_q); + void _dispatch_workq_worker_unregister(dispatch_queue_global_t root_q); + +-#if defined(__linux__) || defined(_WIN32) ++#if defined(__linux__) || defined(__FreeBSD__) || defined(_WIN32) + #define HAVE_DISPATCH_WORKQ_MONITORING 1 + #else + #define HAVE_DISPATCH_WORKQ_MONITORING 0 diff --git a/lang/swift510/files/patch-swift-corelibs-libdispatch_src_init.c b/lang/swift510/files/patch-swift-corelibs-libdispatch_src_init.c new file mode 100644 index 000000000000..10b3bab68305 --- /dev/null +++ b/lang/swift510/files/patch-swift-corelibs-libdispatch_src_init.c @@ -0,0 +1,11 @@ +--- swift-corelibs-libdispatch/src/init.c.orig 2023-06-15 00:55:45 UTC ++++ swift-corelibs-libdispatch/src/init.c +@@ -1048,7 +1048,7 @@ _dispatch_bug_kevent_vanished(dispatch_unote_t du) + _dispatch_log_fault("LIBDISPATCH_STRICT: _dispatch_bug_kevent_vanished", + "BUG in libdispatch client: %s, monitored resource vanished before " + "the source cancel handler was invoked " +- "{ %p[%s], ident: %" PRIdPTR " / 0x%" PRIxPTR ", handler: %p }", ++ "{ %p[%s], ident: %" PRIu32 " / 0x%" PRIx32 ", handler: %p }", + dux_type(du._du)->dst_kind, dou._dq, + dou._dq->dq_label ? dou._dq->dq_label : "<unknown>", + du._du->du_ident, du._du->du_ident, func); diff --git a/lang/swift510/files/patch-swift-corelibs-libdispatch_src_io.c b/lang/swift510/files/patch-swift-corelibs-libdispatch_src_io.c new file mode 100644 index 000000000000..43fa0b41abdb --- /dev/null +++ b/lang/swift510/files/patch-swift-corelibs-libdispatch_src_io.c @@ -0,0 +1,11 @@ +--- swift-corelibs-libdispatch/src/io.c.orig 2023-06-15 00:55:45 UTC ++++ swift-corelibs-libdispatch/src/io.c +@@ -2280,7 +2280,7 @@ _dispatch_operation_advise(dispatch_operation_t op, si + _dispatch_operation_advise(dispatch_operation_t op, size_t chunk_size) + { + _dispatch_op_debug("advise", op); +-#if defined(_WIN32) ++#if defined(_WIN32) || defined(__FreeBSD__) + (void)op; + (void)chunk_size; + #else diff --git a/lang/swift510/files/patch-swift-corelibs-libdispatch_src_queue.c b/lang/swift510/files/patch-swift-corelibs-libdispatch_src_queue.c new file mode 100644 index 000000000000..09d068cd3802 --- /dev/null +++ b/lang/swift510/files/patch-swift-corelibs-libdispatch_src_queue.c @@ -0,0 +1,90 @@ +--- swift-corelibs-libdispatch/src/queue.c.orig 2023-06-15 00:55:45 UTC ++++ swift-corelibs-libdispatch/src/queue.c +@@ -6467,7 +6467,7 @@ _dispatch_runloop_handle_is_valid(dispatch_runloop_han + { + #if TARGET_OS_MAC + return MACH_PORT_VALID(handle); +-#elif defined(__linux__) ++#elif defined(__linux__) || defined(__FreeBSD__) + return handle >= 0; + #elif defined(_WIN32) + return handle != NULL; +@@ -6482,7 +6482,7 @@ _dispatch_runloop_queue_get_handle(dispatch_lane_t dq) + { + #if TARGET_OS_MAC + return ((dispatch_runloop_handle_t)(uintptr_t)dq->do_ctxt); +-#elif defined(__linux__) ++#elif defined(__linux__) || defined(__FreeBSD__) + // decode: 0 is a valid fd, so offset by 1 to distinguish from NULL + return ((dispatch_runloop_handle_t)(uintptr_t)dq->do_ctxt) - 1; + #elif defined(_WIN32) +@@ -6499,7 +6499,7 @@ _dispatch_runloop_queue_set_handle(dispatch_lane_t dq, + { + #if TARGET_OS_MAC + dq->do_ctxt = (void *)(uintptr_t)handle; +-#elif defined(__linux__) ++#elif defined(__linux__) || defined(__FreeBSD__) + // encode: 0 is a valid fd, so offset by 1 to distinguish from NULL + dq->do_ctxt = (void *)(uintptr_t)(handle + 1); + #elif defined(_WIN32) +@@ -6558,6 +6558,37 @@ _dispatch_runloop_queue_handle_init(void *ctxt) + } + } + handle = fd; ++#elif defined(__FreeBSD__) ++ int kq = kqueuex(KQUEUE_CLOEXEC); ++ if (kq == -1) { ++ int err = errno; ++ switch (err) { ++ case EMFILE: ++ DISPATCH_CLIENT_CRASH(err, "kqueuex() failure: " ++ "process is out of file descriptors"); ++ break; ++ case ENFILE: ++ DISPATCH_CLIENT_CRASH(err, "kqueuex() failure: " ++ "system is out of file descriptors"); ++ break; ++ case ENOMEM: ++ DISPATCH_CLIENT_CRASH(err, "kqueuex() failure: " ++ "kernel is out of memory or the " ++ "RLIMIT_KQUEUES user resource limit " ++ "would be exceeded"); ++ break; ++ default: ++ DISPATCH_INTERNAL_CRASH(err, "kqueuex() failure"); ++ break; ++ } ++ } ++ struct kevent kev = { ++ .ident = 0, // Must match the value used by Core Foundation. ++ .filter = EVFILT_USER, ++ .flags = EV_ADD | EV_CLEAR, ++ }; ++ dispatch_assume_zero(kevent(kq, &kev, 1, NULL, 0, NULL)); ++ handle = kq; + #elif defined(_WIN32) + HANDLE hEvent; + hEvent = CreateEventW(NULL, /*bManualReset=*/FALSE, +@@ -6589,7 +6620,7 @@ _dispatch_runloop_queue_handle_dispose(dispatch_lane_t + kr = mach_port_destruct(mach_task_self(), mp, -1, guard); + DISPATCH_VERIFY_MIG(kr); + (void)dispatch_assume_zero(kr); +-#elif defined(__linux__) ++#elif defined(__linux__) || defined(__FreeBSD__) + int rc = close(handle); + (void)dispatch_assume_zero(rc); + #elif defined(_WIN32) +@@ -6628,6 +6659,13 @@ _dispatch_runloop_queue_class_poke(dispatch_lane_t dq) + result = eventfd_write(handle, 1); + } while (result == -1 && errno == EINTR); + (void)dispatch_assume_zero(result); ++#elif defined(__FreeBSD__) ++ struct kevent kev = { ++ .ident = 0, // Must match the value used by Core Foundation. ++ .filter = EVFILT_USER, ++ .fflags = NOTE_TRIGGER, ++ }; ++ dispatch_assume_zero(kevent(handle, &kev, 1, NULL, 0, NULL)); + #elif defined(_WIN32) + BOOL bSuccess; + bSuccess = SetEvent(handle); diff --git a/lang/swift510/files/patch-swift-corelibs-libdispatch_src_shims_lock.c b/lang/swift510/files/patch-swift-corelibs-libdispatch_src_shims_lock.c new file mode 100644 index 000000000000..1c0768544812 --- /dev/null +++ b/lang/swift510/files/patch-swift-corelibs-libdispatch_src_shims_lock.c @@ -0,0 +1,70 @@ +--- swift-corelibs-libdispatch/src/shims/lock.c.orig 2023-06-15 00:55:45 UTC ++++ swift-corelibs-libdispatch/src/shims/lock.c +@@ -19,6 +19,10 @@ + */ + + #include "internal.h" ++#if defined(__FreeBSD__) ++#include <sys/types.h> ++#include <sys/umtx.h> ++#endif + + #if TARGET_OS_MAC + dispatch_static_assert(DLOCK_LOCK_DATA_CONTENTION == +@@ -516,6 +520,27 @@ _dispatch_wait_on_address(uint32_t volatile *_address, + ? INFINITE : ((nsecs + 1000000) / 1000000); + if (dwMilliseconds == 0) return ETIMEDOUT; + return WaitOnAddress(address, &value, sizeof(value), dwMilliseconds) == TRUE; ++#elif defined(__FreeBSD__) ++ (void)flags; ++ if (nsecs == DISPATCH_TIME_FOREVER) { ++ _umtx_op(address, UMTX_OP_WAIT_UINT, value, NULL, NULL); ++ return 0; ++ } else { ++ struct timespec tstimeout; ++ tstimeout.tv_sec = nsecs / NSEC_PER_SEC; ++ tstimeout.tv_nsec = (long)(nsecs % NSEC_PER_SEC); ++ ++ int r = _umtx_op(address, UMTX_OP_WAIT_UINT, value, (void *)(uintptr_t)sizeof(struct timespec), &tstimeout); ++ if (r == -1) { ++ if (errno == ETIMEDOUT) { ++ return ETIMEDOUT; ++ } else { ++ return 0; ++ } ++ } else { ++ return 0; ++ } ++ } + #else + #error _dispatch_wait_on_address unimplemented for this platform + #endif +@@ -530,6 +555,8 @@ _dispatch_wake_by_address(uint32_t volatile *address) + _dispatch_futex_wake((uint32_t *)address, INT_MAX, FUTEX_PRIVATE_FLAG); + #elif defined(_WIN32) + WakeByAddressAll((uint32_t *)address); ++#elif defined(__FreeBSD__) ++ _umtx_op((uint32_t *)address, UMTX_OP_WAKE, INT_MAX, NULL, NULL); + #else + (void)address; + #endif +@@ -627,7 +654,9 @@ _dispatch_unfair_lock_lock_slow(dispatch_unfair_lock_t + if (unlikely(_dispatch_lock_is_locked_by(cur, self))) { + DISPATCH_CLIENT_CRASH(0, "trying to lock recursively"); + } +- _dispatch_thread_switch(cur, flags, timeout++); ++ //_dispatch_thread_switch(cur, flags, timeout++); ++ (void)timeout; ++ (void)flags; + } + } + #endif +@@ -689,7 +718,7 @@ _dispatch_once_wait(dispatch_once_gate_t dgo) + _dispatch_futex_wait(lock, (dispatch_lock)new_v, NULL, + FUTEX_PRIVATE_FLAG); + #else +- _dispatch_thread_switch(new_v, 0, timeout++); ++ //_dispatch_thread_switch(new_v, 0, timeout++); + #endif + (void)timeout; + } diff --git a/lang/swift510/files/patch-swift-corelibs-libdispatch_src_shims_lock.h b/lang/swift510/files/patch-swift-corelibs-libdispatch_src_shims_lock.h new file mode 100644 index 000000000000..061e4acb8e87 --- /dev/null +++ b/lang/swift510/files/patch-swift-corelibs-libdispatch_src_shims_lock.h @@ -0,0 +1,28 @@ +--- swift-corelibs-libdispatch/src/shims/lock.h.orig 2023-06-15 00:55:45 UTC ++++ swift-corelibs-libdispatch/src/shims/lock.h +@@ -79,6 +79,25 @@ _dispatch_lock_owner(dispatch_lock lock_value) + return lock_value & DLOCK_OWNER_MASK; + } + ++#elif defined(__FreeBSD__) ++ ++typedef uint32_t dispatch_tid; ++typedef uint32_t dispatch_lock; ++ ++#define DLOCK_OWNER_MASK ((dispatch_lock)0x3fffffff) ++#define DLOCK_WAITERS_BIT ((dispatch_lock)0x40000000) ++#define DLOCK_FAILED_TRYLOCK_BIT ((dispatch_lock)0x80000000) ++ ++#define DLOCK_OWNER_NULL ((dispatch_tid)0) ++#define _dispatch_tid_self() ((dispatch_tid)pthread_getthreadid_np()) ++ ++DISPATCH_ALWAYS_INLINE ++static inline dispatch_tid ++_dispatch_lock_owner(dispatch_lock lock_value) ++{ ++ return lock_value & DLOCK_OWNER_MASK; ++} ++ + #elif defined(_WIN32) + + #include <Windows.h> diff --git a/lang/swift510/files/patch-swift-corelibs-libdispatch_src_swift_Source.swift b/lang/swift510/files/patch-swift-corelibs-libdispatch_src_swift_Source.swift new file mode 100644 index 000000000000..8681616551ea --- /dev/null +++ b/lang/swift510/files/patch-swift-corelibs-libdispatch_src_swift_Source.swift @@ -0,0 +1,47 @@ +--- swift-corelibs-libdispatch/src/swift/Source.swift.orig 2023-06-15 00:55:45 UTC ++++ swift-corelibs-libdispatch/src/swift/Source.swift +@@ -116,7 +116,7 @@ extension DispatchSource { + } + #endif + +-#if !os(Linux) && !os(Android) && !os(Windows) ++#if HAVE_MACH + public struct ProcessEvent : OptionSet, RawRepresentable { + public let rawValue: UInt + public init(rawValue: UInt) { self.rawValue = rawValue } +@@ -174,7 +174,7 @@ extension DispatchSource { + } + #endif + +-#if !os(Linux) && !os(Android) && !os(Windows) ++#if HAVE_MACH + public class func makeProcessSource(identifier: pid_t, eventMask: ProcessEvent, queue: DispatchQueue? = nil) -> DispatchSourceProcess { + let source = dispatch_source_create(_swift_dispatch_source_type_PROC(), UInt(identifier), eventMask.rawValue, queue?.__wrapped) + return DispatchSource(source: source) as DispatchSourceProcess +@@ -224,7 +224,7 @@ extension DispatchSource { + return DispatchSource(source: source) as DispatchSourceUserDataReplace + } + +-#if !os(Linux) && !os(Android) && !os(Windows) ++#if HAVE_MACH + public class func makeFileSystemObjectSource(fileDescriptor: Int32, eventMask: FileSystemEvent, queue: DispatchQueue? = nil) -> DispatchSourceFileSystemObject { + let source = dispatch_source_create(_swift_dispatch_source_type_VNODE(), UInt(fileDescriptor), eventMask.rawValue, queue?.__wrapped) + return DispatchSource(source: source) as DispatchSourceFileSystemObject +@@ -290,7 +290,7 @@ extension DispatchSourceMemoryPressure { + } + #endif + +-#if !os(Linux) && !os(Android) && !os(Windows) ++#if HAVE_MACH + extension DispatchSourceProcess { + public var handle: pid_t { + return pid_t(dispatch_source_get_handle(self as! DispatchSource)) +@@ -646,7 +646,7 @@ extension DispatchSourceTimer { + } + } + +-#if !os(Linux) && !os(Android) && !os(Windows) ++#if HAVE_MACH + extension DispatchSourceFileSystemObject { + public var handle: Int32 { + return Int32(dispatch_source_get_handle((self as! DispatchSource).__wrapped)) diff --git a/lang/swift510/files/patch-swift-corelibs-libdispatch_src_swift_Wrapper.swift b/lang/swift510/files/patch-swift-corelibs-libdispatch_src_swift_Wrapper.swift new file mode 100644 index 000000000000..fff4f374522f --- /dev/null +++ b/lang/swift510/files/patch-swift-corelibs-libdispatch_src_swift_Wrapper.swift @@ -0,0 +1,29 @@ +--- swift-corelibs-libdispatch/src/swift/Wrapper.swift.orig 2023-06-15 00:55:45 UTC ++++ swift-corelibs-libdispatch/src/swift/Wrapper.swift +@@ -181,7 +181,7 @@ extension DispatchSource : DispatchSourceMachSend, + } + #endif + +-#if !os(Linux) && !os(Android) && !os(Windows) ++#if HAVE_MACH + extension DispatchSource : DispatchSourceProcess, + DispatchSourceFileSystemObject { + } +@@ -272,7 +272,7 @@ public protocol DispatchSourceMemoryPressure : Dispatc + } + #endif + +-#if !os(Linux) && !os(Android) && !os(Windows) ++#if HAVE_MACH + public protocol DispatchSourceProcess : DispatchSourceProtocol { + var handle: pid_t { get } + +@@ -302,7 +302,7 @@ public protocol DispatchSourceTimer : DispatchSourcePr + func scheduleRepeating(wallDeadline: DispatchWallTime, interval: Double, leeway: DispatchTimeInterval) + } + +-#if !os(Linux) && !os(Android) && !os(Windows) ++#if HAVE_MACH + public protocol DispatchSourceFileSystemObject : DispatchSourceProtocol { + var handle: Int32 { get } + diff --git a/lang/swift510/files/patch-swift-corelibs-libdispatch_tests_CMakeLists.txt b/lang/swift510/files/patch-swift-corelibs-libdispatch_tests_CMakeLists.txt new file mode 100644 index 000000000000..b442b1bfd7de --- /dev/null +++ b/lang/swift510/files/patch-swift-corelibs-libdispatch_tests_CMakeLists.txt @@ -0,0 +1,10 @@ +--- swift-corelibs-libdispatch/tests/CMakeLists.txt.orig 2023-06-15 00:55:45 UTC ++++ swift-corelibs-libdispatch/tests/CMakeLists.txt +@@ -47,6 +47,7 @@ add_executable(bsdtestharness + + add_executable(bsdtestharness + bsdtestharness.c) ++target_compile_options(bsdtestharness PRIVATE -fblocks) + target_include_directories(bsdtestharness + PRIVATE + ${CMAKE_CURRENT_BINARY_DIR} diff --git a/lang/swift510/files/patch-swift-corelibs-libdispatch_tests_bsdtestharness.c b/lang/swift510/files/patch-swift-corelibs-libdispatch_tests_bsdtestharness.c new file mode 100644 index 000000000000..99205ec47a62 --- /dev/null +++ b/lang/swift510/files/patch-swift-corelibs-libdispatch_tests_bsdtestharness.c @@ -0,0 +1,68 @@ +--- swift-corelibs-libdispatch/tests/bsdtestharness.c.orig 2023-06-15 00:55:45 UTC ++++ swift-corelibs-libdispatch/tests/bsdtestharness.c +@@ -20,6 +20,7 @@ + + #include <dispatch/dispatch.h> + #include <assert.h> ++#include <inttypes.h> + #include <stdio.h> + #include <stdlib.h> + #if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) +@@ -211,7 +212,7 @@ main(int argc, char *argv[]) + #else + dispatch_queue_t main_q = dispatch_get_main_queue(); + +- dispatch_source_t tmp_ds = dispatch_source_create(DISPATCH_SOURCE_TYPE_PROC, pid, DISPATCH_PROC_EXIT, main_q); ++ dispatch_source_t tmp_ds = dispatch_source_create(DISPATCH_SOURCE_TYPE_PROC, (uintptr_t)pid, DISPATCH_PROC_EXIT, main_q); + assert(tmp_ds); + dispatch_source_set_event_handler(tmp_ds, ^{ + int status; +@@ -221,14 +222,22 @@ main(int argc, char *argv[]) + gettimeofday(&tv_stop, NULL); + tv_wall.tv_sec = tv_stop.tv_sec - tv_start.tv_sec; + tv_wall.tv_sec -= (tv_stop.tv_usec < tv_start.tv_usec); ++#if defined(__FreeBSD__) ++ tv_wall.tv_usec = labs(tv_stop.tv_usec - tv_start.tv_usec); ++#else + tv_wall.tv_usec = abs(tv_stop.tv_usec - tv_start.tv_usec); ++#endif + + int res2 = wait4(pid, &status, 0, &usage); ++#ifdef NDEBUG ++ (void)res2; ++#else + assert(res2 != -1); ++#endif + test_long("Process exited", (WIFEXITED(status) && WEXITSTATUS(status) && WEXITSTATUS(status) != 0xff) || WIFSIGNALED(status), 0); +- printf("[PERF]\twall time: %ld.%06d\n", tv_wall.tv_sec, tv_wall.tv_usec); +- printf("[PERF]\tuser time: %ld.%06d\n", usage.ru_utime.tv_sec, usage.ru_utime.tv_usec); +- printf("[PERF]\tsystem time: %ld.%06d\n", usage.ru_stime.tv_sec, usage.ru_stime.tv_usec); ++ printf("[PERF]\twall time: %ld.%06" PRId64 "\n", tv_wall.tv_sec, (int64_t)tv_wall.tv_usec); ++ printf("[PERF]\tuser time: %ld.%06" PRId64 "\n", usage.ru_utime.tv_sec, (int64_t)usage.ru_utime.tv_usec); ++ printf("[PERF]\tsystem time: %ld.%06" PRId64 "\n", usage.ru_stime.tv_sec, (int64_t)usage.ru_stime.tv_usec); + printf("[PERF]\tmax resident set size: %ld\n", usage.ru_maxrss); + printf("[PERF]\tpage faults: %ld\n", usage.ru_majflt); + printf("[PERF]\tswaps: %ld\n", usage.ru_nswap); +@@ -253,7 +262,7 @@ main(int argc, char *argv[]) + #endif + } + +- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, to), main_q, ^{ ++ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)to), main_q, ^{ + kill(pid, SIGKILL); + fprintf(stderr, "Terminating unresponsive process (%0.1lfs)\n", (double)to / NSEC_PER_SEC); + }); +@@ -267,9 +276,13 @@ main(int argc, char *argv[]) + }); + dispatch_resume(tmp_ds); + ++#ifdef HAVE_POSIX_SPAWNP ++#ifdef __APPLE__ + if (spawnflags & POSIX_SPAWN_SETEXEC) { + usleep(USEC_PER_SEC/10); + } ++#endif ++#endif + kill(pid, SIGCONT); + + dispatch_main(); diff --git a/lang/swift510/files/patch-swift-corelibs-xctest_cmake_modules_SwiftSupport.cmake b/lang/swift510/files/patch-swift-corelibs-xctest_cmake_modules_SwiftSupport.cmake new file mode 100644 index 000000000000..c5456870f86f --- /dev/null +++ b/lang/swift510/files/patch-swift-corelibs-xctest_cmake_modules_SwiftSupport.cmake @@ -0,0 +1,15 @@ +--- swift-corelibs-xctest/cmake/modules/SwiftSupport.cmake.orig 2024-05-25 00:32:40 UTC ++++ swift-corelibs-xctest/cmake/modules/SwiftSupport.cmake +@@ -25,7 +25,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") diff --git a/lang/swift510/files/patch-swift-crypto b/lang/swift510/files/patch-swift-crypto new file mode 100644 index 000000000000..9e8fc931cf95 --- /dev/null +++ b/lang/swift510/files/patch-swift-crypto @@ -0,0 +1,686 @@ +--- swift-crypto/Sources/CCryptoBoringSSL/CMakeLists.txt.orig 2023-09-13 11:03:22 UTC ++++ swift-crypto/Sources/CCryptoBoringSSL/CMakeLists.txt +@@ -337,7 +337,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL Darwin AND CMAKE_SYSTEM_ + crypto/fipsmodule/vpaes-x86_64-mac.mac.x86_64.S + crypto/fipsmodule/x86_64-mont-mac.mac.x86_64.S + crypto/fipsmodule/x86_64-mont5-mac.mac.x86_64.S) +-elseif(CMAKE_SYSTEM_NAME MATCHES "Linux|Android" AND CMAKE_SYSTEM_PROCESSOR MATCHES "amd64|x86_64") ++elseif(CMAKE_SYSTEM_NAME MATCHES "Linux|Android|FreeBSD" AND CMAKE_SYSTEM_PROCESSOR MATCHES "amd64|x86_64") + target_sources(CCryptoBoringSSL PRIVATE + crypto/chacha/chacha-x86_64-linux.linux.x86_64.S + crypto/cipher_extra/aes128gcmsiv-x86_64-linux.linux.x86_64.S +@@ -373,7 +373,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL Darwin AND CMAKE_SYS + crypto/fipsmodule/sha256-armv8-ios.ios.aarch64.S + crypto/fipsmodule/sha512-armv8-ios.ios.aarch64.S + crypto/fipsmodule/vpaes-armv8-ios.ios.aarch64.S) +-elseif(CMAKE_SYSTEM_NAME MATCHES "Linux|Android" AND CMAKE_SYSTEM_PROCESSOR MATCHES "arm64|aarch64") ++elseif(CMAKE_SYSTEM_NAME MATCHES "Linux|Android|FreeBSD" AND CMAKE_SYSTEM_PROCESSOR MATCHES "arm64|aarch64") + target_sources(CCryptoBoringSSL PRIVATE + crypto/chacha/chacha-armv8-linux.linux.aarch64.S + crypto/cipher_extra/chacha20_poly1305_armv8-linux.linux.aarch64.S +--- swift-crypto/Sources/CCryptoBoringSSL/crypto/chacha/chacha-armv8-linux.linux.aarch64.S.orig 2023-09-13 11:03:22 UTC ++++ swift-crypto/Sources/CCryptoBoringSSL/crypto/chacha/chacha-armv8-linux.linux.aarch64.S +@@ -1,5 +1,5 @@ + #define BORINGSSL_PREFIX CCryptoBoringSSL +-#if defined(__aarch64__) && defined(__linux__) ++#if defined(__aarch64__) && (defined(__linux__) || defined(__FreeBSD__)) + // This file is generated from a similarly-named Perl script in the BoringSSL + // source tree. Do not edit by hand. + +@@ -1984,8 +1984,8 @@ ChaCha20_512_neon: + ret + .size ChaCha20_512_neon,.-ChaCha20_512_neon + #endif // !OPENSSL_NO_ASM && defined(OPENSSL_AARCH64) && defined(__ELF__) +-#endif // defined(__aarch64__) && defined(__linux__) +-#if defined(__linux__) && defined(__ELF__) ++#endif // defined(__aarch64__) && (defined(__linux__) || defined(__FreeBSD__)) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits + #endif + +--- swift-crypto/Sources/CCryptoBoringSSL/crypto/chacha/chacha-x86_64-linux.linux.x86_64.S.orig 2023-09-13 11:03:22 UTC ++++ swift-crypto/Sources/CCryptoBoringSSL/crypto/chacha/chacha-x86_64-linux.linux.x86_64.S +@@ -1,5 +1,5 @@ + #define BORINGSSL_PREFIX CCryptoBoringSSL +-#if defined(__x86_64__) && defined(__linux__) ++#if defined(__x86_64__) && (defined(__linux__) || defined(__FreeBSD__)) + // This file is generated from a similarly-named Perl script in the BoringSSL + // source tree. Do not edit by hand. + +@@ -1628,8 +1628,8 @@ ChaCha20_8x: + .cfi_endproc + .size ChaCha20_8x,.-ChaCha20_8x + #endif +-#endif // defined(__x86_64__) && defined(__linux__) +-#if defined(__linux__) && defined(__ELF__) ++#endif // defined(__x86_64__) && (defined(__linux__) || defined(__FreeBSD__)) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits + #endif + +--- swift-crypto/Sources/CCryptoBoringSSL/crypto/cipher_extra/aes128gcmsiv-x86_64-linux.linux.x86_64.S.orig 2023-09-13 11:03:22 UTC ++++ swift-crypto/Sources/CCryptoBoringSSL/crypto/cipher_extra/aes128gcmsiv-x86_64-linux.linux.x86_64.S +@@ -1,5 +1,5 @@ + #define BORINGSSL_PREFIX CCryptoBoringSSL +-#if defined(__x86_64__) && defined(__linux__) ++#if defined(__x86_64__) && (defined(__linux__) || defined(__FreeBSD__)) + // This file is generated from a similarly-named Perl script in the BoringSSL + // source tree. Do not edit by hand. + +@@ -3089,8 +3089,8 @@ _CET_ENDBR + .cfi_endproc + .size aes256gcmsiv_kdf, .-aes256gcmsiv_kdf + #endif +-#endif // defined(__x86_64__) && defined(__linux__) +-#if defined(__linux__) && defined(__ELF__) ++#endif // defined(__x86_64__) && (defined(__linux__) || defined(__FreeBSD__)) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits + #endif + +--- swift-crypto/Sources/CCryptoBoringSSL/crypto/cipher_extra/chacha20_poly1305_armv8-linux.linux.aarch64.S.orig 2023-09-13 11:03:22 UTC ++++ swift-crypto/Sources/CCryptoBoringSSL/crypto/cipher_extra/chacha20_poly1305_armv8-linux.linux.aarch64.S +@@ -1,5 +1,5 @@ + #define BORINGSSL_PREFIX CCryptoBoringSSL +-#if defined(__aarch64__) && defined(__linux__) ++#if defined(__aarch64__) && (defined(__linux__) || defined(__FreeBSD__)) + // This file is generated from a similarly-named Perl script in the BoringSSL + // source tree. Do not edit by hand. + +@@ -3009,8 +3009,8 @@ chacha20_poly1305_open: + .cfi_endproc + .size chacha20_poly1305_open,.-chacha20_poly1305_open + #endif // !OPENSSL_NO_ASM && defined(OPENSSL_AARCH64) && defined(__ELF__) +-#endif // defined(__aarch64__) && defined(__linux__) +-#if defined(__linux__) && defined(__ELF__) ++#endif // defined(__aarch64__) && (defined(__linux__) || defined(__FreeBSD__)) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits + #endif + +--- swift-crypto/Sources/CCryptoBoringSSL/crypto/cipher_extra/chacha20_poly1305_x86_64-linux.linux.x86_64.S.orig 2023-09-13 11:03:22 UTC ++++ swift-crypto/Sources/CCryptoBoringSSL/crypto/cipher_extra/chacha20_poly1305_x86_64-linux.linux.x86_64.S +@@ -1,5 +1,5 @@ + #define BORINGSSL_PREFIX CCryptoBoringSSL +-#if defined(__x86_64__) && defined(__linux__) ++#if defined(__x86_64__) && (defined(__linux__) || defined(__FreeBSD__)) + // This file is generated from a similarly-named Perl script in the BoringSSL + // source tree. Do not edit by hand. + +@@ -8918,8 +8918,8 @@ chacha20_poly1305_seal_avx2: + .cfi_endproc + .size chacha20_poly1305_seal_avx2, .-chacha20_poly1305_seal_avx2 + #endif +-#endif // defined(__x86_64__) && defined(__linux__) +-#if defined(__linux__) && defined(__ELF__) ++#endif // defined(__x86_64__) && (defined(__linux__) || defined(__FreeBSD__)) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits + #endif + +--- swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/aesni-gcm-x86_64-linux.linux.x86_64.S.orig 2023-09-13 11:03:22 UTC ++++ swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/aesni-gcm-x86_64-linux.linux.x86_64.S +@@ -1,5 +1,5 @@ + #define BORINGSSL_PREFIX CCryptoBoringSSL +-#if defined(__x86_64__) && defined(__linux__) ++#if defined(__x86_64__) && (defined(__linux__) || defined(__FreeBSD__)) + // This file is generated from a similarly-named Perl script in the BoringSSL + // source tree. Do not edit by hand. + +@@ -883,8 +883,8 @@ _CET_ENDBR + .align 64 + .text + #endif +-#endif // defined(__x86_64__) && defined(__linux__) +-#if defined(__linux__) && defined(__ELF__) ++#endif // defined(__x86_64__) && (defined(__linux__) || defined(__FreeBSD__)) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits + #endif + +--- swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/aesni-x86_64-linux.linux.x86_64.S.orig 2023-09-13 11:03:22 UTC ++++ swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/aesni-x86_64-linux.linux.x86_64.S +@@ -1,5 +1,5 @@ + #define BORINGSSL_PREFIX CCryptoBoringSSL +-#if defined(__x86_64__) && defined(__linux__) ++#if defined(__x86_64__) && (defined(__linux__) || defined(__FreeBSD__)) + // This file is generated from a similarly-named Perl script in the BoringSSL + // source tree. Do not edit by hand. + +@@ -2509,8 +2509,8 @@ _CET_ENDBR + .align 64 + .text + #endif +-#endif // defined(__x86_64__) && defined(__linux__) +-#if defined(__linux__) && defined(__ELF__) ++#endif // defined(__x86_64__) && (defined(__linux__) || defined(__FreeBSD__)) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits + #endif + +--- swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/aesv8-armv8-linux.linux.aarch64.S.orig 2023-09-13 11:03:22 UTC ++++ swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/aesv8-armv8-linux.linux.aarch64.S +@@ -1,5 +1,5 @@ + #define BORINGSSL_PREFIX CCryptoBoringSSL +-#if defined(__aarch64__) && defined(__linux__) ++#if defined(__aarch64__) && (defined(__linux__) || defined(__FreeBSD__)) + // This file is generated from a similarly-named Perl script in the BoringSSL + // source tree. Do not edit by hand. + +@@ -791,8 +791,8 @@ aes_hw_ctr32_encrypt_blocks: + .size aes_hw_ctr32_encrypt_blocks,.-aes_hw_ctr32_encrypt_blocks + #endif + #endif // !OPENSSL_NO_ASM && defined(OPENSSL_AARCH64) && defined(__ELF__) +-#endif // defined(__aarch64__) && defined(__linux__) +-#if defined(__linux__) && defined(__ELF__) ++#endif // defined(__aarch64__) && (defined(__linux__) || defined(__FreeBSD__)) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits + #endif + +--- swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/aesv8-gcm-armv8-linux.linux.aarch64.S.orig 2023-09-13 11:03:22 UTC ++++ swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/aesv8-gcm-armv8-linux.linux.aarch64.S +@@ -1,5 +1,5 @@ + #define BORINGSSL_PREFIX CCryptoBoringSSL +-#if defined(__aarch64__) && defined(__linux__) ++#if defined(__aarch64__) && (defined(__linux__) || defined(__FreeBSD__)) + // This file is generated from a similarly-named Perl script in the BoringSSL + // source tree. Do not edit by hand. + +@@ -1555,8 +1555,8 @@ aes_gcm_dec_kernel: + .size aes_gcm_dec_kernel,.-aes_gcm_dec_kernel + #endif + #endif // !OPENSSL_NO_ASM && defined(OPENSSL_AARCH64) && defined(__ELF__) +-#endif // defined(__aarch64__) && defined(__linux__) +-#if defined(__linux__) && defined(__ELF__) ++#endif // defined(__aarch64__) && (defined(__linux__) || defined(__FreeBSD__)) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits + #endif + +--- swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/armv8-mont-linux.linux.aarch64.S.orig 2023-09-13 11:03:22 UTC ++++ swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/armv8-mont-linux.linux.aarch64.S +@@ -1,5 +1,5 @@ + #define BORINGSSL_PREFIX CCryptoBoringSSL +-#if defined(__aarch64__) && defined(__linux__) ++#if defined(__aarch64__) && (defined(__linux__) || defined(__FreeBSD__)) + // This file is generated from a similarly-named Perl script in the BoringSSL + // source tree. Do not edit by hand. + +@@ -1425,8 +1425,8 @@ __bn_mul4x_mont: + .align 2 + .align 4 + #endif // !OPENSSL_NO_ASM && defined(OPENSSL_AARCH64) && defined(__ELF__) +-#endif // defined(__aarch64__) && defined(__linux__) +-#if defined(__linux__) && defined(__ELF__) ++#endif // defined(__aarch64__) && (defined(__linux__) || defined(__FreeBSD__)) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits + #endif + +--- swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/bn-armv8-linux.linux.aarch64.S.orig 2023-09-13 11:03:22 UTC ++++ swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/bn-armv8-linux.linux.aarch64.S +@@ -1,5 +1,5 @@ + #define BORINGSSL_PREFIX CCryptoBoringSSL +-#if defined(__aarch64__) && defined(__linux__) ++#if defined(__aarch64__) && (defined(__linux__) || defined(__FreeBSD__)) + // This file is generated from a similarly-named Perl script in the BoringSSL + // source tree. Do not edit by hand. + +@@ -89,8 +89,8 @@ bn_sub_words: + ret + .size bn_sub_words,.-bn_sub_words + #endif // !OPENSSL_NO_ASM && defined(OPENSSL_AARCH64) && defined(__ELF__) +-#endif // defined(__aarch64__) && defined(__linux__) +-#if defined(__linux__) && defined(__ELF__) ++#endif // defined(__aarch64__) && (defined(__linux__) || defined(__FreeBSD__)) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits + #endif + +--- swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/ghash-neon-armv8-linux.linux.aarch64.S.orig 2023-09-13 11:03:22 UTC ++++ swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/ghash-neon-armv8-linux.linux.aarch64.S +@@ -1,5 +1,5 @@ + #define BORINGSSL_PREFIX CCryptoBoringSSL +-#if defined(__aarch64__) && defined(__linux__) ++#if defined(__aarch64__) && (defined(__linux__) || defined(__FreeBSD__)) + // This file is generated from a similarly-named Perl script in the BoringSSL + // source tree. Do not edit by hand. + +@@ -335,8 +335,8 @@ gcm_ghash_neon: + .align 2 + .align 2 + #endif // !OPENSSL_NO_ASM && defined(OPENSSL_AARCH64) && defined(__ELF__) +-#endif // defined(__aarch64__) && defined(__linux__) +-#if defined(__linux__) && defined(__ELF__) ++#endif // defined(__aarch64__) && (defined(__linux__) || defined(__FreeBSD__)) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits + #endif + +--- swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/ghash-ssse3-x86_64-linux.linux.x86_64.S.orig 2023-09-13 11:03:22 UTC ++++ swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/ghash-ssse3-x86_64-linux.linux.x86_64.S +@@ -1,5 +1,5 @@ + #define BORINGSSL_PREFIX CCryptoBoringSSL +-#if defined(__x86_64__) && defined(__linux__) ++#if defined(__x86_64__) && (defined(__linux__) || defined(__FreeBSD__)) + // This file is generated from a similarly-named Perl script in the BoringSSL + // source tree. Do not edit by hand. + +@@ -423,8 +423,8 @@ _CET_ENDBR + .quad 0x0f0f0f0f0f0f0f0f, 0x0f0f0f0f0f0f0f0f + .text + #endif +-#endif // defined(__x86_64__) && defined(__linux__) +-#if defined(__linux__) && defined(__ELF__) ++#endif // defined(__x86_64__) && (defined(__linux__) || defined(__FreeBSD__)) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits + #endif + +--- swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/ghash-x86_64-linux.linux.x86_64.S.orig 2023-09-13 11:03:22 UTC ++++ swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/ghash-x86_64-linux.linux.x86_64.S +@@ -1,5 +1,5 @@ + #define BORINGSSL_PREFIX CCryptoBoringSSL +-#if defined(__x86_64__) && defined(__linux__) ++#if defined(__x86_64__) && (defined(__linux__) || defined(__FreeBSD__)) + // This file is generated from a similarly-named Perl script in the BoringSSL + // source tree. Do not edit by hand. + +@@ -1133,8 +1133,8 @@ _CET_ENDBR + .align 64 + .text + #endif +-#endif // defined(__x86_64__) && defined(__linux__) +-#if defined(__linux__) && defined(__ELF__) ++#endif // defined(__x86_64__) && (defined(__linux__) || defined(__FreeBSD__)) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits + #endif + +--- swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/ghashv8-armv8-linux.linux.aarch64.S.orig 2023-09-13 11:03:22 UTC ++++ swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/ghashv8-armv8-linux.linux.aarch64.S +@@ -1,5 +1,5 @@ + #define BORINGSSL_PREFIX CCryptoBoringSSL +-#if defined(__aarch64__) && defined(__linux__) ++#if defined(__aarch64__) && (defined(__linux__) || defined(__FreeBSD__)) + // This file is generated from a similarly-named Perl script in the BoringSSL + // source tree. Do not edit by hand. + +@@ -565,8 +565,8 @@ gcm_ghash_v8_4x: + .align 2 + #endif + #endif // !OPENSSL_NO_ASM && defined(OPENSSL_AARCH64) && defined(__ELF__) +-#endif // defined(__aarch64__) && defined(__linux__) +-#if defined(__linux__) && defined(__ELF__) ++#endif // defined(__aarch64__) && (defined(__linux__) || defined(__FreeBSD__)) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits + #endif + +--- swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/md5-x86_64-linux.linux.x86_64.S.orig 2023-09-13 11:03:22 UTC ++++ swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/md5-x86_64-linux.linux.x86_64.S +@@ -1,5 +1,5 @@ + #define BORINGSSL_PREFIX CCryptoBoringSSL +-#if defined(__x86_64__) && defined(__linux__) ++#if defined(__x86_64__) && (defined(__linux__) || defined(__FreeBSD__)) + // This file is generated from a similarly-named Perl script in the BoringSSL + // source tree. Do not edit by hand. + +@@ -695,8 +695,8 @@ _CET_ENDBR + .cfi_endproc + .size md5_block_asm_data_order,.-md5_block_asm_data_order + #endif +-#endif // defined(__x86_64__) && defined(__linux__) +-#if defined(__linux__) && defined(__ELF__) ++#endif // defined(__x86_64__) && (defined(__linux__) || defined(__FreeBSD__)) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits + #endif + +--- swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/p256-armv8-asm-linux.linux.aarch64.S.orig 2023-09-13 11:03:22 UTC ++++ swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/p256-armv8-asm-linux.linux.aarch64.S +@@ -1,5 +1,5 @@ + #define BORINGSSL_PREFIX CCryptoBoringSSL +-#if defined(__aarch64__) && defined(__linux__) ++#if defined(__aarch64__) && (defined(__linux__) || defined(__FreeBSD__)) + // This file is generated from a similarly-named Perl script in the BoringSSL + // source tree. Do not edit by hand. + +@@ -1726,8 +1726,8 @@ ecp_nistz256_select_w7: + ret + .size ecp_nistz256_select_w7,.-ecp_nistz256_select_w7 + #endif // !OPENSSL_NO_ASM && defined(OPENSSL_AARCH64) && defined(__ELF__) +-#endif // defined(__aarch64__) && defined(__linux__) +-#if defined(__linux__) && defined(__ELF__) ++#endif // defined(__aarch64__) && (defined(__linux__) || defined(__FreeBSD__)) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits + #endif + +--- swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/p256-x86_64-asm-linux.linux.x86_64.S.orig 2023-09-13 11:03:22 UTC ++++ swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/p256-x86_64-asm-linux.linux.x86_64.S +@@ -1,5 +1,5 @@ + #define BORINGSSL_PREFIX CCryptoBoringSSL +-#if defined(__x86_64__) && defined(__linux__) ++#if defined(__x86_64__) && (defined(__linux__) || defined(__FreeBSD__)) + // This file is generated from a similarly-named Perl script in the BoringSSL + // source tree. Do not edit by hand. + +@@ -4548,8 +4548,8 @@ ecp_nistz256_point_add_affinex: + .cfi_endproc + .size ecp_nistz256_point_add_affinex,.-ecp_nistz256_point_add_affinex + #endif +-#endif // defined(__x86_64__) && defined(__linux__) +-#if defined(__linux__) && defined(__ELF__) ++#endif // defined(__x86_64__) && (defined(__linux__) || defined(__FreeBSD__)) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits + #endif + +--- swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/p256_beeu-armv8-asm-linux.linux.aarch64.S.orig 2023-09-13 11:03:22 UTC ++++ swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/p256_beeu-armv8-asm-linux.linux.aarch64.S +@@ -1,5 +1,5 @@ + #define BORINGSSL_PREFIX CCryptoBoringSSL +-#if defined(__aarch64__) && defined(__linux__) ++#if defined(__aarch64__) && (defined(__linux__) || defined(__FreeBSD__)) + // This file is generated from a similarly-named Perl script in the BoringSSL + // source tree. Do not edit by hand. + +@@ -309,8 +309,8 @@ beeu_mod_inverse_vartime: + ret + .size beeu_mod_inverse_vartime,.-beeu_mod_inverse_vartime + #endif // !OPENSSL_NO_ASM && defined(OPENSSL_AARCH64) && defined(__ELF__) +-#endif // defined(__aarch64__) && defined(__linux__) +-#if defined(__linux__) && defined(__ELF__) ++#endif // defined(__aarch64__) && (defined(__linux__) || defined(__FreeBSD__)) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits + #endif + +--- swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/p256_beeu-x86_64-asm-linux.linux.x86_64.S.orig 2023-09-13 11:03:22 UTC ++++ swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/p256_beeu-x86_64-asm-linux.linux.x86_64.S +@@ -1,5 +1,5 @@ + #define BORINGSSL_PREFIX CCryptoBoringSSL +-#if defined(__x86_64__) && defined(__linux__) ++#if defined(__x86_64__) && (defined(__linux__) || defined(__FreeBSD__)) + // This file is generated from a similarly-named Perl script in the BoringSSL + // source tree. Do not edit by hand. + +@@ -336,8 +336,8 @@ _CET_ENDBR + + .size beeu_mod_inverse_vartime, .-beeu_mod_inverse_vartime + #endif +-#endif // defined(__x86_64__) && defined(__linux__) +-#if defined(__linux__) && defined(__ELF__) ++#endif // defined(__x86_64__) && (defined(__linux__) || defined(__FreeBSD__)) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits + #endif + +--- swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/rdrand-x86_64-linux.linux.x86_64.S.orig 2023-09-13 11:03:22 UTC ++++ swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/rdrand-x86_64-linux.linux.x86_64.S +@@ -1,5 +1,5 @@ + #define BORINGSSL_PREFIX CCryptoBoringSSL +-#if defined(__x86_64__) && defined(__linux__) ++#if defined(__x86_64__) && (defined(__linux__) || defined(__FreeBSD__)) + // This file is generated from a similarly-named Perl script in the BoringSSL + // source tree. Do not edit by hand. + +@@ -57,8 +57,8 @@ _CET_ENDBR + .cfi_endproc + .size CRYPTO_rdrand_multiple8_buf,.-CRYPTO_rdrand_multiple8_buf + #endif +-#endif // defined(__x86_64__) && defined(__linux__) +-#if defined(__linux__) && defined(__ELF__) ++#endif // defined(__x86_64__) && (defined(__linux__) || defined(__FreeBSD__)) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits + #endif + +--- swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/rsaz-avx2-linux.linux.x86_64.S.orig 2023-09-13 11:03:22 UTC ++++ swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/rsaz-avx2-linux.linux.x86_64.S +@@ -1,5 +1,5 @@ + #define BORINGSSL_PREFIX CCryptoBoringSSL +-#if defined(__x86_64__) && defined(__linux__) ++#if defined(__x86_64__) && (defined(__linux__) || defined(__FreeBSD__)) + // This file is generated from a similarly-named Perl script in the BoringSSL + // source tree. Do not edit by hand. + +@@ -1749,8 +1749,8 @@ _CET_ENDBR + .align 64 + .text + #endif +-#endif // defined(__x86_64__) && defined(__linux__) +-#if defined(__linux__) && defined(__ELF__) ++#endif // defined(__x86_64__) && (defined(__linux__) || defined(__FreeBSD__)) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits + #endif + +--- swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/sha1-armv8-linux.linux.aarch64.S.orig 2023-09-13 11:03:22 UTC ++++ swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/sha1-armv8-linux.linux.aarch64.S +@@ -1,5 +1,5 @@ + #define BORINGSSL_PREFIX CCryptoBoringSSL +-#if defined(__aarch64__) && defined(__linux__) ++#if defined(__aarch64__) && (defined(__linux__) || defined(__FreeBSD__)) + // This file is generated from a similarly-named Perl script in the BoringSSL + // source tree. Do not edit by hand. + +@@ -1227,8 +1227,8 @@ sha1_block_armv8: + .align 2 + .align 2 + #endif // !OPENSSL_NO_ASM && defined(OPENSSL_AARCH64) && defined(__ELF__) +-#endif // defined(__aarch64__) && defined(__linux__) +-#if defined(__linux__) && defined(__ELF__) ++#endif // defined(__aarch64__) && (defined(__linux__) || defined(__FreeBSD__)) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits + #endif + +--- swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/sha1-x86_64-linux.linux.x86_64.S.orig 2023-09-13 11:03:22 UTC ++++ swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/sha1-x86_64-linux.linux.x86_64.S +@@ -1,5 +1,5 @@ + #define BORINGSSL_PREFIX CCryptoBoringSSL +-#if defined(__x86_64__) && defined(__linux__) ++#if defined(__x86_64__) && (defined(__linux__) || defined(__FreeBSD__)) + // This file is generated from a similarly-named Perl script in the BoringSSL + // source tree. Do not edit by hand. + +@@ -5464,8 +5464,8 @@ K_XX_XX: + .align 64 + .text + #endif +-#endif // defined(__x86_64__) && defined(__linux__) +-#if defined(__linux__) && defined(__ELF__) ++#endif // defined(__x86_64__) && (defined(__linux__) || defined(__FreeBSD__)) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits + #endif + +--- swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/sha256-armv8-linux.linux.aarch64.S.orig 2023-09-13 11:03:22 UTC ++++ swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/sha256-armv8-linux.linux.aarch64.S +@@ -1,5 +1,5 @@ + #define BORINGSSL_PREFIX CCryptoBoringSSL +-#if defined(__aarch64__) && defined(__linux__) ++#if defined(__aarch64__) && (defined(__linux__) || defined(__FreeBSD__)) + // This file is generated from a similarly-named Perl script in the BoringSSL + // source tree. Do not edit by hand. + +@@ -1204,8 +1204,8 @@ sha256_block_armv8: + .size sha256_block_armv8,.-sha256_block_armv8 + #endif + #endif // !OPENSSL_NO_ASM && defined(OPENSSL_AARCH64) && defined(__ELF__) +-#endif // defined(__aarch64__) && defined(__linux__) +-#if defined(__linux__) && defined(__ELF__) ++#endif // defined(__aarch64__) && (defined(__linux__) || defined(__FreeBSD__)) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits + #endif + +--- swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/sha256-x86_64-linux.linux.x86_64.S.orig 2023-09-13 11:03:22 UTC ++++ swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/sha256-x86_64-linux.linux.x86_64.S +@@ -1,5 +1,5 @@ + #define BORINGSSL_PREFIX CCryptoBoringSSL +-#if defined(__x86_64__) && defined(__linux__) ++#if defined(__x86_64__) && (defined(__linux__) || defined(__FreeBSD__)) + // This file is generated from a similarly-named Perl script in the BoringSSL + // source tree. Do not edit by hand. + +@@ -4179,8 +4179,8 @@ sha256_block_data_order_avx: + .cfi_endproc + .size sha256_block_data_order_avx,.-sha256_block_data_order_avx + #endif +-#endif // defined(__x86_64__) && defined(__linux__) +-#if defined(__linux__) && defined(__ELF__) ++#endif // defined(__x86_64__) && (defined(__linux__) || defined(__FreeBSD__)) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits + #endif + +--- swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/sha512-armv8-linux.linux.aarch64.S.orig 2023-09-13 11:03:22 UTC ++++ swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/sha512-armv8-linux.linux.aarch64.S +@@ -1,5 +1,5 @@ + #define BORINGSSL_PREFIX CCryptoBoringSSL +-#if defined(__aarch64__) && defined(__linux__) ++#if defined(__aarch64__) && (defined(__linux__) || defined(__FreeBSD__)) + // This file is generated from a similarly-named Perl script in the BoringSSL + // source tree. Do not edit by hand. + +@@ -1606,8 +1606,8 @@ sha512_block_armv8: + .size sha512_block_armv8,.-sha512_block_armv8 + #endif + #endif // !OPENSSL_NO_ASM && defined(OPENSSL_AARCH64) && defined(__ELF__) +-#endif // defined(__aarch64__) && defined(__linux__) +-#if defined(__linux__) && defined(__ELF__) ++#endif // defined(__aarch64__) && (defined(__linux__) || defined(__FreeBSD__)) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits + #endif + +--- swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/sha512-x86_64-linux.linux.x86_64.S.orig 2023-09-13 11:03:22 UTC ++++ swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/sha512-x86_64-linux.linux.x86_64.S +@@ -1,5 +1,5 @@ + #define BORINGSSL_PREFIX CCryptoBoringSSL +-#if defined(__x86_64__) && defined(__linux__) ++#if defined(__x86_64__) && (defined(__linux__) || defined(__FreeBSD__)) + // This file is generated from a similarly-named Perl script in the BoringSSL + // source tree. Do not edit by hand. + +@@ -2987,8 +2987,8 @@ sha512_block_data_order_avx: + .cfi_endproc + .size sha512_block_data_order_avx,.-sha512_block_data_order_avx + #endif +-#endif // defined(__x86_64__) && defined(__linux__) +-#if defined(__linux__) && defined(__ELF__) ++#endif // defined(__x86_64__) && (defined(__linux__) || defined(__FreeBSD__)) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits + #endif + +--- swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/vpaes-armv8-linux.linux.aarch64.S.orig 2023-09-13 11:03:22 UTC ++++ swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/vpaes-armv8-linux.linux.aarch64.S +@@ -1,5 +1,5 @@ + #define BORINGSSL_PREFIX CCryptoBoringSSL +-#if defined(__aarch64__) && defined(__linux__) ++#if defined(__aarch64__) && (defined(__linux__) || defined(__FreeBSD__)) + // This file is generated from a similarly-named Perl script in the BoringSSL + // source tree. Do not edit by hand. + +@@ -1224,8 +1224,8 @@ vpaes_ctr32_encrypt_blocks: + ret + .size vpaes_ctr32_encrypt_blocks,.-vpaes_ctr32_encrypt_blocks + #endif // !OPENSSL_NO_ASM && defined(OPENSSL_AARCH64) && defined(__ELF__) +-#endif // defined(__aarch64__) && defined(__linux__) +-#if defined(__linux__) && defined(__ELF__) ++#endif // defined(__aarch64__) && (defined(__linux__) || defined(__FreeBSD__)) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits + #endif + +--- swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/vpaes-x86_64-linux.linux.x86_64.S.orig 2023-09-13 11:03:22 UTC ++++ swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/vpaes-x86_64-linux.linux.x86_64.S +@@ -1,5 +1,5 @@ + #define BORINGSSL_PREFIX CCryptoBoringSSL +-#if defined(__x86_64__) && defined(__linux__) ++#if defined(__x86_64__) && (defined(__linux__) || defined(__FreeBSD__)) + // This file is generated from a similarly-named Perl script in the BoringSSL + // source tree. Do not edit by hand. + +@@ -1133,8 +1133,8 @@ _vpaes_consts: + .size _vpaes_consts,.-_vpaes_consts + .text + #endif +-#endif // defined(__x86_64__) && defined(__linux__) +-#if defined(__linux__) && defined(__ELF__) ++#endif // defined(__x86_64__) && (defined(__linux__) || defined(__FreeBSD__)) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits + #endif + +--- swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/x86_64-mont-linux.linux.x86_64.S.orig 2023-09-13 11:03:22 UTC ++++ swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/x86_64-mont-linux.linux.x86_64.S +@@ -1,5 +1,5 @@ + #define BORINGSSL_PREFIX CCryptoBoringSSL +-#if defined(__x86_64__) && defined(__linux__) ++#if defined(__x86_64__) && (defined(__linux__) || defined(__FreeBSD__)) + // This file is generated from a similarly-named Perl script in the BoringSSL + // source tree. Do not edit by hand. + +@@ -1253,8 +1253,8 @@ bn_mulx4x_mont: + .byte 77,111,110,116,103,111,109,101,114,121,32,77,117,108,116,105,112,108,105,99,97,116,105,111,110,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 + .align 16 + #endif +-#endif // defined(__x86_64__) && defined(__linux__) +-#if defined(__linux__) && defined(__ELF__) ++#endif // defined(__x86_64__) && (defined(__linux__) || defined(__FreeBSD__)) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits + #endif + +--- swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/x86_64-mont5-linux.linux.x86_64.S.orig 2023-09-13 11:03:22 UTC ++++ swift-crypto/Sources/CCryptoBoringSSL/crypto/fipsmodule/x86_64-mont5-linux.linux.x86_64.S +@@ -1,5 +1,5 @@ + #define BORINGSSL_PREFIX CCryptoBoringSSL +-#if defined(__x86_64__) && defined(__linux__) ++#if defined(__x86_64__) && (defined(__linux__) || defined(__FreeBSD__)) + // This file is generated from a similarly-named Perl script in the BoringSSL + // source tree. Do not edit by hand. + +@@ -3625,8 +3625,8 @@ _CET_ENDBR + .byte 77,111,110,116,103,111,109,101,114,121,32,77,117,108,116,105,112,108,105,99,97,116,105,111,110,32,119,105,116,104,32,115,99,97,116,116,101,114,47,103,97,116,104,101,114,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 + .text + #endif +-#endif // defined(__x86_64__) && defined(__linux__) +-#if defined(__linux__) && defined(__ELF__) ++#endif // defined(__x86_64__) && (defined(__linux__) || defined(__FreeBSD__)) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits + #endif + +--- swift-crypto/Sources/Crypto/CMakeLists.txt.orig 2023-09-13 11:03:22 UTC ++++ swift-crypto/Sources/Crypto/CMakeLists.txt +@@ -100,7 +100,7 @@ target_compile_definitions(Crypto PRIVATE + target_compile_definitions(Crypto PRIVATE + "$<$<COMPILE_LANGUAGE:Swift>:CRYPTO_IN_SWIFTPM>") + +-if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "Android" OR CMAKE_SYSTEM_NAME STREQUAL "WASI") ++if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "Android" OR CMAKE_SYSTEM_NAME STREQUAL "WASI" OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + target_compile_definitions(Crypto PRIVATE + "$<$<COMPILE_LANGUAGE:Swift>:CRYPTO_IN_SWIFTPM_FORCE_BUILD_API>") + endif() +--- swift-crypto/cmake/modules/SwiftSupport.cmake.orig 2023-09-13 11:03:22 UTC ++++ swift-crypto/cmake/modules/SwiftSupport.cmake +@@ -42,6 +42,12 @@ function(get_swift_host_arch result_var_name) + set("${result_var_name}" "armv7" PARENT_SCOPE) + elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "AMD64") + set("${result_var_name}" "x86_64" PARENT_SCOPE) ++ elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "amd64") ++ 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 "IA64") + set("${result_var_name}" "itanium" PARENT_SCOPE) + elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86") diff --git a/lang/swift510/files/patch-swift-driver_Utilities_build-script-helper.py b/lang/swift510/files/patch-swift-driver_Utilities_build-script-helper.py new file mode 100644 index 000000000000..3fa1733f290b --- /dev/null +++ b/lang/swift510/files/patch-swift-driver_Utilities_build-script-helper.py @@ -0,0 +1,22 @@ +--- swift-driver/Utilities/build-script-helper.py.orig 2024-06-04 23:56:01 UTC ++++ swift-driver/Utilities/build-script-helper.py +@@ -108,6 +108,10 @@ def get_swiftpm_options(args): + # Android and fail. + '-Xswiftc', '-Xcc', '-Xswiftc', '-U_GNU_SOURCE', + ] ++ elif build_os.startswith('freebsd'): ++ swiftpm_args += [ ++ '-Xlinker', '-rpath', '-Xlinker', '$ORIGIN/../lib/swift/freebsd', ++ ] + else: + # Library rpath for swift, dispatch, Foundation, etc. when installing + swiftpm_args += [ +@@ -121,7 +125,7 @@ def install_binary(file, source_dir, install_dir, verb + + def install_binary(file, source_dir, install_dir, verbose): + print('Installing %s into: %s' % (file, install_dir)) +- cmd = ['rsync', '-a', os.path.join(source_dir, file), install_dir] ++ cmd = ['install', '-p', os.path.join(source_dir, file), install_dir] + if verbose: + print(' '.join(cmd)) + subprocess.check_call(cmd) diff --git a/lang/swift510/files/patch-swift-stress-tester_SwiftEvolve_Package.swift b/lang/swift510/files/patch-swift-stress-tester_SwiftEvolve_Package.swift new file mode 100644 index 000000000000..694335f4187c --- /dev/null +++ b/lang/swift510/files/patch-swift-stress-tester_SwiftEvolve_Package.swift @@ -0,0 +1,11 @@ +--- swift-stress-tester/SwiftEvolve/Package.swift.orig 2023-08-11 22:27:26 UTC ++++ swift-stress-tester/SwiftEvolve/Package.swift +@@ -2,7 +2,7 @@ import PackageDescription + + import PackageDescription + +-#if os(Linux) ++#if canImport(Glibc) + import Glibc + #else + import Darwin.C diff --git a/lang/swift510/files/patch-swift-syntax_cmake_modules_AddSwiftHostLibrary.cmake b/lang/swift510/files/patch-swift-syntax_cmake_modules_AddSwiftHostLibrary.cmake new file mode 100644 index 000000000000..1b77babd9890 --- /dev/null +++ b/lang/swift510/files/patch-swift-syntax_cmake_modules_AddSwiftHostLibrary.cmake @@ -0,0 +1,20 @@ +--- swift-syntax/cmake/modules/AddSwiftHostLibrary.cmake.orig 2024-05-07 16:02:05 UTC ++++ swift-syntax/cmake/modules/AddSwiftHostLibrary.cmake +@@ -44,6 +44,7 @@ function(add_swift_syntax_library name) + set(module_base "${module_dir}/${name}.swiftmodule") + set(module_file "${module_base}/${SWIFT_HOST_MODULE_TRIPLE}.swiftmodule") + set(module_interface_file "${module_base}/${SWIFT_HOST_MODULE_TRIPLE}.swiftinterface") ++ set(module_private_interface_file "${module_base}/${SWIFT_HOST_MODULE_TRIPLE}.private.swiftinterface") + set(module_sourceinfo_file "${module_base}/${SWIFT_HOST_MODULE_TRIPLE}.swiftsourceinfo") + + # Add a custom target to create the module directory. +@@ -76,7 +77,8 @@ function(add_swift_syntax_library name) + -enable-library-evolution; + -emit-module-path;${module_file}; + -emit-module-source-info-path;${module_sourceinfo_file}; +- -emit-module-interface-path;${module_interface_file} ++ -emit-module-interface-path;${module_interface_file}; ++ -emit-private-module-interface-path;${module_private_interface_file} + >) + if(SWIFT_MODULE_ABI_NAME_PREFIX) + # ABI name prefix. this can be used to avoid name conflicts. diff --git a/lang/swift510/files/patch-swift-system_Sources_System_Errno.swift b/lang/swift510/files/patch-swift-system_Sources_System_Errno.swift new file mode 100644 index 000000000000..99c0f922201c --- /dev/null +++ b/lang/swift510/files/patch-swift-system_Sources_System_Errno.swift @@ -0,0 +1,50 @@ +--- swift-system/Sources/System/Errno.swift.orig 2021-12-02 19:22:32 UTC ++++ swift-system/Sources/System/Errno.swift +@@ -1286,6 +1286,7 @@ public struct Errno: RawRepresentable, Error, Hashable + @available(*, unavailable, renamed: "multiHop") + public static var EMULTIHOP: Errno { multiHop } + ++#if !os(FreeBSD) + /// No message available. + /// + /// No message was available to be received by the requested operation. +@@ -1297,6 +1298,7 @@ public struct Errno: RawRepresentable, Error, Hashable + @_alwaysEmitIntoClient + @available(*, unavailable, renamed: "noData") + public static var ENODATA: Errno { noData } ++#endif + + /// Reserved. + /// +@@ -1310,6 +1312,7 @@ public struct Errno: RawRepresentable, Error, Hashable + @available(*, unavailable, renamed: "noLink") + public static var ENOLINK: Errno { noLink } + ++#if !os(FreeBSD) + /// Reserved. + /// + /// This error is reserved for future use. +@@ -1333,6 +1336,7 @@ public struct Errno: RawRepresentable, Error, Hashable + @_alwaysEmitIntoClient + @available(*, unavailable, renamed: "notStream") + public static var ENOSTR: Errno { notStream } ++#endif + + /// Protocol error. + /// +@@ -1348,6 +1352,7 @@ public struct Errno: RawRepresentable, Error, Hashable + @available(*, unavailable, renamed: "protocolError") + public static var EPROTO: Errno { protocolError } + ++#if !os(FreeBSD) + /// Reserved. + /// + /// This error is reserved for future use. +@@ -1359,6 +1364,7 @@ public struct Errno: RawRepresentable, Error, Hashable + @_alwaysEmitIntoClient + @available(*, unavailable, renamed: "timeout") + public static var ETIME: Errno { timeout } ++#endif + #endif + + /// Operation not supported on socket. diff --git a/lang/swift510/files/patch-swift-system_Sources_System_Internals_Constants.swift b/lang/swift510/files/patch-swift-system_Sources_System_Internals_Constants.swift new file mode 100644 index 000000000000..00b2b2682767 --- /dev/null +++ b/lang/swift510/files/patch-swift-system_Sources_System_Internals_Constants.swift @@ -0,0 +1,32 @@ +--- swift-system/Sources/System/Internals/Constants.swift.orig 2021-12-02 19:22:32 UTC ++++ swift-system/Sources/System/Internals/Constants.swift +@@ -396,23 +396,29 @@ internal var _EMULTIHOP: CInt { EMULTIHOP } + @_alwaysEmitIntoClient + internal var _EMULTIHOP: CInt { EMULTIHOP } + ++#if !os(FreeBSD) + @_alwaysEmitIntoClient + internal var _ENODATA: CInt { ENODATA } ++#endif + + @_alwaysEmitIntoClient + internal var _ENOLINK: CInt { ENOLINK } + ++#if !os(FreeBSD) + @_alwaysEmitIntoClient + internal var _ENOSR: CInt { ENOSR } + + @_alwaysEmitIntoClient + internal var _ENOSTR: CInt { ENOSTR } ++#endif + + @_alwaysEmitIntoClient + internal var _EPROTO: CInt { EPROTO } + ++#if !os(FreeBSD) + @_alwaysEmitIntoClient + internal var _ETIME: CInt { ETIME } ++#endif + #endif + + @_alwaysEmitIntoClient diff --git a/lang/swift510/files/patch-swift-tools-support-core_Sources_TSCBasic_Process.swift b/lang/swift510/files/patch-swift-tools-support-core_Sources_TSCBasic_Process.swift new file mode 100644 index 000000000000..9bf02134c66c --- /dev/null +++ b/lang/swift510/files/patch-swift-tools-support-core_Sources_TSCBasic_Process.swift @@ -0,0 +1,29 @@ +--- swift-tools-support-core/Sources/TSCBasic/Process.swift.orig 2024-05-11 20:29:37 UTC ++++ swift-tools-support-core/Sources/TSCBasic/Process.swift +@@ -605,7 +605,7 @@ public final class Process { + return stdinPipe.fileHandleForWriting + #elseif (!canImport(Darwin) || os(macOS)) + // Initialize the spawn attributes. +- #if canImport(Darwin) || os(Android) || os(OpenBSD) ++ #if canImport(Darwin) || os(Android) || os(OpenBSD) || os(FreeBSD) + var attributes: posix_spawnattr_t? = nil + #else + var attributes = posix_spawnattr_t() +@@ -650,7 +650,7 @@ public final class Process { + posix_spawnattr_setflags(&attributes, Int16(flags)) + + // Setup the file actions. +- #if canImport(Darwin) || os(Android) || os(OpenBSD) ++ #if canImport(Darwin) || os(Android) || os(OpenBSD) || os(FreeBSD) + var fileActions: posix_spawn_file_actions_t? = nil + #else + var fileActions = posix_spawn_file_actions_t() +@@ -666,6 +666,8 @@ public final class Process { + if #available(macOS 10.15, *) { + posix_spawn_file_actions_addchdir_np(&fileActions, workingDirectory) + } ++ #elseif os(FreeBSD) ++ posix_spawn_file_actions_addchdir_np(&fileActions, workingDirectory) + #elseif os(Linux) + guard SPM_posix_spawn_file_actions_addchdir_np_supported() else { + throw Process.Error.workingDirectoryNotSupported diff --git a/lang/swift510/files/patch-swift-tools-support-core_Sources_TSCUtility_FSWatch.swift b/lang/swift510/files/patch-swift-tools-support-core_Sources_TSCUtility_FSWatch.swift new file mode 100644 index 000000000000..9915e28993db --- /dev/null +++ b/lang/swift510/files/patch-swift-tools-support-core_Sources_TSCUtility_FSWatch.swift @@ -0,0 +1,29 @@ +--- swift-tools-support-core/Sources/TSCUtility/FSWatch.swift.orig 2024-05-11 20:29:37 UTC ++++ swift-tools-support-core/Sources/TSCUtility/FSWatch.swift +@@ -50,7 +50,7 @@ public class FSWatch { + self.paths = paths + self.latency = latency + +- #if os(OpenBSD) ++ #if os(OpenBSD) || os(FreeBSD) + self._watcher = NoOpWatcher(paths: paths, latency: latency, delegate: _WatcherDelegate(block: block)) + #elseif os(Windows) + self._watcher = RDCWatcher(paths: paths, latency: latency, delegate: _WatcherDelegate(block: block)) +@@ -100,7 +100,7 @@ private protocol _FileWatcher { + func stop() + } + +-#if os(OpenBSD) || (!os(macOS) && canImport(Darwin)) ++#if os(OpenBSD) || os(FreeBSD) || (!os(macOS) && canImport(Darwin)) + extension FSWatch._WatcherDelegate: NoOpWatcherDelegate {} + extension NoOpWatcher: _FileWatcher{} + #elseif os(Windows) +@@ -118,7 +118,7 @@ extension FSEventStream: _FileWatcher{} + + // MARK:- inotify + +-#if os(OpenBSD) || (!os(macOS) && canImport(Darwin)) ++#if os(OpenBSD) || os(FreeBSD) || (!os(macOS) && canImport(Darwin)) + + public protocol NoOpWatcherDelegate { + func pathsDidReceiveEvent(_ paths: [AbsolutePath]) diff --git a/lang/swift510/files/patch-swift-tools-support-core_Sources_TSCUtility_InterruptHandler.swift b/lang/swift510/files/patch-swift-tools-support-core_Sources_TSCUtility_InterruptHandler.swift new file mode 100644 index 000000000000..ccdf48e88c50 --- /dev/null +++ b/lang/swift510/files/patch-swift-tools-support-core_Sources_TSCUtility_InterruptHandler.swift @@ -0,0 +1,11 @@ +--- swift-tools-support-core/Sources/TSCUtility/InterruptHandler.swift.orig 2024-05-11 20:29:37 UTC ++++ swift-tools-support-core/Sources/TSCUtility/InterruptHandler.swift +@@ -74,7 +74,7 @@ public final class InterruptHandler { + } + #else + var action = sigaction() +- #if canImport(Darwin) || os(OpenBSD) ++ #if canImport(Darwin) || os(OpenBSD) || os(FreeBSD) + action.__sigaction_u.__sa_handler = self.signalHandler + #elseif os(Android) + action.sa_handler = self.signalHandler diff --git a/lang/swift510/files/patch-swift-tools-support-core_Sources_TSCUtility_Triple.swift b/lang/swift510/files/patch-swift-tools-support-core_Sources_TSCUtility_Triple.swift new file mode 100644 index 000000000000..abad17736514 --- /dev/null +++ b/lang/swift510/files/patch-swift-tools-support-core_Sources_TSCUtility_Triple.swift @@ -0,0 +1,28 @@ +--- swift-tools-support-core/Sources/TSCUtility/Triple.swift.orig 2024-05-11 20:29:37 UTC ++++ swift-tools-support-core/Sources/TSCUtility/Triple.swift +@@ -71,6 +71,7 @@ public struct Triple: Encodable, Equatable, Sendable { + case linux + case windows + case wasi ++ case freebsd + case openbsd + } + +@@ -252,7 +253,7 @@ extension Triple { + switch os { + case .darwin, .macOS: + return ".dylib" +- case .linux, .openbsd: ++ case .linux, .openbsd, .freebsd: + return ".so" + case .windows: + return ".dll" +@@ -265,7 +266,7 @@ extension Triple { + switch os { + case .darwin, .macOS: + return "" +- case .linux, .openbsd: ++ case .linux, .openbsd, .freebsd: + return "" + case .wasi: + return ".wasm" diff --git a/lang/swift510/files/patch-swift_cmake_modules_AddSwiftUnittests.cmake b/lang/swift510/files/patch-swift_cmake_modules_AddSwiftUnittests.cmake new file mode 100644 index 000000000000..6b702df563f0 --- /dev/null +++ b/lang/swift510/files/patch-swift_cmake_modules_AddSwiftUnittests.cmake @@ -0,0 +1,11 @@ +--- swift/cmake/modules/AddSwiftUnittests.cmake.orig 2024-06-06 04:26:30 UTC ++++ swift/cmake/modules/AddSwiftUnittests.cmake +@@ -32,6 +32,8 @@ function(add_swift_unittest test_dirname) + # function defined by AddLLVM.cmake. + add_unittest(SwiftUnitTests ${test_dirname} ${ASU_UNPARSED_ARGUMENTS}) + ++ target_link_options(${test_dirname} PRIVATE "SHELL:-Xlinker -z" "SHELL:-Xlinker nostart-stop-gc") ++ + set_target_properties(${test_dirname} PROPERTIES LINKER_LANGUAGE CXX) + + # TODO: _add_variant_c_compile_link_flags and these tests should share some diff --git a/lang/swift510/files/patch-swift_cmake_modules_SwiftCXXUtils.cmake b/lang/swift510/files/patch-swift_cmake_modules_SwiftCXXUtils.cmake new file mode 100644 index 000000000000..ed8e622b09d8 --- /dev/null +++ b/lang/swift510/files/patch-swift_cmake_modules_SwiftCXXUtils.cmake @@ -0,0 +1,9 @@ +--- swift/cmake/modules/SwiftCXXUtils.cmake.orig 2024-06-06 04:26:30 UTC ++++ swift/cmake/modules/SwiftCXXUtils.cmake +@@ -1,6 +1,5 @@ set(SWIFT_LIBSTDCXX_PLATFORMS + # Platforms that use libstdc++ as the system-wide default C++ standard library. + set(SWIFT_LIBSTDCXX_PLATFORMS + "LINUX" +- "FREEBSD" + "CYGWIN" + "HAIKU") diff --git a/lang/swift510/files/patch-swift_cmake_modules_SwiftConfigureSDK.cmake b/lang/swift510/files/patch-swift_cmake_modules_SwiftConfigureSDK.cmake new file mode 100644 index 000000000000..59a05021548a --- /dev/null +++ b/lang/swift510/files/patch-swift_cmake_modules_SwiftConfigureSDK.cmake @@ -0,0 +1,11 @@ +--- swift/cmake/modules/SwiftConfigureSDK.cmake.orig 2024-06-06 04:26:30 UTC ++++ swift/cmake/modules/SwiftConfigureSDK.cmake +@@ -378,7 +378,7 @@ macro(configure_sdk_unix name architectures) + message(FATAL_ERROR "unknown arch for ${prefix}: ${arch}") + endif() + elseif("${prefix}" STREQUAL "FREEBSD") +- if(NOT arch MATCHES "(arm64|x86_64)") ++ if(NOT arch MATCHES "(aarch64|x86_64)") + message(FATAL_ERROR "unsupported arch for FreeBSD: ${arch}") + endif() + diff --git a/lang/swift510/files/patch-swift_include_swift_SILOptimizer_Differentiation_DifferentiationInvoker.h b/lang/swift510/files/patch-swift_include_swift_SILOptimizer_Differentiation_DifferentiationInvoker.h new file mode 100644 index 000000000000..5a2f3bf9b516 --- /dev/null +++ b/lang/swift510/files/patch-swift_include_swift_SILOptimizer_Differentiation_DifferentiationInvoker.h @@ -0,0 +1,15 @@ +--- swift/include/swift/SILOptimizer/Differentiation/DifferentiationInvoker.h.orig 2024-06-06 04:26:30 UTC ++++ swift/include/swift/SILOptimizer/Differentiation/DifferentiationInvoker.h +@@ -60,7 +60,12 @@ struct DifferentiationInvoker { (private) + + private: + Kind kind; ++#if defined(__FreeBSD__) ++ // Workaround. On FreeBSD you can't have an std::pair in a union. ++ struct Value { ++#else + union Value { ++#endif + /// The instruction associated with the `DifferentiableFunctionInst` case. + DifferentiableFunctionInst *diffFuncInst; + Value(DifferentiableFunctionInst *inst) : diffFuncInst(inst) {} diff --git a/lang/swift510/files/patch-swift_lib_ClangImporter_ClangImporter.cpp b/lang/swift510/files/patch-swift_lib_ClangImporter_ClangImporter.cpp new file mode 100644 index 000000000000..16353a0c788a --- /dev/null +++ b/lang/swift510/files/patch-swift_lib_ClangImporter_ClangImporter.cpp @@ -0,0 +1,27 @@ +--- swift/lib/ClangImporter/ClangImporter.cpp.orig 2024-06-06 04:26:30 UTC ++++ swift/lib/ClangImporter/ClangImporter.cpp +@@ -4143,9 +4143,22 @@ void ClangModuleUnit::getImportedModulesForLookup( + for (auto importMod : topLevelImported) { + auto wrapper = owner.getWrapperForModule(importMod); + +- auto actualMod = wrapper->getOverlayModule(); +- if (!actualMod || actualMod == topLevelOverlay) ++ ModuleDecl *actualMod = nullptr; ++ if (owner.SwiftContext.LangOpts.EnableCXXInterop && topLevel && ++ isCxxStdModule(topLevel) && wrapper->clangModule && ++ isCxxStdModule(wrapper->clangModule)) { ++ // The CxxStdlib overlay re-exports the clang module std, which in recent ++ // libc++ versions re-exports top-level modules for different std headers ++ // (std_string, std_vector, etc). The overlay module for each of the std ++ // modules is the CxxStdlib module itself. Make sure we return the actual ++ // clang modules (std_xyz) as transitive dependencies instead of just ++ // CxxStdlib itself. + actualMod = wrapper->getParentModule(); ++ } else { ++ actualMod = wrapper->getOverlayModule(); ++ if (!actualMod || actualMod == topLevelOverlay) ++ actualMod = wrapper->getParentModule(); ++ } + + assert(actualMod && "Missing imported overlay"); + imports.push_back({ImportPath::Access(), actualMod}); diff --git a/lang/swift510/files/patch-swift_lib_IRGen_GenDecl.cpp b/lang/swift510/files/patch-swift_lib_IRGen_GenDecl.cpp new file mode 100644 index 000000000000..e43ffd2c0868 --- /dev/null +++ b/lang/swift510/files/patch-swift_lib_IRGen_GenDecl.cpp @@ -0,0 +1,22 @@ +--- swift/lib/IRGen/GenDecl.cpp.orig 2024-06-06 04:26:30 UTC ++++ swift/lib/IRGen/GenDecl.cpp +@@ -486,6 +486,8 @@ void IRGenModule::emitSourceFile(SourceFile &SF) { + this->addLinkLibrary(LinkLibrary("c++", LibraryKind::Library)); + else if (target.isOSLinux()) + this->addLinkLibrary(LinkLibrary("stdc++", LibraryKind::Library)); ++ else if (target.isOSFreeBSD()) ++ this->addLinkLibrary(LinkLibrary("c++", LibraryKind::Library)); + + // Do not try to link Cxx with itself. + if (!getSwiftModule()->getName().is("Cxx")) { +@@ -509,6 +511,10 @@ void IRGenModule::emitSourceFile(SourceFile &SF) { + case llvm::Triple::Linux: + if (!target.isAndroid()) + this->addLinkLibrary(LinkLibrary("swiftCxxStdlib", ++ LibraryKind::Library)); ++ break; ++ case llvm::Triple::FreeBSD: ++ this->addLinkLibrary(LinkLibrary("swiftCxxStdlib", + LibraryKind::Library)); + break; + case llvm::Triple::Win32: { diff --git a/lang/swift510/files/patch-swift_lib_IRGen_IRGen.cpp b/lang/swift510/files/patch-swift_lib_IRGen_IRGen.cpp new file mode 100644 index 000000000000..0bc3b6c5052c --- /dev/null +++ b/lang/swift510/files/patch-swift_lib_IRGen_IRGen.cpp @@ -0,0 +1,12 @@ +--- swift/lib/IRGen/IRGen.cpp.orig 2024-06-06 04:26:30 UTC ++++ swift/lib/IRGen/IRGen.cpp +@@ -135,6 +135,9 @@ swift::getIRTargetOptions(const IRGenOptions &Opts, AS + if (Clang->getTargetInfo().getTriple().isOSBinFormatWasm()) + TargetOpts.ThreadModel = llvm::ThreadModel::Single; + ++ if (Clang->getTargetInfo().getTriple().isOSFreeBSD()) ++ TargetOpts.UseInitArray = 1; ++ + if (Opts.EnableGlobalISel) { + TargetOpts.EnableGlobalISel = true; + TargetOpts.GlobalISelAbort = GlobalISelAbortMode::DisableWithDiag; diff --git a/lang/swift510/files/patch-swift_stdlib_cmake_modules_AddSwiftStdlib.cmake b/lang/swift510/files/patch-swift_stdlib_cmake_modules_AddSwiftStdlib.cmake new file mode 100644 index 000000000000..35d3fad3dfa5 --- /dev/null +++ b/lang/swift510/files/patch-swift_stdlib_cmake_modules_AddSwiftStdlib.cmake @@ -0,0 +1,13 @@ +--- swift/stdlib/cmake/modules/AddSwiftStdlib.cmake.orig 2024-06-06 04:26:30 UTC ++++ swift/stdlib/cmake/modules/AddSwiftStdlib.cmake +@@ -1209,6 +1209,10 @@ function(add_swift_target_library_single target name) + set_target_properties("${target}" + PROPERTIES + INSTALL_RPATH "$ORIGIN") ++ elseif("${SWIFTLIB_SINGLE_SDK}" STREQUAL "FREEBSD") ++ set_target_properties("${target}" ++ PROPERTIES ++ INSTALL_RPATH "$ORIGIN") + endif() + + set_target_properties("${target}" PROPERTIES BUILD_WITH_INSTALL_RPATH YES) diff --git a/lang/swift510/files/patch-swift_stdlib_public_Cxx_std_CMakeLists.txt b/lang/swift510/files/patch-swift_stdlib_public_Cxx_std_CMakeLists.txt new file mode 100644 index 000000000000..b502585feece --- /dev/null +++ b/lang/swift510/files/patch-swift_stdlib_public_Cxx_std_CMakeLists.txt @@ -0,0 +1,11 @@ +--- swift/stdlib/public/Cxx/std/CMakeLists.txt.orig 2024-06-06 04:26:30 UTC ++++ swift/stdlib/public/Cxx/std/CMakeLists.txt +@@ -52,7 +52,7 @@ add_swift_target_library(swiftCxxStdlib STATIC NO_LINK + DEPLOYMENT_VERSION_OSX ${COMPATIBILITY_MINIMUM_DEPLOYMENT_VERSION_OSX} + + LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}" +- TARGET_SDKS ALL_APPLE_PLATFORMS LINUX WINDOWS ++ TARGET_SDKS ALL_APPLE_PLATFORMS LINUX FREEBSD WINDOWS + INSTALL_IN_COMPONENT compiler + INSTALL_WITH_SHARED + DEPENDS libstdcxx-modulemap libcxxshim_modulemap CxxStdlib-apinotes) diff --git a/lang/swift510/files/patch-swift_stdlib_public_Platform_Platform.swift b/lang/swift510/files/patch-swift_stdlib_public_Platform_Platform.swift new file mode 100644 index 000000000000..9dd9bb347299 --- /dev/null +++ b/lang/swift510/files/patch-swift_stdlib_public_Platform_Platform.swift @@ -0,0 +1,35 @@ +--- swift/stdlib/public/Platform/Platform.swift.orig 2024-06-06 04:26:30 UTC ++++ swift/stdlib/public/Platform/Platform.swift +@@ -334,12 +334,12 @@ public var SIG_HOLD: sig_t { return unsafeBitCast(5, t + public var SIG_IGN: sig_t { return unsafeBitCast(1, to: sig_t.self) } + public var SIG_ERR: sig_t { return unsafeBitCast(-1, to: sig_t.self) } + public var SIG_HOLD: sig_t { return unsafeBitCast(5, to: sig_t.self) } +-#elseif os(OpenBSD) ++#elseif os(OpenBSD) || os(FreeBSD) + public var SIG_DFL: sig_t? { return nil } + public var SIG_IGN: sig_t { return unsafeBitCast(1, to: sig_t.self) } + public var SIG_ERR: sig_t { return unsafeBitCast(-1, to: sig_t.self) } + public var SIG_HOLD: sig_t { return unsafeBitCast(3, to: sig_t.self) } +-#elseif os(Linux) || os(FreeBSD) || os(PS4) || os(Android) || os(Haiku) ++#elseif os(Linux) || os(PS4) || os(Android) || os(Haiku) + public typealias sighandler_t = __sighandler_t + + public var SIG_DFL: sighandler_t? { return nil } +@@ -471,6 +471,17 @@ extension Duration { + } + } + ++#endif ++ ++#if os(FreeBSD) ++//===----------------------------------------------------------------------===// ++// arpa/inet.h ++//===----------------------------------------------------------------------===// ++ ++@inline(__always) ++public func inet_pton(_ af: Int32, _ src: UnsafePointer<CChar>!, _ dst: UnsafeMutableRawPointer!) -> Int32 { ++ return __inet_pton(af, src, dst) ++} + #endif + + //===----------------------------------------------------------------------===// diff --git a/lang/swift510/files/patch-swift_stdlib_public_Platform_glibc.modulemap.gyb b/lang/swift510/files/patch-swift_stdlib_public_Platform_glibc.modulemap.gyb new file mode 100644 index 000000000000..b4f10d3075c7 --- /dev/null +++ b/lang/swift510/files/patch-swift_stdlib_public_Platform_glibc.modulemap.gyb @@ -0,0 +1,11 @@ +--- swift/stdlib/public/Platform/glibc.modulemap.gyb.orig 2024-06-06 04:26:30 UTC ++++ swift/stdlib/public/Platform/glibc.modulemap.gyb +@@ -19,7 +19,7 @@ module SwiftGlibc [system] { + /// It's not named just Glibc so that it doesn't conflict in the event of a + /// future official glibc modulemap. + module SwiftGlibc [system] { +-% if CMAKE_SDK in ["LINUX", "ANDROID", "OPENBSD"]: ++% if CMAKE_SDK in ["LINUX", "ANDROID", "FREEBSD", "OPENBSD"]: + link "m" + % end + % if CMAKE_SDK in ["LINUX", "FREEBSD", "OPENBSD", "CYGWIN"]: diff --git a/lang/swift510/files/patch-swift_stdlib_public_SwiftShims_swift_shims_SwiftStdint.h b/lang/swift510/files/patch-swift_stdlib_public_SwiftShims_swift_shims_SwiftStdint.h new file mode 100644 index 000000000000..445e4a364ae3 --- /dev/null +++ b/lang/swift510/files/patch-swift_stdlib_public_SwiftShims_swift_shims_SwiftStdint.h @@ -0,0 +1,11 @@ +--- swift/stdlib/public/SwiftShims/swift/shims/SwiftStdint.h.orig 2024-06-06 04:26:30 UTC ++++ swift/stdlib/public/SwiftShims/swift/shims/SwiftStdint.h +@@ -24,7 +24,7 @@ + + // Clang has been defining __INTxx_TYPE__ macros for a long time. + // __UINTxx_TYPE__ are defined only since Clang 3.5. +-#if !defined(__APPLE__) && !defined(__linux__) && !defined(__OpenBSD__) && !defined(__wasi__) ++#if !defined(__APPLE__) && !defined(__linux__) && !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__wasi__) + #include <stdint.h> + typedef int64_t __swift_int64_t; + typedef uint64_t __swift_uint64_t; diff --git a/lang/swift510/files/patch-swift_stdlib_public_core_CTypes.swift b/lang/swift510/files/patch-swift_stdlib_public_core_CTypes.swift new file mode 100644 index 000000000000..d6dc21db1d0b --- /dev/null +++ b/lang/swift510/files/patch-swift_stdlib_public_core_CTypes.swift @@ -0,0 +1,12 @@ +--- swift/stdlib/public/core/CTypes.swift.orig 2024-06-06 04:26:30 UTC ++++ swift/stdlib/public/core/CTypes.swift +@@ -106,6 +106,9 @@ public typealias CLongDouble = Float80 + #elseif os(FreeBSD) + #if arch(x86_64) || arch(i386) + public typealias CLongDouble = Float80 ++#elseif arch(arm64) ++// FreeBSD on arm64 uses 128-bit floating point type for 'long double'. ++// Swift doesn't have Float128 yet so we don't define CLongDouble. + #else + #error("CLongDouble needs to be defined for this FreeBSD architecture") + #endif diff --git a/lang/swift510/files/patch-swift_stdlib_public_stubs_Random.cpp b/lang/swift510/files/patch-swift_stdlib_public_stubs_Random.cpp new file mode 100644 index 000000000000..f972d24e3588 --- /dev/null +++ b/lang/swift510/files/patch-swift_stdlib_public_stubs_Random.cpp @@ -0,0 +1,11 @@ +--- swift/stdlib/public/stubs/Random.cpp.orig 2024-06-06 04:26:30 UTC ++++ swift/stdlib/public/stubs/Random.cpp +@@ -54,7 +54,7 @@ using namespace swift; + + using namespace swift; + +-#if defined(__APPLE__) ++#if defined(__APPLE__) || defined(__FreeBSD__) + + SWIFT_RUNTIME_STDLIB_API + void swift_stdlib_random(void *buf, __swift_size_t nbytes) { diff --git a/lang/swift510/files/patch-swift_tools_SourceKit_cmake_modules_AddSwiftSourceKit.cmake b/lang/swift510/files/patch-swift_tools_SourceKit_cmake_modules_AddSwiftSourceKit.cmake new file mode 100644 index 000000000000..ed901db9db7e --- /dev/null +++ b/lang/swift510/files/patch-swift_tools_SourceKit_cmake_modules_AddSwiftSourceKit.cmake @@ -0,0 +1,11 @@ +--- swift/tools/SourceKit/cmake/modules/AddSwiftSourceKit.cmake.orig 2024-06-06 04:26:30 UTC ++++ swift/tools/SourceKit/cmake/modules/AddSwiftSourceKit.cmake +@@ -115,7 +115,7 @@ function(add_sourcekit_swift_runtime_link_flags target + LINK_FLAGS " -lobjc ") + + endif() # HAS_SWIFT_MODULES AND ASKD_BOOTSTRAPPING_MODE +- elseif(SWIFT_HOST_VARIANT_SDK MATCHES "LINUX|ANDROID|OPENBSD" AND HAS_SWIFT_MODULES AND ASKD_BOOTSTRAPPING_MODE) ++ elseif(SWIFT_HOST_VARIANT_SDK MATCHES "LINUX|ANDROID|FREEBSD|OPENBSD" AND HAS_SWIFT_MODULES AND ASKD_BOOTSTRAPPING_MODE) + set(swiftrt "swiftImageRegistrationObject${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_OBJECT_FORMAT}-${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_LIB_SUBDIR}-${SWIFT_HOST_VARIANT_ARCH}") + if(ASKD_BOOTSTRAPPING_MODE MATCHES "HOSTTOOLS|CROSSCOMPILE") + # At build time and run time, link against the swift libraries in the diff --git a/lang/swift510/files/patch-swift_tools_libStaticMirror_CMakeLists.txt b/lang/swift510/files/patch-swift_tools_libStaticMirror_CMakeLists.txt new file mode 100644 index 000000000000..d7849fd70d8f --- /dev/null +++ b/lang/swift510/files/patch-swift_tools_libStaticMirror_CMakeLists.txt @@ -0,0 +1,11 @@ +--- swift/tools/libStaticMirror/CMakeLists.txt.orig 2024-06-06 04:26:30 UTC ++++ swift/tools/libStaticMirror/CMakeLists.txt +@@ -20,6 +20,8 @@ target_link_libraries(libStaticMirror PRIVATE + swiftStaticMirror + swiftRemoteInspection) + ++target_link_options(libStaticMirror PRIVATE "SHELL:-Xlinker -z" "SHELL:-Xlinker nostart-stop-gc") ++ + set_target_properties(libStaticMirror + PROPERTIES + OUTPUT_NAME ${SWIFT_SCAN_LIB_NAME}) diff --git a/lang/swift510/files/patch-swift_tools_libSwiftScan_CMakeLists.txt b/lang/swift510/files/patch-swift_tools_libSwiftScan_CMakeLists.txt new file mode 100644 index 000000000000..ade59e7f2e77 --- /dev/null +++ b/lang/swift510/files/patch-swift_tools_libSwiftScan_CMakeLists.txt @@ -0,0 +1,11 @@ +--- swift/tools/libSwiftScan/CMakeLists.txt.orig 2024-06-06 04:26:30 UTC ++++ swift/tools/libSwiftScan/CMakeLists.txt +@@ -26,6 +26,8 @@ target_link_libraries(libSwiftScan PRIVATE + swiftRemoteInspection + swiftCompilerModules) + ++target_link_options(libSwiftScan PRIVATE "SHELL:-Xlinker -z" "SHELL:-Xlinker nostart-stop-gc") ++ + set_target_properties(libSwiftScan + PROPERTIES + OUTPUT_NAME ${SWIFT_SCAN_LIB_NAME}) diff --git a/lang/swift510/files/patch-swift_unittests_AST_CMakeLists.txt b/lang/swift510/files/patch-swift_unittests_AST_CMakeLists.txt new file mode 100644 index 000000000000..daf65226c36e --- /dev/null +++ b/lang/swift510/files/patch-swift_unittests_AST_CMakeLists.txt @@ -0,0 +1,13 @@ +--- swift/unittests/AST/CMakeLists.txt.orig 2024-06-06 04:26:30 UTC ++++ swift/unittests/AST/CMakeLists.txt +@@ -12,7 +12,10 @@ target_link_libraries(SwiftASTTests + target_link_libraries(SwiftASTTests + PRIVATE + swiftAST ++ swiftFrontend + # FIXME: Circular dependencies. + swiftParse + swiftSema ++ swiftSILGen ++ swiftSILOptimizer + ) diff --git a/lang/swift510/files/patch-swift_unittests_ClangImporter_CMakeLists.txt b/lang/swift510/files/patch-swift_unittests_ClangImporter_CMakeLists.txt new file mode 100644 index 000000000000..68fe5729150a --- /dev/null +++ b/lang/swift510/files/patch-swift_unittests_ClangImporter_CMakeLists.txt @@ -0,0 +1,13 @@ +--- swift/unittests/ClangImporter/CMakeLists.txt.orig 2024-06-06 04:26:30 UTC ++++ swift/unittests/ClangImporter/CMakeLists.txt +@@ -8,6 +8,10 @@ target_link_libraries(SwiftClangImporterTests + target_link_libraries(SwiftClangImporterTests + PRIVATE + swiftClangImporter ++ swiftFrontend + swiftParse + swiftAST ++ swiftSIL ++ swiftSILGen ++ swiftSILOptimizer + ) diff --git a/lang/swift510/files/patch-swift_unittests_Driver_CMakeLists.txt b/lang/swift510/files/patch-swift_unittests_Driver_CMakeLists.txt new file mode 100644 index 000000000000..b96c13df9c37 --- /dev/null +++ b/lang/swift510/files/patch-swift_unittests_Driver_CMakeLists.txt @@ -0,0 +1,13 @@ +--- swift/unittests/Driver/CMakeLists.txt.orig 2024-06-06 04:26:30 UTC ++++ swift/unittests/Driver/CMakeLists.txt +@@ -7,4 +7,9 @@ target_link_libraries(SwiftDriverTests PRIVATE + target_link_libraries(SwiftDriverTests PRIVATE + swiftAST + swiftClangImporter +- swiftDriver) ++ swiftDriver ++ swiftFrontend ++ swiftSIL ++ swiftSILGen ++ swiftSILOptimizer ++) diff --git a/lang/swift510/files/patch-swift_unittests_IDE_CMakeLists.txt b/lang/swift510/files/patch-swift_unittests_IDE_CMakeLists.txt new file mode 100644 index 000000000000..6d8b3ea5f890 --- /dev/null +++ b/lang/swift510/files/patch-swift_unittests_IDE_CMakeLists.txt @@ -0,0 +1,11 @@ +--- swift/unittests/IDE/CMakeLists.txt.orig 2024-06-06 04:26:30 UTC ++++ swift/unittests/IDE/CMakeLists.txt +@@ -5,5 +5,8 @@ target_link_libraries(SwiftIDETests + ) + target_link_libraries(SwiftIDETests + PRIVATE ++ swiftFrontend + swiftIDE ++ swiftSILGen ++ swiftSILOptimizer + ) diff --git a/lang/swift510/files/patch-swift_unittests_Parse_CMakeLists.txt b/lang/swift510/files/patch-swift_unittests_Parse_CMakeLists.txt new file mode 100644 index 000000000000..b172ed58027f --- /dev/null +++ b/lang/swift510/files/patch-swift_unittests_Parse_CMakeLists.txt @@ -0,0 +1,13 @@ +--- swift/unittests/Parse/CMakeLists.txt.orig 2024-06-06 04:26:30 UTC ++++ swift/unittests/Parse/CMakeLists.txt +@@ -6,7 +6,10 @@ target_link_libraries(SwiftParseTests + + target_link_libraries(SwiftParseTests + PRIVATE ++ swiftFrontend + swiftSIL ++ swiftSILGen ++ swiftSILOptimizer + swiftClangImporter + swiftParse + swiftAST diff --git a/lang/swift510/files/patch-swift_unittests_Sema_CMakeLists.txt b/lang/swift510/files/patch-swift_unittests_Sema_CMakeLists.txt new file mode 100644 index 000000000000..437ac1c3089d --- /dev/null +++ b/lang/swift510/files/patch-swift_unittests_Sema_CMakeLists.txt @@ -0,0 +1,16 @@ +--- swift/unittests/Sema/CMakeLists.txt.orig 2024-06-06 04:26:30 UTC ++++ swift/unittests/Sema/CMakeLists.txt +@@ -11,8 +11,12 @@ target_link_libraries(swiftSemaTests + target_link_libraries(swiftSemaTests + PRIVATE + swiftAST ++ swiftFrontend + swiftSema +- swiftSerialization) ++ swiftSerialization ++ swiftSILGen ++ swiftSILOptimizer ++) + + target_compile_definitions(swiftSemaTests PRIVATE + SWIFTLIB_DIR=\"${SWIFTLIB_DIR}\") diff --git a/lang/swift510/files/patch-swift_utils_build-script-impl b/lang/swift510/files/patch-swift_utils_build-script-impl new file mode 100644 index 000000000000..7fd64fa08bd8 --- /dev/null +++ b/lang/swift510/files/patch-swift_utils_build-script-impl @@ -0,0 +1,61 @@ +--- swift/utils/build-script-impl.orig 2024-06-06 04:26:30 UTC ++++ swift/utils/build-script-impl +@@ -23,6 +23,8 @@ umask 0022 + + umask 0022 + ++python3=python3 ++ + # Declare the set of known settings along with each one's description + # + # If you add a user-settable variable, add it to this list. +@@ -345,7 +347,7 @@ function quoted_print() { + } + + function quoted_print() { +- python3 -c 'import shlex; import sys; print(" ".join(shlex.quote(arg) for arg in sys.argv[1:]))' "$@" ++ ${python3} -c 'import shlex; import sys; print(" ".join(shlex.quote(arg) for arg in sys.argv[1:]))' "$@" + } + + function toupper() { +@@ -461,7 +463,7 @@ function verify_host_is_supported() { + function verify_host_is_supported() { + local host="$1" + case ${host} in +- freebsd-arm64 \ ++ freebsd-aarch64 \ + | freebsd-x86_64 \ + | openbsd-amd64 \ + | cygwin-x86_64 \ +@@ -2353,7 +2355,7 @@ for host in "${ALL_HOSTS[@]}"; do + XCTEST_BUILD_ARGS="--release" + fi + +- call python3 "${XCTEST_SOURCE_DIR}"/build_script.py \ ++ call ${python3} "${XCTEST_SOURCE_DIR}"/build_script.py \ + --swiftc="${SWIFTC_BIN}" \ + --build-dir="${XCTEST_BUILD_DIR}" \ + --foundation-build-dir="${FOUNDATION_BUILD_DIR}" \ +@@ -2848,7 +2850,7 @@ for host in "${ALL_HOSTS[@]}"; do + echo "--- Running tests for ${product} ---" + FOUNDATION_BUILD_DIR=$(build_directory ${host} foundation) + XCTEST_BUILD_DIR=$(build_directory ${host} xctest) +- call python3 "${XCTEST_SOURCE_DIR}"/build_script.py test \ ++ call ${python3} "${XCTEST_SOURCE_DIR}"/build_script.py test \ + --swiftc="${SWIFTC_BIN}" \ + --lit="${LLVM_SOURCE_DIR}/utils/lit/lit.py" \ + --foundation-build-dir="${FOUNDATION_BUILD_DIR}" \ +@@ -3418,11 +3420,11 @@ function build_and_test_installable_package() { + with_pushd "${PKG_TESTS_SANDBOX_PARENT}" \ + call tar xzf "${package_for_host}" + +- if python3 -c "import psutil" ; then ++ if ${python3} -c "import psutil" ; then + TIMEOUT_ARGS=--timeout=600 # 10 minutes + fi + with_pushd "${PKG_TESTS_SOURCE_DIR}" \ +- call python3 "${LIT_EXECUTABLE_PATH}" . ${LLVM_LIT_ARGS} --param package-path="${PKG_TESTS_SANDBOX}" --param test-exec-root="${PKG_TESTS_TEMPS}" --param llvm-bin-dir="${LLVM_BIN_DIR}" ${TIMEOUT_ARGS} ++ call ${python3} "${LIT_EXECUTABLE_PATH}" . ${LLVM_LIT_ARGS} --param package-path="${PKG_TESTS_SANDBOX}" --param test-exec-root="${PKG_TESTS_TEMPS}" --param llvm-bin-dir="${LLVM_BIN_DIR}" ${TIMEOUT_ARGS} + fi + fi + } diff --git a/lang/swift510/files/patch-swift_utils_swift__build__support_swift__build__support_products_cmark.py b/lang/swift510/files/patch-swift_utils_swift__build__support_swift__build__support_products_cmark.py new file mode 100644 index 000000000000..1f71c8a6acf7 --- /dev/null +++ b/lang/swift510/files/patch-swift_utils_swift__build__support_swift__build__support_products_cmark.py @@ -0,0 +1,7 @@ +--- swift/utils/swift_build_support/swift_build_support/products/cmark.py.orig 2024-06-06 04:26:30 UTC ++++ swift/utils/swift_build_support/swift_build_support/products/cmark.py +@@ -118,4 +118,3 @@ class CMark(cmake_product.CMakeProduct): + This phase might copy the artifacts from the previous phases into a + destination directory. + """ +- self.install_with_cmake(["install"], self.host_install_destdir(host_target)) diff --git a/lang/swift510/files/patch-swift_utils_swift__build__support_swift__build__support_targets.py b/lang/swift510/files/patch-swift_utils_swift__build__support_swift__build__support_targets.py new file mode 100644 index 000000000000..d2589f103316 --- /dev/null +++ b/lang/swift510/files/patch-swift_utils_swift__build__support_swift__build__support_targets.py @@ -0,0 +1,20 @@ +--- swift/utils/swift_build_support/swift_build_support/targets.py.orig 2024-06-06 04:26:30 UTC ++++ swift/utils/swift_build_support/swift_build_support/targets.py +@@ -278,7 +278,7 @@ class StdlibDeploymentTarget(object): + "riscv64", + "s390x"]) + +- FreeBSD = Platform("freebsd", archs=["x86_64", "arm64"]) ++ FreeBSD = Platform("freebsd", archs=["x86_64", "aarch64"]) + + OpenBSD = OpenBSDPlatform("openbsd", archs=["amd64"]) + +@@ -379,7 +379,7 @@ class StdlibDeploymentTarget(object): + if machine == 'amd64': + return StdlibDeploymentTarget.FreeBSD.x86_64 + elif machine == 'arm64': +- return StdlibDeploymentTarget.FreeBSD.arm64 ++ return StdlibDeploymentTarget.FreeBSD.aarch64 + + elif system == 'OpenBSD': + if machine == 'amd64': diff --git a/lang/swift510/files/patch-swiftpm_Sources_Basics_Cancellator.swift b/lang/swift510/files/patch-swiftpm_Sources_Basics_Cancellator.swift new file mode 100644 index 000000000000..18d303a9b27d --- /dev/null +++ b/lang/swift510/files/patch-swiftpm_Sources_Basics_Cancellator.swift @@ -0,0 +1,11 @@ +--- swiftpm/Sources/Basics/Cancellator.swift.orig 2024-06-05 06:47:24 UTC ++++ swiftpm/Sources/Basics/Cancellator.swift +@@ -79,7 +79,7 @@ public final class Cancellator: Cancellable { + + // Install the default signal handler. + var action = sigaction() +- #if canImport(Darwin) || os(OpenBSD) ++ #if canImport(Darwin) || os(OpenBSD) || os(FreeBSD) + action.__sigaction_u.__sa_handler = SIG_DFL + #elseif canImport(Musl) + action.__sa_handler.sa_handler = SIG_DFL diff --git a/lang/swift510/files/patch-swiftpm_Sources_Basics_DispatchTimeInterval+Extensions.swift b/lang/swift510/files/patch-swiftpm_Sources_Basics_DispatchTimeInterval+Extensions.swift new file mode 100644 index 000000000000..87b63a02b2cc --- /dev/null +++ b/lang/swift510/files/patch-swiftpm_Sources_Basics_DispatchTimeInterval+Extensions.swift @@ -0,0 +1,11 @@ +--- swiftpm/Sources/Basics/DispatchTimeInterval+Extensions.swift.orig 2024-06-05 06:47:24 UTC ++++ swiftpm/Sources/Basics/DispatchTimeInterval+Extensions.swift +@@ -95,7 +95,7 @@ extension DispatchTimeInterval { + } + + // remove when available to all platforms +-#if os(Linux) || os(Windows) || os(Android) || os(OpenBSD) ++#if os(Linux) || os(Windows) || os(Android) || os(OpenBSD) || os(FreeBSD) + extension DispatchTime { + public func distance(to: DispatchTime) -> DispatchTimeInterval { + let final = to.uptimeNanoseconds diff --git a/lang/swift510/files/patch-swiftpm_Sources_Basics_Triple+Basics.swift b/lang/swift510/files/patch-swiftpm_Sources_Basics_Triple+Basics.swift new file mode 100644 index 000000000000..18050c65dc1a --- /dev/null +++ b/lang/swift510/files/patch-swiftpm_Sources_Basics_Triple+Basics.swift @@ -0,0 +1,20 @@ +--- swiftpm/Sources/Basics/Triple+Basics.swift.orig 2024-06-05 06:47:24 UTC ++++ swiftpm/Sources/Basics/Triple+Basics.swift +@@ -136,7 +136,7 @@ extension Triple { + switch os { + case _ where isDarwin(): + return ".dylib" +- case .linux, .openbsd: ++ case .linux, .openbsd, .freebsd: + return ".so" + case .win32: + return ".dll" +@@ -155,7 +155,7 @@ extension Triple { + switch os { + case _ where isDarwin(): + return "" +- case .linux, .openbsd: ++ case .linux, .openbsd, .freebsd: + return "" + case .wasi: + return ".wasm" diff --git a/lang/swift510/files/patch-swiftpm_Sources_Basics_Vendor_Triple+Platforms.swift b/lang/swift510/files/patch-swiftpm_Sources_Basics_Vendor_Triple+Platforms.swift new file mode 100644 index 000000000000..694b0cf2a026 --- /dev/null +++ b/lang/swift510/files/patch-swiftpm_Sources_Basics_Vendor_Triple+Platforms.swift @@ -0,0 +1,11 @@ +--- swiftpm/Sources/Basics/Vendor/Triple+Platforms.swift.orig 2024-06-05 06:47:24 UTC ++++ swiftpm/Sources/Basics/Vendor/Triple+Platforms.swift +@@ -304,7 +304,7 @@ extension Triple { + + case .linux: + return environment == .android ? "android" : "linux" +- case .freeBSD: ++ case .freebsd: + return "freebsd" + case .openbsd: + return "openbsd" diff --git a/lang/swift510/files/patch-swiftpm_Sources_Basics_Vendor_Triple.swift b/lang/swift510/files/patch-swiftpm_Sources_Basics_Vendor_Triple.swift new file mode 100644 index 000000000000..c942c03ea200 --- /dev/null +++ b/lang/swift510/files/patch-swiftpm_Sources_Basics_Vendor_Triple.swift @@ -0,0 +1,20 @@ +--- swiftpm/Sources/Basics/Vendor/Triple.swift.orig 2024-06-05 06:47:24 UTC ++++ swiftpm/Sources/Basics/Vendor/Triple.swift +@@ -1089,7 +1089,7 @@ extension Triple { + case cloudABI = "cloudabi" + case darwin + case dragonFly = "dragonfly" +- case freeBSD = "freebsd" ++ case freebsd + case fuchsia + case ios + case kfreebsd +@@ -1137,7 +1137,7 @@ extension Triple { + case _ where os.hasPrefix("dragonfly"): + return .dragonFly + case _ where os.hasPrefix("freebsd"): +- return .freeBSD ++ return .freebsd + case _ where os.hasPrefix("fuchsia"): + return .fuchsia + case _ where os.hasPrefix("ios"): diff --git a/lang/swift510/files/patch-swiftpm_Sources_Build_BuildDescription_ClangTargetBuildDescription.swift b/lang/swift510/files/patch-swiftpm_Sources_Build_BuildDescription_ClangTargetBuildDescription.swift new file mode 100644 index 000000000000..dad7ed123ed7 --- /dev/null +++ b/lang/swift510/files/patch-swiftpm_Sources_Build_BuildDescription_ClangTargetBuildDescription.swift @@ -0,0 +1,17 @@ +--- swiftpm/Sources/Build/BuildDescription/ClangTargetBuildDescription.swift.orig 2024-06-05 06:47:24 UTC ++++ swiftpm/Sources/Build/BuildDescription/ClangTargetBuildDescription.swift +@@ -245,12 +245,12 @@ public final class ClangTargetBuildDescription { + // 2. on Windows when compiling for any language, because of issues with the Windows SDK + // 3. on Android when compiling for any language, because of issues with the Android SDK + enableModules = !(buildParameters.targetTriple.isDarwin() && isCXX) && !buildParameters.targetTriple +- .isWindows() && !buildParameters.targetTriple.isAndroid() ++ .isWindows() && !buildParameters.targetTriple.isAndroid() && buildParameters.targetTriple.os != .freebsd + } else { + // For version >= 5.8, we disable them when compiling for C++ regardless of platforms, see: + // https://github.com/llvm/llvm-project/issues/55980 for clang frontend crash when module + // enabled for C++ on c++17 standard and above. +- enableModules = !isCXX && !buildParameters.targetTriple.isWindows() && !buildParameters.targetTriple.isAndroid() ++ enableModules = !isCXX && !buildParameters.targetTriple.isWindows() && !buildParameters.targetTriple.isAndroid() && buildParameters.targetTriple.os != .freebsd + } + + if enableModules { diff --git a/lang/swift510/files/patch-swiftpm_Sources_Build_BuildPlan_BuildPlan+Product.swift b/lang/swift510/files/patch-swiftpm_Sources_Build_BuildPlan_BuildPlan+Product.swift new file mode 100644 index 000000000000..0ba4912a28c4 --- /dev/null +++ b/lang/swift510/files/patch-swiftpm_Sources_Build_BuildPlan_BuildPlan+Product.swift @@ -0,0 +1,11 @@ +--- swiftpm/Sources/Build/BuildPlan/BuildPlan+Product.swift.orig 2024-06-05 06:47:24 UTC ++++ swiftpm/Sources/Build/BuildPlan/BuildPlan+Product.swift +@@ -54,6 +54,8 @@ extension BuildPlan { + if case let target as ClangTarget = target.underlyingTarget, target.isCXX { + if buildParameters.targetTriple.isDarwin() { + buildProduct.additionalFlags += ["-lc++"] ++ } else if buildParameters.targetTriple.os == .freebsd { ++ buildProduct.additionalFlags += ["-lc++"] + } else if buildParameters.targetTriple.isWindows() { + // Don't link any C++ library. + } else { diff --git a/lang/swift510/files/patch-swiftpm_Sources_SPMSQLite3_CMakeLists.txt b/lang/swift510/files/patch-swiftpm_Sources_SPMSQLite3_CMakeLists.txt new file mode 100644 index 000000000000..9f8ebc30be3a --- /dev/null +++ b/lang/swift510/files/patch-swiftpm_Sources_SPMSQLite3_CMakeLists.txt @@ -0,0 +1,10 @@ +--- swiftpm/Sources/SPMSQLite3/CMakeLists.txt.orig 2024-06-05 06:47:24 UTC ++++ swiftpm/Sources/SPMSQLite3/CMakeLists.txt +@@ -11,3 +11,7 @@ target_link_libraries(SPMSQLite3 INTERFACE + ${CMAKE_CURRENT_SOURCE_DIR}) + target_link_libraries(SPMSQLite3 INTERFACE + SQLite::SQLite3) ++ ++get_target_property(sqlite3_lib_full_path SQLite::SQLite3 IMPORTED_LOCATION) ++get_filename_component(sqlite3_lib_dir "${sqlite3_lib_full_path}" DIRECTORY) ++target_link_directories(SPMSQLite3 INTERFACE "${sqlite3_lib_dir}") diff --git a/lang/swift510/files/patch-yams_cmake_modules_SwiftSupport.cmake b/lang/swift510/files/patch-yams_cmake_modules_SwiftSupport.cmake new file mode 100644 index 000000000000..7fc640bab319 --- /dev/null +++ b/lang/swift510/files/patch-yams_cmake_modules_SwiftSupport.cmake @@ -0,0 +1,15 @@ +--- yams/cmake/modules/SwiftSupport.cmake.orig 2022-04-28 17:50:41 UTC ++++ yams/cmake/modules/SwiftSupport.cmake +@@ -29,6 +29,12 @@ function(swift_get_host_arch result_var_name) + set("${result_var_name}" "armv7" PARENT_SCOPE) + elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "AMD64") + set("${result_var_name}" "x86_64" PARENT_SCOPE) ++ elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "amd64") ++ 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 "IA64") + set("${result_var_name}" "itanium" PARENT_SCOPE) + elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86") diff --git a/lang/swift510/files/pkg-message.in b/lang/swift510/files/pkg-message.in new file mode 100644 index 000000000000..f2ff392fb5ca --- /dev/null +++ b/lang/swift510/files/pkg-message.in @@ -0,0 +1,2 @@ +The Swift compiler is installed in %%SWIFT_INSTALL_PREFIX%%/bin +You may want to add that directory to your shell's PATH. diff --git a/lang/swift510/files/start-build.sh b/lang/swift510/files/start-build.sh new file mode 100644 index 000000000000..a15ad0440540 --- /dev/null +++ b/lang/swift510/files/start-build.sh @@ -0,0 +1,34 @@ +swift_project_dir=$1 +swift_install_destdir=$2 +swift_install_prefix=$3 +clang_module_cache_path=$4 + +# For tools like 'ld', 'ar', 'ranlib', etc. prefer the versions from the base system +export PATH="/sbin:/bin:/usr/sbin:/usr/bin:${PATH}" + +export CLANG_MODULE_CACHE_PATH=${clang_module_cache_path} + +cd ${swift_project_dir}/swift && +utils/build-script --bootstrapping bootstrapping \ +--release \ +--assertions \ +--host-cc /usr/bin/clang \ +--host-cxx /usr/bin/clang++ \ +--llvm-targets-to-build 'AArch64;X86' \ +--skip-early-swift-driver \ +--skip-early-swiftsyntax \ +--libdispatch true \ +--foundation true \ +--xctest true \ +--swiftpm true \ +--llbuild true \ +--swiftsyntax true \ +--swift-driver true \ +--extra-cmake-options="-DSWIFT_USE_LINKER=lld" \ +--extra-cmake-options="-DLLVM_USE_LINKER=lld" \ +--llvm-max-parallel-lto-link-jobs 1 \ +--swift-tools-max-parallel-lto-link-jobs 1 \ +--install-destdir ${swift_install_destdir} \ +--install-prefix ${swift_install_prefix} \ +--install-all true \ +--verbose-build true diff --git a/lang/swift510/pkg-descr b/lang/swift510/pkg-descr new file mode 100644 index 000000000000..41761a6697dd --- /dev/null +++ b/lang/swift510/pkg-descr @@ -0,0 +1,10 @@ +The Swift programming language -- a modern programming language with +many great features. + +This port includes: + * the Swift compiler + * the Swift standard library + * various tools + * the Foundation framework + * the Swift Package Manager (SwiftPM) + * the run-time support that you need for running compiled programs diff --git a/lang/swift510/pkg-plist b/lang/swift510/pkg-plist new file mode 100644 index 000000000000..b85dc57aa4ad --- /dev/null +++ b/lang/swift510/pkg-plist @@ -0,0 +1,946 @@ +swift510/bin/clang +swift510/bin/clang++ +swift510/bin/clang-15 +swift510/bin/clang-cache +swift510/bin/clang-cl +swift510/bin/clang-cpp +swift510/bin/clangd +swift510/bin/complete-test +swift510/bin/ld.lld +swift510/bin/ld64.lld +swift510/bin/lld +swift510/bin/lld-link +swift510/bin/lldb-moduleimport-test +swift510/bin/llvm-ar +swift510/bin/llvm-cov +swift510/bin/llvm-profdata +swift510/bin/plutil +swift510/bin/sdk-module-lists/create-module-lists.sh +swift510/bin/sdk-module-lists/fixed-clang-modules-appletvos.txt +swift510/bin/sdk-module-lists/fixed-clang-modules-common.txt +swift510/bin/sdk-module-lists/fixed-clang-modules-iosmac.txt +swift510/bin/sdk-module-lists/fixed-clang-modules-iphoneos.txt +swift510/bin/sdk-module-lists/fixed-clang-modules-macosx.txt +swift510/bin/sdk-module-lists/fixed-clang-modules-watchos.txt +swift510/bin/sdk-module-lists/fixed-swift-modules-appletvos.txt +swift510/bin/sdk-module-lists/fixed-swift-modules-common.txt +swift510/bin/sdk-module-lists/fixed-swift-modules-iosmac.txt +swift510/bin/sdk-module-lists/fixed-swift-modules-iphoneos.txt +swift510/bin/sdk-module-lists/fixed-swift-modules-macosx.txt +swift510/bin/sdk-module-lists/fixed-swift-modules-watchos.txt +swift510/bin/sdk-module-lists/infer-imports.py +swift510/bin/sourcekitd-repl +swift510/bin/sourcekitd-test +swift510/bin/swift +swift510/bin/swift-api-checker.py +swift510/bin/swift-api-digester +swift510/bin/swift-api-dump.py +swift510/bin/swift-api-extract +swift510/bin/swift-ast-script +swift510/bin/swift-autolink-extract +swift510/bin/swift-build +swift510/bin/swift-build-sdk-interfaces +swift510/bin/swift-build-tool +swift510/bin/swift-cache-tool +swift510/bin/swift-compatibility-symbols +swift510/bin/swift-def-to-strings-converter +swift510/bin/swift-demangle +swift510/bin/swift-demangle-yamldump +swift510/bin/swift-driver +swift510/bin/swift-experimental-sdk +swift510/bin/swift-frontend +swift510/bin/swift-help +swift510/bin/swift-ide-test +swift510/bin/swift-indent +swift510/bin/swift-package +swift510/bin/swift-package-collection +swift510/bin/swift-package-registry +swift510/bin/swift-refactor +swift510/bin/swift-reflection-dump +swift510/bin/swift-remoteast-test +swift510/bin/swift-run +swift510/bin/swift-serialize-diagnostics +swift510/bin/swift-symbolgraph-extract +swift510/bin/swift-test +swift510/bin/swiftc +swift510/bin/wasm-ld +swift510/include/SourceKit/sourcekitd.h +swift510/include/llvm-c/lto.h +swift510/include/swift/Runtime/CMakeConfig.h +swift510/include/swift/SwiftRemoteMirror/MemoryReaderInterface.h +swift510/include/swift/SwiftRemoteMirror/Platform.h +swift510/include/swift/SwiftRemoteMirror/SwiftRemoteMirror.h +swift510/include/swift/SwiftRemoteMirror/SwiftRemoteMirrorTypes.h +swift510/include/swift/SwiftRemoteMirror/module.modulemap +swift510/include/swift/bridging +swift510/include/swift/module.modulemap +swift510/lib/clang/15.0.0/include/__clang_cuda_builtin_vars.h +swift510/lib/clang/15.0.0/include/__clang_cuda_cmath.h +swift510/lib/clang/15.0.0/include/__clang_cuda_complex_builtins.h +swift510/lib/clang/15.0.0/include/__clang_cuda_device_functions.h +swift510/lib/clang/15.0.0/include/__clang_cuda_intrinsics.h +swift510/lib/clang/15.0.0/include/__clang_cuda_libdevice_declares.h +swift510/lib/clang/15.0.0/include/__clang_cuda_math.h +swift510/lib/clang/15.0.0/include/__clang_cuda_math_forward_declares.h +swift510/lib/clang/15.0.0/include/__clang_cuda_runtime_wrapper.h +swift510/lib/clang/15.0.0/include/__clang_cuda_texture_intrinsics.h +swift510/lib/clang/15.0.0/include/__clang_hip_cmath.h +swift510/lib/clang/15.0.0/include/__clang_hip_libdevice_declares.h +swift510/lib/clang/15.0.0/include/__clang_hip_math.h +swift510/lib/clang/15.0.0/include/__clang_hip_runtime_wrapper.h +swift510/lib/clang/15.0.0/include/__stddef_max_align_t.h +swift510/lib/clang/15.0.0/include/__wmmintrin_aes.h +swift510/lib/clang/15.0.0/include/__wmmintrin_pclmul.h +swift510/lib/clang/15.0.0/include/adxintrin.h +swift510/lib/clang/15.0.0/include/altivec.h +swift510/lib/clang/15.0.0/include/ammintrin.h +swift510/lib/clang/15.0.0/include/amxintrin.h +swift510/lib/clang/15.0.0/include/arm64intr.h +swift510/lib/clang/15.0.0/include/arm_acle.h +swift510/lib/clang/15.0.0/include/arm_bf16.h +swift510/lib/clang/15.0.0/include/arm_cde.h +swift510/lib/clang/15.0.0/include/arm_cmse.h +swift510/lib/clang/15.0.0/include/arm_fp16.h +swift510/lib/clang/15.0.0/include/arm_mve.h +swift510/lib/clang/15.0.0/include/arm_neon.h +swift510/lib/clang/15.0.0/include/arm_sve.h +swift510/lib/clang/15.0.0/include/armintr.h +swift510/lib/clang/15.0.0/include/avx2intrin.h +swift510/lib/clang/15.0.0/include/avx512bf16intrin.h +swift510/lib/clang/15.0.0/include/avx512bitalgintrin.h +swift510/lib/clang/15.0.0/include/avx512bwintrin.h +swift510/lib/clang/15.0.0/include/avx512cdintrin.h +swift510/lib/clang/15.0.0/include/avx512dqintrin.h +swift510/lib/clang/15.0.0/include/avx512erintrin.h +swift510/lib/clang/15.0.0/include/avx512fintrin.h +swift510/lib/clang/15.0.0/include/avx512fp16intrin.h +swift510/lib/clang/15.0.0/include/avx512ifmaintrin.h +swift510/lib/clang/15.0.0/include/avx512ifmavlintrin.h +swift510/lib/clang/15.0.0/include/avx512pfintrin.h +swift510/lib/clang/15.0.0/include/avx512vbmi2intrin.h +swift510/lib/clang/15.0.0/include/avx512vbmiintrin.h +swift510/lib/clang/15.0.0/include/avx512vbmivlintrin.h +swift510/lib/clang/15.0.0/include/avx512vlbf16intrin.h +swift510/lib/clang/15.0.0/include/avx512vlbitalgintrin.h +swift510/lib/clang/15.0.0/include/avx512vlbwintrin.h +swift510/lib/clang/15.0.0/include/avx512vlcdintrin.h +swift510/lib/clang/15.0.0/include/avx512vldqintrin.h +swift510/lib/clang/15.0.0/include/avx512vlfp16intrin.h +swift510/lib/clang/15.0.0/include/avx512vlintrin.h +swift510/lib/clang/15.0.0/include/avx512vlvbmi2intrin.h +swift510/lib/clang/15.0.0/include/avx512vlvnniintrin.h +swift510/lib/clang/15.0.0/include/avx512vlvp2intersectintrin.h +swift510/lib/clang/15.0.0/include/avx512vnniintrin.h +swift510/lib/clang/15.0.0/include/avx512vp2intersectintrin.h +swift510/lib/clang/15.0.0/include/avx512vpopcntdqintrin.h +swift510/lib/clang/15.0.0/include/avx512vpopcntdqvlintrin.h +swift510/lib/clang/15.0.0/include/avxintrin.h +swift510/lib/clang/15.0.0/include/avxvnniintrin.h +swift510/lib/clang/15.0.0/include/bmi2intrin.h +swift510/lib/clang/15.0.0/include/bmiintrin.h +swift510/lib/clang/15.0.0/include/builtins.h +swift510/lib/clang/15.0.0/include/cet.h +swift510/lib/clang/15.0.0/include/cetintrin.h +swift510/lib/clang/15.0.0/include/cldemoteintrin.h +swift510/lib/clang/15.0.0/include/clflushoptintrin.h +swift510/lib/clang/15.0.0/include/clwbintrin.h +swift510/lib/clang/15.0.0/include/clzerointrin.h +swift510/lib/clang/15.0.0/include/cpuid.h +swift510/lib/clang/15.0.0/include/crc32intrin.h +swift510/lib/clang/15.0.0/include/cuda_wrappers/algorithm +swift510/lib/clang/15.0.0/include/cuda_wrappers/complex +swift510/lib/clang/15.0.0/include/cuda_wrappers/new +swift510/lib/clang/15.0.0/include/emmintrin.h +swift510/lib/clang/15.0.0/include/enqcmdintrin.h +swift510/lib/clang/15.0.0/include/f16cintrin.h +swift510/lib/clang/15.0.0/include/float.h +swift510/lib/clang/15.0.0/include/fma4intrin.h +swift510/lib/clang/15.0.0/include/fmaintrin.h +swift510/lib/clang/15.0.0/include/fuzzer/FuzzedDataProvider.h +swift510/lib/clang/15.0.0/include/fxsrintrin.h +swift510/lib/clang/15.0.0/include/gfniintrin.h +swift510/lib/clang/15.0.0/include/hexagon_circ_brev_intrinsics.h +swift510/lib/clang/15.0.0/include/hexagon_protos.h +swift510/lib/clang/15.0.0/include/hexagon_types.h +swift510/lib/clang/15.0.0/include/hresetintrin.h +swift510/lib/clang/15.0.0/include/htmintrin.h +swift510/lib/clang/15.0.0/include/htmxlintrin.h +swift510/lib/clang/15.0.0/include/hvx_hexagon_protos.h +swift510/lib/clang/15.0.0/include/ia32intrin.h +swift510/lib/clang/15.0.0/include/immintrin.h +swift510/lib/clang/15.0.0/include/intrin.h +swift510/lib/clang/15.0.0/include/inttypes.h +swift510/lib/clang/15.0.0/include/invpcidintrin.h +swift510/lib/clang/15.0.0/include/iso646.h +swift510/lib/clang/15.0.0/include/keylockerintrin.h +swift510/lib/clang/15.0.0/include/limits.h +swift510/lib/clang/15.0.0/include/lwpintrin.h +swift510/lib/clang/15.0.0/include/lzcntintrin.h +swift510/lib/clang/15.0.0/include/mm3dnow.h +swift510/lib/clang/15.0.0/include/mm_malloc.h +swift510/lib/clang/15.0.0/include/mmintrin.h +swift510/lib/clang/15.0.0/include/module.modulemap +swift510/lib/clang/15.0.0/include/movdirintrin.h +swift510/lib/clang/15.0.0/include/msa.h +swift510/lib/clang/15.0.0/include/mwaitxintrin.h +swift510/lib/clang/15.0.0/include/nmmintrin.h +swift510/lib/clang/15.0.0/include/opencl-c-base.h +swift510/lib/clang/15.0.0/include/opencl-c.h +swift510/lib/clang/15.0.0/include/openmp_wrappers/__clang_openmp_device_functions.h +swift510/lib/clang/15.0.0/include/openmp_wrappers/cmath +swift510/lib/clang/15.0.0/include/openmp_wrappers/complex +swift510/lib/clang/15.0.0/include/openmp_wrappers/complex.h +swift510/lib/clang/15.0.0/include/openmp_wrappers/complex_cmath.h +swift510/lib/clang/15.0.0/include/openmp_wrappers/math.h +swift510/lib/clang/15.0.0/include/openmp_wrappers/new +swift510/lib/clang/15.0.0/include/orc/c_api.h +swift510/lib/clang/15.0.0/include/pconfigintrin.h +swift510/lib/clang/15.0.0/include/pkuintrin.h +swift510/lib/clang/15.0.0/include/pmmintrin.h +swift510/lib/clang/15.0.0/include/popcntintrin.h +swift510/lib/clang/15.0.0/include/ppc_wrappers/bmi2intrin.h +swift510/lib/clang/15.0.0/include/ppc_wrappers/bmiintrin.h +swift510/lib/clang/15.0.0/include/ppc_wrappers/emmintrin.h +swift510/lib/clang/15.0.0/include/ppc_wrappers/immintrin.h +swift510/lib/clang/15.0.0/include/ppc_wrappers/mm_malloc.h +swift510/lib/clang/15.0.0/include/ppc_wrappers/mmintrin.h +swift510/lib/clang/15.0.0/include/ppc_wrappers/pmmintrin.h +swift510/lib/clang/15.0.0/include/ppc_wrappers/smmintrin.h +swift510/lib/clang/15.0.0/include/ppc_wrappers/tmmintrin.h +swift510/lib/clang/15.0.0/include/ppc_wrappers/x86gprintrin.h +swift510/lib/clang/15.0.0/include/ppc_wrappers/x86intrin.h +swift510/lib/clang/15.0.0/include/ppc_wrappers/xmmintrin.h +swift510/lib/clang/15.0.0/include/prfchwintrin.h +swift510/lib/clang/15.0.0/include/profile/InstrProfData.inc +swift510/lib/clang/15.0.0/include/ptrauth.h +swift510/lib/clang/15.0.0/include/ptwriteintrin.h +swift510/lib/clang/15.0.0/include/rdpruintrin.h +swift510/lib/clang/15.0.0/include/rdseedintrin.h +swift510/lib/clang/15.0.0/include/rtmintrin.h +swift510/lib/clang/15.0.0/include/s390intrin.h +swift510/lib/clang/15.0.0/include/sanitizer/allocator_interface.h +swift510/lib/clang/15.0.0/include/sanitizer/asan_interface.h +swift510/lib/clang/15.0.0/include/sanitizer/common_interface_defs.h +swift510/lib/clang/15.0.0/include/sanitizer/coverage_interface.h +swift510/lib/clang/15.0.0/include/sanitizer/dfsan_interface.h +swift510/lib/clang/15.0.0/include/sanitizer/hwasan_interface.h +swift510/lib/clang/15.0.0/include/sanitizer/linux_syscall_hooks.h +swift510/lib/clang/15.0.0/include/sanitizer/lsan_interface.h +swift510/lib/clang/15.0.0/include/sanitizer/msan_interface.h +swift510/lib/clang/15.0.0/include/sanitizer/netbsd_syscall_hooks.h +swift510/lib/clang/15.0.0/include/sanitizer/scudo_interface.h +swift510/lib/clang/15.0.0/include/sanitizer/tsan_interface.h +swift510/lib/clang/15.0.0/include/sanitizer/tsan_interface_atomic.h +swift510/lib/clang/15.0.0/include/sanitizer/ubsan_interface.h +swift510/lib/clang/15.0.0/include/serializeintrin.h +swift510/lib/clang/15.0.0/include/sgxintrin.h +swift510/lib/clang/15.0.0/include/shaintrin.h +swift510/lib/clang/15.0.0/include/smmintrin.h +swift510/lib/clang/15.0.0/include/stdalign.h +swift510/lib/clang/15.0.0/include/stdarg.h +swift510/lib/clang/15.0.0/include/stdatomic.h +swift510/lib/clang/15.0.0/include/stdbool.h +swift510/lib/clang/15.0.0/include/stddef.h +swift510/lib/clang/15.0.0/include/stdint.h +swift510/lib/clang/15.0.0/include/stdnoreturn.h +swift510/lib/clang/15.0.0/include/tbmintrin.h +swift510/lib/clang/15.0.0/include/tgmath.h +swift510/lib/clang/15.0.0/include/tmmintrin.h +swift510/lib/clang/15.0.0/include/tsxldtrkintrin.h +swift510/lib/clang/15.0.0/include/uintrintrin.h +swift510/lib/clang/15.0.0/include/unwind.h +swift510/lib/clang/15.0.0/include/vadefs.h +swift510/lib/clang/15.0.0/include/vaesintrin.h +swift510/lib/clang/15.0.0/include/varargs.h +swift510/lib/clang/15.0.0/include/vecintrin.h +swift510/lib/clang/15.0.0/include/velintrin.h +swift510/lib/clang/15.0.0/include/velintrin_approx.h +swift510/lib/clang/15.0.0/include/velintrin_gen.h +swift510/lib/clang/15.0.0/include/vpclmulqdqintrin.h +swift510/lib/clang/15.0.0/include/waitpkgintrin.h +swift510/lib/clang/15.0.0/include/wasm_simd128.h +swift510/lib/clang/15.0.0/include/wbnoinvdintrin.h +swift510/lib/clang/15.0.0/include/wmmintrin.h +swift510/lib/clang/15.0.0/include/x86gprintrin.h +swift510/lib/clang/15.0.0/include/x86intrin.h +swift510/lib/clang/15.0.0/include/xmmintrin.h +swift510/lib/clang/15.0.0/include/xopintrin.h +swift510/lib/clang/15.0.0/include/xray/xray_interface.h +swift510/lib/clang/15.0.0/include/xray/xray_log_interface.h +swift510/lib/clang/15.0.0/include/xray/xray_records.h +swift510/lib/clang/15.0.0/include/xsavecintrin.h +swift510/lib/clang/15.0.0/include/xsaveintrin.h +swift510/lib/clang/15.0.0/include/xsaveoptintrin.h +swift510/lib/clang/15.0.0/include/xsavesintrin.h +swift510/lib/clang/15.0.0/include/xtestintrin.h +swift510/lib/clang/15.0.0/lib/freebsd/libclang_rt.asan-%%SWIFT_ARCH%%.a +swift510/lib/clang/15.0.0/lib/freebsd/libclang_rt.asan-%%SWIFT_ARCH%%.a.syms +swift510/lib/clang/15.0.0/lib/freebsd/libclang_rt.asan-%%SWIFT_ARCH%%.so +swift510/lib/clang/15.0.0/lib/freebsd/libclang_rt.asan-preinit-%%SWIFT_ARCH%%.a +swift510/lib/clang/15.0.0/lib/freebsd/libclang_rt.asan_cxx-%%SWIFT_ARCH%%.a +swift510/lib/clang/15.0.0/lib/freebsd/libclang_rt.asan_cxx-%%SWIFT_ARCH%%.a.syms +swift510/lib/clang/15.0.0/lib/freebsd/libclang_rt.asan_static-%%SWIFT_ARCH%%.a +swift510/lib/clang/15.0.0/lib/freebsd/libclang_rt.builtins-%%SWIFT_ARCH%%.a +swift510/lib/clang/15.0.0/lib/freebsd/libclang_rt.cfi-%%SWIFT_ARCH%%.a +swift510/lib/clang/15.0.0/lib/freebsd/libclang_rt.cfi_diag-%%SWIFT_ARCH%%.a +swift510/lib/clang/15.0.0/lib/freebsd/libclang_rt.fuzzer-%%SWIFT_ARCH%%.a +swift510/lib/clang/15.0.0/lib/freebsd/libclang_rt.fuzzer_interceptors-%%SWIFT_ARCH%%.a +swift510/lib/clang/15.0.0/lib/freebsd/libclang_rt.fuzzer_no_main-%%SWIFT_ARCH%%.a +swift510/lib/clang/15.0.0/lib/freebsd/libclang_rt.msan-%%SWIFT_ARCH%%.a +swift510/lib/clang/15.0.0/lib/freebsd/libclang_rt.msan-%%SWIFT_ARCH%%.a.syms +swift510/lib/clang/15.0.0/lib/freebsd/libclang_rt.msan_cxx-%%SWIFT_ARCH%%.a +swift510/lib/clang/15.0.0/lib/freebsd/libclang_rt.msan_cxx-%%SWIFT_ARCH%%.a.syms +swift510/lib/clang/15.0.0/lib/freebsd/libclang_rt.profile-%%SWIFT_ARCH%%.a +swift510/lib/clang/15.0.0/lib/freebsd/libclang_rt.safestack-%%SWIFT_ARCH%%.a +swift510/lib/clang/15.0.0/lib/freebsd/libclang_rt.stats-%%SWIFT_ARCH%%.a +swift510/lib/clang/15.0.0/lib/freebsd/libclang_rt.stats_client-%%SWIFT_ARCH%%.a +swift510/lib/clang/15.0.0/lib/freebsd/libclang_rt.tsan-%%SWIFT_ARCH%%.a +swift510/lib/clang/15.0.0/lib/freebsd/libclang_rt.tsan-%%SWIFT_ARCH%%.a.syms +swift510/lib/clang/15.0.0/lib/freebsd/libclang_rt.tsan-%%SWIFT_ARCH%%.so +swift510/lib/clang/15.0.0/lib/freebsd/libclang_rt.tsan_cxx-%%SWIFT_ARCH%%.a +swift510/lib/clang/15.0.0/lib/freebsd/libclang_rt.tsan_cxx-%%SWIFT_ARCH%%.a.syms +swift510/lib/clang/15.0.0/lib/freebsd/libclang_rt.ubsan_minimal-%%SWIFT_ARCH%%.a +swift510/lib/clang/15.0.0/lib/freebsd/libclang_rt.ubsan_minimal-%%SWIFT_ARCH%%.a.syms +swift510/lib/clang/15.0.0/lib/freebsd/libclang_rt.ubsan_minimal-%%SWIFT_ARCH%%.so +swift510/lib/clang/15.0.0/lib/freebsd/libclang_rt.ubsan_standalone-%%SWIFT_ARCH%%.a +swift510/lib/clang/15.0.0/lib/freebsd/libclang_rt.ubsan_standalone-%%SWIFT_ARCH%%.a.syms +swift510/lib/clang/15.0.0/lib/freebsd/libclang_rt.ubsan_standalone-%%SWIFT_ARCH%%.so +swift510/lib/clang/15.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-%%SWIFT_ARCH%%.a +swift510/lib/clang/15.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-%%SWIFT_ARCH%%.a.syms +swift510/lib/clang/15.0.0/lib/freebsd/libclang_rt.xray-%%SWIFT_ARCH%%.a +swift510/lib/clang/15.0.0/lib/freebsd/libclang_rt.xray-basic-%%SWIFT_ARCH%%.a +swift510/lib/clang/15.0.0/lib/freebsd/libclang_rt.xray-fdr-%%SWIFT_ARCH%%.a +swift510/lib/clang/15.0.0/lib/freebsd/libclang_rt.xray-profiling-%%SWIFT_ARCH%%.a +swift510/lib/clang/15.0.0/lib/freebsd/liborc_rt-%%SWIFT_ARCH%%.a +swift510/lib/clang/15.0.0/share/asan_ignorelist.txt +swift510/lib/clang/15.0.0/share/cfi_ignorelist.txt +swift510/lib/clang/15.0.0/share/msan_ignorelist.txt +swift510/lib/libIndexStore.so +swift510/lib/libIndexStore.so.15git +swift510/lib/libLTO.so +swift510/lib/libLTO.so.15git +swift510/lib/libsourcekitdInProc.so +swift510/lib/libswiftDemangle.so +swift510/lib/swift/Block/Block.h +swift510/lib/swift/CFURLSessionInterface/CFURLSessionInterface.h +swift510/lib/swift/CFURLSessionInterface/module.map +swift510/lib/swift/CFXMLInterface/CFXMLInterface.h +swift510/lib/swift/CFXMLInterface/module.map +swift510/lib/swift/CoreFoundation/CFArray.h +swift510/lib/swift/CoreFoundation/CFAttributedString.h +swift510/lib/swift/CoreFoundation/CFAvailability.h +swift510/lib/swift/CoreFoundation/CFBag.h +swift510/lib/swift/CoreFoundation/CFBase.h +swift510/lib/swift/CoreFoundation/CFBinaryHeap.h +swift510/lib/swift/CoreFoundation/CFBitVector.h +swift510/lib/swift/CoreFoundation/CFBundle.h +swift510/lib/swift/CoreFoundation/CFBundlePriv.h +swift510/lib/swift/CoreFoundation/CFByteOrder.h +swift510/lib/swift/CoreFoundation/CFCalendar.h +swift510/lib/swift/CoreFoundation/CFCalendar_Internal.h +swift510/lib/swift/CoreFoundation/CFCharacterSet.h +swift510/lib/swift/CoreFoundation/CFCharacterSetPriv.h +swift510/lib/swift/CoreFoundation/CFData.h +swift510/lib/swift/CoreFoundation/CFDate.h +swift510/lib/swift/CoreFoundation/CFDateComponents.h +swift510/lib/swift/CoreFoundation/CFDateFormatter.h +swift510/lib/swift/CoreFoundation/CFDateInterval.h +swift510/lib/swift/CoreFoundation/CFDateIntervalFormatter.h +swift510/lib/swift/CoreFoundation/CFDictionary.h +swift510/lib/swift/CoreFoundation/CFError.h +swift510/lib/swift/CoreFoundation/CFKnownLocations.h +swift510/lib/swift/CoreFoundation/CFLocale.h +swift510/lib/swift/CoreFoundation/CFLocaleInternal.h +swift510/lib/swift/CoreFoundation/CFLocking.h +swift510/lib/swift/CoreFoundation/CFLogUtilities.h +swift510/lib/swift/CoreFoundation/CFMachPort.h +swift510/lib/swift/CoreFoundation/CFMessagePort.h +swift510/lib/swift/CoreFoundation/CFNotificationCenter.h +swift510/lib/swift/CoreFoundation/CFNumber.h +swift510/lib/swift/CoreFoundation/CFNumberFormatter.h +swift510/lib/swift/CoreFoundation/CFPlugIn.h +swift510/lib/swift/CoreFoundation/CFPlugInCOM.h +swift510/lib/swift/CoreFoundation/CFPreferences.h +swift510/lib/swift/CoreFoundation/CFPriv.h +swift510/lib/swift/CoreFoundation/CFPropertyList.h +swift510/lib/swift/CoreFoundation/CFRegularExpression.h +swift510/lib/swift/CoreFoundation/CFRunArray.h +swift510/lib/swift/CoreFoundation/CFRunLoop.h +swift510/lib/swift/CoreFoundation/CFRuntime.h +swift510/lib/swift/CoreFoundation/CFSet.h +swift510/lib/swift/CoreFoundation/CFSocket.h +swift510/lib/swift/CoreFoundation/CFStream.h +swift510/lib/swift/CoreFoundation/CFStreamPriv.h +swift510/lib/swift/CoreFoundation/CFString.h +swift510/lib/swift/CoreFoundation/CFStringEncodingConverter.h +swift510/lib/swift/CoreFoundation/CFStringEncodingConverterExt.h +swift510/lib/swift/CoreFoundation/CFStringEncodingExt.h +swift510/lib/swift/CoreFoundation/CFTimeZone.h +swift510/lib/swift/CoreFoundation/CFTree.h +swift510/lib/swift/CoreFoundation/CFURL.h +swift510/lib/swift/CoreFoundation/CFURLAccess.h +swift510/lib/swift/CoreFoundation/CFURLComponents.h +swift510/lib/swift/CoreFoundation/CFURLPriv.h +swift510/lib/swift/CoreFoundation/CFURLSessionInterface.h +swift510/lib/swift/CoreFoundation/CFUUID.h +swift510/lib/swift/CoreFoundation/CFUserNotification.h +swift510/lib/swift/CoreFoundation/CFUtilities.h +swift510/lib/swift/CoreFoundation/CoreFoundation.h +swift510/lib/swift/CoreFoundation/ForFoundationOnly.h +swift510/lib/swift/CoreFoundation/ForSwiftFoundationOnly.h +swift510/lib/swift/CoreFoundation/TargetConditionals.h +swift510/lib/swift/CoreFoundation/module.map +swift510/lib/swift/FrameworkABIBaseline/README +swift510/lib/swift/FrameworkABIBaseline/Swift/ABI/macos.json +swift510/lib/swift/FrameworkABIBaseline/Swift/API/macos.json +swift510/lib/swift/FrameworkABIBaseline/_Concurrency/ABI/macos.json +swift510/lib/swift/FrameworkABIBaseline/nil.json +swift510/lib/swift/_InternalSwiftScan/DependencyScan.h +swift510/lib/swift/_InternalSwiftScan/DependencyScanMacros.h +swift510/lib/swift/_InternalSwiftScan/module.modulemap +swift510/lib/swift/_InternalSwiftStaticMirror/BinaryScan.h +swift510/lib/swift/_InternalSwiftStaticMirror/StaticMirrorMacros.h +swift510/lib/swift/_InternalSwiftStaticMirror/module.modulemap +swift510/lib/swift/apinotes/std.apinotes +swift510/lib/swift/clang/include/__clang_cuda_builtin_vars.h +swift510/lib/swift/clang/include/__clang_cuda_cmath.h +swift510/lib/swift/clang/include/__clang_cuda_complex_builtins.h +swift510/lib/swift/clang/include/__clang_cuda_device_functions.h +swift510/lib/swift/clang/include/__clang_cuda_intrinsics.h +swift510/lib/swift/clang/include/__clang_cuda_libdevice_declares.h +swift510/lib/swift/clang/include/__clang_cuda_math.h +swift510/lib/swift/clang/include/__clang_cuda_math_forward_declares.h +swift510/lib/swift/clang/include/__clang_cuda_runtime_wrapper.h +swift510/lib/swift/clang/include/__clang_cuda_texture_intrinsics.h +swift510/lib/swift/clang/include/__clang_hip_cmath.h +swift510/lib/swift/clang/include/__clang_hip_libdevice_declares.h +swift510/lib/swift/clang/include/__clang_hip_math.h +swift510/lib/swift/clang/include/__clang_hip_runtime_wrapper.h +swift510/lib/swift/clang/include/__stddef_max_align_t.h +swift510/lib/swift/clang/include/__wmmintrin_aes.h +swift510/lib/swift/clang/include/__wmmintrin_pclmul.h +swift510/lib/swift/clang/include/adxintrin.h +swift510/lib/swift/clang/include/altivec.h +swift510/lib/swift/clang/include/ammintrin.h +swift510/lib/swift/clang/include/amxintrin.h +swift510/lib/swift/clang/include/arm64intr.h +swift510/lib/swift/clang/include/arm_acle.h +swift510/lib/swift/clang/include/arm_bf16.h +swift510/lib/swift/clang/include/arm_cde.h +swift510/lib/swift/clang/include/arm_cmse.h +swift510/lib/swift/clang/include/arm_fp16.h +swift510/lib/swift/clang/include/arm_mve.h +swift510/lib/swift/clang/include/arm_neon.h +swift510/lib/swift/clang/include/arm_neon_sve_bridge.h +swift510/lib/swift/clang/include/arm_sve.h +swift510/lib/swift/clang/include/armintr.h +swift510/lib/swift/clang/include/avx2intrin.h +swift510/lib/swift/clang/include/avx512bf16intrin.h +swift510/lib/swift/clang/include/avx512bitalgintrin.h +swift510/lib/swift/clang/include/avx512bwintrin.h +swift510/lib/swift/clang/include/avx512cdintrin.h +swift510/lib/swift/clang/include/avx512dqintrin.h +swift510/lib/swift/clang/include/avx512erintrin.h +swift510/lib/swift/clang/include/avx512fintrin.h +swift510/lib/swift/clang/include/avx512fp16intrin.h +swift510/lib/swift/clang/include/avx512ifmaintrin.h +swift510/lib/swift/clang/include/avx512ifmavlintrin.h +swift510/lib/swift/clang/include/avx512pfintrin.h +swift510/lib/swift/clang/include/avx512vbmi2intrin.h +swift510/lib/swift/clang/include/avx512vbmiintrin.h +swift510/lib/swift/clang/include/avx512vbmivlintrin.h +swift510/lib/swift/clang/include/avx512vlbf16intrin.h +swift510/lib/swift/clang/include/avx512vlbitalgintrin.h +swift510/lib/swift/clang/include/avx512vlbwintrin.h +swift510/lib/swift/clang/include/avx512vlcdintrin.h +swift510/lib/swift/clang/include/avx512vldqintrin.h +swift510/lib/swift/clang/include/avx512vlfp16intrin.h +swift510/lib/swift/clang/include/avx512vlintrin.h +swift510/lib/swift/clang/include/avx512vlvbmi2intrin.h +swift510/lib/swift/clang/include/avx512vlvnniintrin.h +swift510/lib/swift/clang/include/avx512vlvp2intersectintrin.h +swift510/lib/swift/clang/include/avx512vnniintrin.h +swift510/lib/swift/clang/include/avx512vp2intersectintrin.h +swift510/lib/swift/clang/include/avx512vpopcntdqintrin.h +swift510/lib/swift/clang/include/avx512vpopcntdqvlintrin.h +swift510/lib/swift/clang/include/avxintrin.h +swift510/lib/swift/clang/include/avxvnniintrin.h +swift510/lib/swift/clang/include/bmi2intrin.h +swift510/lib/swift/clang/include/bmiintrin.h +swift510/lib/swift/clang/include/builtins.h +swift510/lib/swift/clang/include/cet.h +swift510/lib/swift/clang/include/cetintrin.h +swift510/lib/swift/clang/include/cldemoteintrin.h +swift510/lib/swift/clang/include/clflushoptintrin.h +swift510/lib/swift/clang/include/clwbintrin.h +swift510/lib/swift/clang/include/clzerointrin.h +swift510/lib/swift/clang/include/cpuid.h +swift510/lib/swift/clang/include/crc32intrin.h +swift510/lib/swift/clang/include/cuda_wrappers/algorithm +swift510/lib/swift/clang/include/cuda_wrappers/complex +swift510/lib/swift/clang/include/cuda_wrappers/new +swift510/lib/swift/clang/include/emmintrin.h +swift510/lib/swift/clang/include/enqcmdintrin.h +swift510/lib/swift/clang/include/f16cintrin.h +swift510/lib/swift/clang/include/float.h +swift510/lib/swift/clang/include/fma4intrin.h +swift510/lib/swift/clang/include/fmaintrin.h +swift510/lib/swift/clang/include/fuzzer/FuzzedDataProvider.h +swift510/lib/swift/clang/include/fxsrintrin.h +swift510/lib/swift/clang/include/gfniintrin.h +swift510/lib/swift/clang/include/hexagon_circ_brev_intrinsics.h +swift510/lib/swift/clang/include/hexagon_protos.h +swift510/lib/swift/clang/include/hexagon_types.h +swift510/lib/swift/clang/include/hlsl.h +swift510/lib/swift/clang/include/hlsl/hlsl_basic_types.h +swift510/lib/swift/clang/include/hlsl/hlsl_intrinsics.h +swift510/lib/swift/clang/include/hresetintrin.h +swift510/lib/swift/clang/include/htmintrin.h +swift510/lib/swift/clang/include/htmxlintrin.h +swift510/lib/swift/clang/include/hvx_hexagon_protos.h +swift510/lib/swift/clang/include/ia32intrin.h +swift510/lib/swift/clang/include/immintrin.h +swift510/lib/swift/clang/include/intrin.h +swift510/lib/swift/clang/include/inttypes.h +swift510/lib/swift/clang/include/invpcidintrin.h +swift510/lib/swift/clang/include/iso646.h +swift510/lib/swift/clang/include/keylockerintrin.h +swift510/lib/swift/clang/include/limits.h +swift510/lib/swift/clang/include/lwpintrin.h +swift510/lib/swift/clang/include/lzcntintrin.h +swift510/lib/swift/clang/include/mm3dnow.h +swift510/lib/swift/clang/include/mm_malloc.h +swift510/lib/swift/clang/include/mmintrin.h +swift510/lib/swift/clang/include/module.modulemap +swift510/lib/swift/clang/include/movdirintrin.h +swift510/lib/swift/clang/include/msa.h +swift510/lib/swift/clang/include/mwaitxintrin.h +swift510/lib/swift/clang/include/nmmintrin.h +swift510/lib/swift/clang/include/opencl-c-base.h +swift510/lib/swift/clang/include/opencl-c.h +swift510/lib/swift/clang/include/openmp_wrappers/__clang_openmp_device_functions.h +swift510/lib/swift/clang/include/openmp_wrappers/cmath +swift510/lib/swift/clang/include/openmp_wrappers/complex +swift510/lib/swift/clang/include/openmp_wrappers/complex.h +swift510/lib/swift/clang/include/openmp_wrappers/complex_cmath.h +swift510/lib/swift/clang/include/openmp_wrappers/math.h +swift510/lib/swift/clang/include/openmp_wrappers/new +swift510/lib/swift/clang/include/orc_rt/c_api.h +swift510/lib/swift/clang/include/pconfigintrin.h +swift510/lib/swift/clang/include/pkuintrin.h +swift510/lib/swift/clang/include/pmmintrin.h +swift510/lib/swift/clang/include/popcntintrin.h +swift510/lib/swift/clang/include/ppc_wrappers/bmi2intrin.h +swift510/lib/swift/clang/include/ppc_wrappers/bmiintrin.h +swift510/lib/swift/clang/include/ppc_wrappers/emmintrin.h +swift510/lib/swift/clang/include/ppc_wrappers/immintrin.h +swift510/lib/swift/clang/include/ppc_wrappers/mm_malloc.h +swift510/lib/swift/clang/include/ppc_wrappers/mmintrin.h +swift510/lib/swift/clang/include/ppc_wrappers/pmmintrin.h +swift510/lib/swift/clang/include/ppc_wrappers/smmintrin.h +swift510/lib/swift/clang/include/ppc_wrappers/tmmintrin.h +swift510/lib/swift/clang/include/ppc_wrappers/x86gprintrin.h +swift510/lib/swift/clang/include/ppc_wrappers/x86intrin.h +swift510/lib/swift/clang/include/ppc_wrappers/xmmintrin.h +swift510/lib/swift/clang/include/prfchwintrin.h +swift510/lib/swift/clang/include/profile/InstrProfData.inc +swift510/lib/swift/clang/include/profile/MemProfData.inc +swift510/lib/swift/clang/include/ptrauth.h +swift510/lib/swift/clang/include/ptwriteintrin.h +swift510/lib/swift/clang/include/rdpruintrin.h +swift510/lib/swift/clang/include/rdseedintrin.h +swift510/lib/swift/clang/include/rtmintrin.h +swift510/lib/swift/clang/include/s390intrin.h +swift510/lib/swift/clang/include/sanitizer/allocator_interface.h +swift510/lib/swift/clang/include/sanitizer/asan_interface.h +swift510/lib/swift/clang/include/sanitizer/common_interface_defs.h +swift510/lib/swift/clang/include/sanitizer/coverage_interface.h +swift510/lib/swift/clang/include/sanitizer/dfsan_interface.h +swift510/lib/swift/clang/include/sanitizer/hwasan_interface.h +swift510/lib/swift/clang/include/sanitizer/linux_syscall_hooks.h +swift510/lib/swift/clang/include/sanitizer/lsan_interface.h +swift510/lib/swift/clang/include/sanitizer/memprof_interface.h +swift510/lib/swift/clang/include/sanitizer/msan_interface.h +swift510/lib/swift/clang/include/sanitizer/netbsd_syscall_hooks.h +swift510/lib/swift/clang/include/sanitizer/scudo_interface.h +swift510/lib/swift/clang/include/sanitizer/tsan_interface.h +swift510/lib/swift/clang/include/sanitizer/tsan_interface_atomic.h +swift510/lib/swift/clang/include/sanitizer/ubsan_interface.h +swift510/lib/swift/clang/include/serializeintrin.h +swift510/lib/swift/clang/include/sgxintrin.h +swift510/lib/swift/clang/include/shaintrin.h +swift510/lib/swift/clang/include/smmintrin.h +swift510/lib/swift/clang/include/stdalign.h +swift510/lib/swift/clang/include/stdarg.h +swift510/lib/swift/clang/include/stdatomic.h +swift510/lib/swift/clang/include/stdbool.h +swift510/lib/swift/clang/include/stddef.h +swift510/lib/swift/clang/include/stdint.h +swift510/lib/swift/clang/include/stdnoreturn.h +swift510/lib/swift/clang/include/tbmintrin.h +swift510/lib/swift/clang/include/tgmath.h +swift510/lib/swift/clang/include/tmmintrin.h +swift510/lib/swift/clang/include/tsxldtrkintrin.h +swift510/lib/swift/clang/include/uintrintrin.h +swift510/lib/swift/clang/include/unwind.h +swift510/lib/swift/clang/include/vadefs.h +swift510/lib/swift/clang/include/vaesintrin.h +swift510/lib/swift/clang/include/varargs.h +swift510/lib/swift/clang/include/vecintrin.h +swift510/lib/swift/clang/include/velintrin.h +swift510/lib/swift/clang/include/velintrin_approx.h +swift510/lib/swift/clang/include/velintrin_gen.h +swift510/lib/swift/clang/include/vpclmulqdqintrin.h +swift510/lib/swift/clang/include/waitpkgintrin.h +swift510/lib/swift/clang/include/wasm_simd128.h +swift510/lib/swift/clang/include/wbnoinvdintrin.h +swift510/lib/swift/clang/include/wmmintrin.h +swift510/lib/swift/clang/include/x86gprintrin.h +swift510/lib/swift/clang/include/x86intrin.h +swift510/lib/swift/clang/include/xmmintrin.h +swift510/lib/swift/clang/include/xopintrin.h +swift510/lib/swift/clang/include/xray/xray_interface.h +swift510/lib/swift/clang/include/xray/xray_log_interface.h +swift510/lib/swift/clang/include/xray/xray_records.h +swift510/lib/swift/clang/include/xsavecintrin.h +swift510/lib/swift/clang/include/xsaveintrin.h +swift510/lib/swift/clang/include/xsaveoptintrin.h +swift510/lib/swift/clang/include/xsavesintrin.h +swift510/lib/swift/clang/include/xtestintrin.h +swift510/lib/swift/clang/lib/freebsd/libclang_rt.asan-%%SWIFT_ARCH%%.a +swift510/lib/swift/clang/lib/freebsd/libclang_rt.asan-%%SWIFT_ARCH%%.a.syms +swift510/lib/swift/clang/lib/freebsd/libclang_rt.asan-%%SWIFT_ARCH%%.so +swift510/lib/swift/clang/lib/freebsd/libclang_rt.asan-preinit-%%SWIFT_ARCH%%.a +swift510/lib/swift/clang/lib/freebsd/libclang_rt.asan_cxx-%%SWIFT_ARCH%%.a +swift510/lib/swift/clang/lib/freebsd/libclang_rt.asan_cxx-%%SWIFT_ARCH%%.a.syms +swift510/lib/swift/clang/lib/freebsd/libclang_rt.asan_static-%%SWIFT_ARCH%%.a +swift510/lib/swift/clang/lib/freebsd/libclang_rt.builtins-%%SWIFT_ARCH%%.a +swift510/lib/swift/clang/lib/freebsd/libclang_rt.cfi-%%SWIFT_ARCH%%.a +swift510/lib/swift/clang/lib/freebsd/libclang_rt.cfi_diag-%%SWIFT_ARCH%%.a +swift510/lib/swift/clang/lib/freebsd/libclang_rt.fuzzer-%%SWIFT_ARCH%%.a +swift510/lib/swift/clang/lib/freebsd/libclang_rt.fuzzer_interceptors-%%SWIFT_ARCH%%.a +swift510/lib/swift/clang/lib/freebsd/libclang_rt.fuzzer_no_main-%%SWIFT_ARCH%%.a +swift510/lib/swift/clang/lib/freebsd/libclang_rt.msan-%%SWIFT_ARCH%%.a +swift510/lib/swift/clang/lib/freebsd/libclang_rt.msan-%%SWIFT_ARCH%%.a.syms +swift510/lib/swift/clang/lib/freebsd/libclang_rt.msan_cxx-%%SWIFT_ARCH%%.a +swift510/lib/swift/clang/lib/freebsd/libclang_rt.msan_cxx-%%SWIFT_ARCH%%.a.syms +swift510/lib/swift/clang/lib/freebsd/libclang_rt.profile-%%SWIFT_ARCH%%.a +swift510/lib/swift/clang/lib/freebsd/libclang_rt.safestack-%%SWIFT_ARCH%%.a +swift510/lib/swift/clang/lib/freebsd/libclang_rt.stats-%%SWIFT_ARCH%%.a +swift510/lib/swift/clang/lib/freebsd/libclang_rt.stats_client-%%SWIFT_ARCH%%.a +swift510/lib/swift/clang/lib/freebsd/libclang_rt.tsan-%%SWIFT_ARCH%%.a +swift510/lib/swift/clang/lib/freebsd/libclang_rt.tsan-%%SWIFT_ARCH%%.a.syms +swift510/lib/swift/clang/lib/freebsd/libclang_rt.tsan-%%SWIFT_ARCH%%.so +swift510/lib/swift/clang/lib/freebsd/libclang_rt.tsan_cxx-%%SWIFT_ARCH%%.a +swift510/lib/swift/clang/lib/freebsd/libclang_rt.tsan_cxx-%%SWIFT_ARCH%%.a.syms +swift510/lib/swift/clang/lib/freebsd/libclang_rt.ubsan_minimal-%%SWIFT_ARCH%%.a +swift510/lib/swift/clang/lib/freebsd/libclang_rt.ubsan_minimal-%%SWIFT_ARCH%%.a.syms +swift510/lib/swift/clang/lib/freebsd/libclang_rt.ubsan_minimal-%%SWIFT_ARCH%%.so +swift510/lib/swift/clang/lib/freebsd/libclang_rt.ubsan_standalone-%%SWIFT_ARCH%%.a +swift510/lib/swift/clang/lib/freebsd/libclang_rt.ubsan_standalone-%%SWIFT_ARCH%%.a.syms +swift510/lib/swift/clang/lib/freebsd/libclang_rt.ubsan_standalone-%%SWIFT_ARCH%%.so +swift510/lib/swift/clang/lib/freebsd/libclang_rt.ubsan_standalone_cxx-%%SWIFT_ARCH%%.a +swift510/lib/swift/clang/lib/freebsd/libclang_rt.ubsan_standalone_cxx-%%SWIFT_ARCH%%.a.syms +swift510/lib/swift/clang/lib/freebsd/libclang_rt.xray-%%SWIFT_ARCH%%.a +swift510/lib/swift/clang/lib/freebsd/libclang_rt.xray-basic-%%SWIFT_ARCH%%.a +swift510/lib/swift/clang/lib/freebsd/libclang_rt.xray-fdr-%%SWIFT_ARCH%%.a +swift510/lib/swift/clang/lib/freebsd/libclang_rt.xray-profiling-%%SWIFT_ARCH%%.a +swift510/lib/swift/clang/lib/freebsd/liborc_rt-%%SWIFT_ARCH%%.a +swift510/lib/swift/clang/share/asan_ignorelist.txt +swift510/lib/swift/clang/share/cfi_ignorelist.txt +swift510/lib/swift/clang/share/msan_ignorelist.txt +swift510/lib/swift/dispatch/base.h +swift510/lib/swift/dispatch/block.h +swift510/lib/swift/dispatch/data.h +swift510/lib/swift/dispatch/dispatch.h +swift510/lib/swift/dispatch/group.h +swift510/lib/swift/dispatch/introspection.h +swift510/lib/swift/dispatch/io.h +swift510/lib/swift/dispatch/module.modulemap +swift510/lib/swift/dispatch/object.h +swift510/lib/swift/dispatch/once.h +swift510/lib/swift/dispatch/queue.h +swift510/lib/swift/dispatch/semaphore.h +swift510/lib/swift/dispatch/source.h +swift510/lib/swift/dispatch/time.h +swift510/lib/swift/freebsd/Cxx.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.private.swiftinterface +swift510/lib/swift/freebsd/Cxx.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftdoc +swift510/lib/swift/freebsd/Cxx.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftinterface +swift510/lib/swift/freebsd/Cxx.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftmodule +swift510/lib/swift/freebsd/CxxStdlib.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.private.swiftinterface +swift510/lib/swift/freebsd/CxxStdlib.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftdoc +swift510/lib/swift/freebsd/CxxStdlib.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftinterface +swift510/lib/swift/freebsd/CxxStdlib.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftmodule +swift510/lib/swift/freebsd/Distributed.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.private.swiftinterface +swift510/lib/swift/freebsd/Distributed.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftdoc +swift510/lib/swift/freebsd/Distributed.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftinterface +swift510/lib/swift/freebsd/Distributed.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftmodule +swift510/lib/swift/freebsd/Glibc.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.private.swiftinterface +swift510/lib/swift/freebsd/Glibc.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftdoc +swift510/lib/swift/freebsd/Glibc.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftinterface +swift510/lib/swift/freebsd/Glibc.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftmodule +swift510/lib/swift/freebsd/Observation.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.private.swiftinterface +swift510/lib/swift/freebsd/Observation.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftdoc +swift510/lib/swift/freebsd/Observation.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftinterface +swift510/lib/swift/freebsd/Observation.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftmodule +swift510/lib/swift/freebsd/RegexBuilder.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.private.swiftinterface +swift510/lib/swift/freebsd/RegexBuilder.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftdoc +swift510/lib/swift/freebsd/RegexBuilder.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftinterface +swift510/lib/swift/freebsd/RegexBuilder.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftmodule +swift510/lib/swift/freebsd/Swift.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.private.swiftinterface +swift510/lib/swift/freebsd/Swift.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftdoc +swift510/lib/swift/freebsd/Swift.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftinterface +swift510/lib/swift/freebsd/Swift.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftmodule +swift510/lib/swift/freebsd/SwiftOnoneSupport.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.private.swiftinterface +swift510/lib/swift/freebsd/SwiftOnoneSupport.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftdoc +swift510/lib/swift/freebsd/SwiftOnoneSupport.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftinterface +swift510/lib/swift/freebsd/SwiftOnoneSupport.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftmodule +swift510/lib/swift/freebsd/_Concurrency.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.private.swiftinterface +swift510/lib/swift/freebsd/_Concurrency.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftdoc +swift510/lib/swift/freebsd/_Concurrency.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftinterface +swift510/lib/swift/freebsd/_Concurrency.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftmodule +swift510/lib/swift/freebsd/_Differentiation.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.private.swiftinterface +swift510/lib/swift/freebsd/_Differentiation.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftdoc +swift510/lib/swift/freebsd/_Differentiation.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftinterface +swift510/lib/swift/freebsd/_Differentiation.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftmodule +swift510/lib/swift/freebsd/_RegexParser.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.private.swiftinterface +swift510/lib/swift/freebsd/_RegexParser.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftdoc +swift510/lib/swift/freebsd/_RegexParser.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftinterface +swift510/lib/swift/freebsd/_RegexParser.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftmodule +swift510/lib/swift/freebsd/_StringProcessing.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.private.swiftinterface +swift510/lib/swift/freebsd/_StringProcessing.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftdoc +swift510/lib/swift/freebsd/_StringProcessing.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftinterface +swift510/lib/swift/freebsd/_StringProcessing.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftmodule +swift510/lib/swift/freebsd/%%SWIFT_ARCH%%/Dispatch.swiftdoc +swift510/lib/swift/freebsd/%%SWIFT_ARCH%%/Dispatch.swiftmodule +swift510/lib/swift/freebsd/%%SWIFT_ARCH%%/Foundation.swiftdoc +swift510/lib/swift/freebsd/%%SWIFT_ARCH%%/Foundation.swiftmodule +swift510/lib/swift/freebsd/%%SWIFT_ARCH%%/FoundationNetworking.swiftdoc +swift510/lib/swift/freebsd/%%SWIFT_ARCH%%/FoundationNetworking.swiftmodule +swift510/lib/swift/freebsd/%%SWIFT_ARCH%%/FoundationXML.swiftdoc +swift510/lib/swift/freebsd/%%SWIFT_ARCH%%/FoundationXML.swiftmodule +swift510/lib/swift/freebsd/%%SWIFT_ARCH%%/SwiftGlibc.h +swift510/lib/swift/freebsd/%%SWIFT_ARCH%%/XCTest.swiftdoc +swift510/lib/swift/freebsd/%%SWIFT_ARCH%%/XCTest.swiftmodule +swift510/lib/swift/freebsd/%%SWIFT_ARCH%%/glibc.modulemap +swift510/lib/swift/freebsd/%%SWIFT_ARCH%%/swiftrt.o +swift510/lib/swift/freebsd/libBlocksRuntime.so +swift510/lib/swift/freebsd/libFoundation.so +swift510/lib/swift/freebsd/libFoundationNetworking.so +swift510/lib/swift/freebsd/libFoundationXML.so +swift510/lib/swift/freebsd/libXCTest.so +swift510/lib/swift/freebsd/lib_InternalSwiftScan.so +swift510/lib/swift/freebsd/lib_InternalSwiftStaticMirror.so +swift510/lib/swift/freebsd/libcxxshim.h +swift510/lib/swift/freebsd/libcxxshim.modulemap +swift510/lib/swift/freebsd/libcxxstdlibshim.h +swift510/lib/swift/freebsd/libdispatch.so +swift510/lib/swift/freebsd/libswiftCore.so +swift510/lib/swift/freebsd/libswiftCxx.a +swift510/lib/swift/freebsd/libswiftCxxStdlib.a +swift510/lib/swift/freebsd/libswiftDispatch.so +swift510/lib/swift/freebsd/libswiftDistributed.so +swift510/lib/swift/freebsd/libswiftGlibc.so +swift510/lib/swift/freebsd/libswiftObservation.so +swift510/lib/swift/freebsd/libswiftRegexBuilder.so +swift510/lib/swift/freebsd/libswiftRemoteMirror.so +swift510/lib/swift/freebsd/libswiftSwiftOnoneSupport.so +swift510/lib/swift/freebsd/libswift_Concurrency.so +swift510/lib/swift/freebsd/libswift_Differentiation.so +swift510/lib/swift/freebsd/libswift_RegexParser.so +swift510/lib/swift/freebsd/libswift_StringProcessing.so +swift510/lib/swift/host/lib_InternalSwiftScan.so +swift510/lib/swift/migrator/ios4.json +swift510/lib/swift/migrator/ios42.json +swift510/lib/swift/migrator/macos4.json +swift510/lib/swift/migrator/macos42.json +swift510/lib/swift/migrator/overlay4.json +swift510/lib/swift/migrator/overlay42.json +swift510/lib/swift/migrator/tvos4.json +swift510/lib/swift/migrator/tvos42.json +swift510/lib/swift/migrator/watchos4.json +swift510/lib/swift/migrator/watchos42.json +swift510/lib/swift/os/generic_base.h +swift510/lib/swift/os/generic_unix_base.h +swift510/lib/swift/os/generic_win_base.h +swift510/lib/swift/os/object.h +swift510/lib/swift/pm/ManifestAPI/CompilerPluginSupport.swiftdoc +swift510/lib/swift/pm/ManifestAPI/CompilerPluginSupport.swiftinterface +swift510/lib/swift/pm/ManifestAPI/PackageDescription.swiftdoc +swift510/lib/swift/pm/ManifestAPI/PackageDescription.swiftinterface +swift510/lib/swift/pm/ManifestAPI/libPackageDescription.so +swift510/lib/swift/pm/PluginAPI/PackagePlugin.swiftdoc +swift510/lib/swift/pm/PluginAPI/PackagePlugin.swiftinterface +swift510/lib/swift/pm/PluginAPI/libPackagePlugin.so +swift510/lib/swift/pm/llbuild/libllbuildSwift.so +swift510/lib/swift/shims/AssertionReporting.h +swift510/lib/swift/shims/CoreFoundationShims.h +swift510/lib/swift/shims/FoundationShims.h +swift510/lib/swift/shims/GlobalObjects.h +swift510/lib/swift/shims/HeapObject.h +swift510/lib/swift/shims/KeyPath.h +swift510/lib/swift/shims/LibcOverlayShims.h +swift510/lib/swift/shims/LibcShims.h +swift510/lib/swift/shims/MetadataSections.h +swift510/lib/swift/shims/Random.h +swift510/lib/swift/shims/RefCount.h +swift510/lib/swift/shims/Reflection.h +swift510/lib/swift/shims/RuntimeShims.h +swift510/lib/swift/shims/RuntimeStubs.h +swift510/lib/swift/shims/SwiftStdbool.h +swift510/lib/swift/shims/SwiftStddef.h +swift510/lib/swift/shims/SwiftStdint.h +swift510/lib/swift/shims/System.h +swift510/lib/swift/shims/Target.h +swift510/lib/swift/shims/ThreadLocalStorage.h +swift510/lib/swift/shims/UnicodeData.h +swift510/lib/swift/shims/Visibility.h +swift510/lib/swift/shims/_SwiftConcurrency.h +swift510/lib/swift/shims/_SwiftDistributed.h +swift510/lib/swift/shims/module.modulemap +swift510/lib/swift/swiftToCxx/_SwiftCxxInteroperability.h +swift510/lib/swift/swiftToCxx/_SwiftStdlibCxxOverlay.h +swift510/lib/swift/swiftToCxx/experimental-interoperability-version.json +swift510/lib/swift_static/Block/Block.h +swift510/lib/swift_static/CFURLSessionInterface/CFURLSessionInterface.h +swift510/lib/swift_static/CFURLSessionInterface/module.map +swift510/lib/swift_static/CFXMLInterface/CFXMLInterface.h +swift510/lib/swift_static/CFXMLInterface/module.map +swift510/lib/swift_static/CoreFoundation/CFArray.h +swift510/lib/swift_static/CoreFoundation/CFAttributedString.h +swift510/lib/swift_static/CoreFoundation/CFAvailability.h +swift510/lib/swift_static/CoreFoundation/CFBag.h +swift510/lib/swift_static/CoreFoundation/CFBase.h +swift510/lib/swift_static/CoreFoundation/CFBinaryHeap.h +swift510/lib/swift_static/CoreFoundation/CFBitVector.h +swift510/lib/swift_static/CoreFoundation/CFBundle.h +swift510/lib/swift_static/CoreFoundation/CFBundlePriv.h +swift510/lib/swift_static/CoreFoundation/CFByteOrder.h +swift510/lib/swift_static/CoreFoundation/CFCalendar.h +swift510/lib/swift_static/CoreFoundation/CFCalendar_Internal.h +swift510/lib/swift_static/CoreFoundation/CFCharacterSet.h +swift510/lib/swift_static/CoreFoundation/CFCharacterSetPriv.h +swift510/lib/swift_static/CoreFoundation/CFData.h +swift510/lib/swift_static/CoreFoundation/CFDate.h +swift510/lib/swift_static/CoreFoundation/CFDateComponents.h +swift510/lib/swift_static/CoreFoundation/CFDateFormatter.h +swift510/lib/swift_static/CoreFoundation/CFDateInterval.h +swift510/lib/swift_static/CoreFoundation/CFDateIntervalFormatter.h +swift510/lib/swift_static/CoreFoundation/CFDictionary.h +swift510/lib/swift_static/CoreFoundation/CFError.h +swift510/lib/swift_static/CoreFoundation/CFKnownLocations.h +swift510/lib/swift_static/CoreFoundation/CFLocale.h +swift510/lib/swift_static/CoreFoundation/CFLocaleInternal.h +swift510/lib/swift_static/CoreFoundation/CFLocking.h +swift510/lib/swift_static/CoreFoundation/CFLogUtilities.h +swift510/lib/swift_static/CoreFoundation/CFMachPort.h +swift510/lib/swift_static/CoreFoundation/CFMessagePort.h +swift510/lib/swift_static/CoreFoundation/CFNotificationCenter.h +swift510/lib/swift_static/CoreFoundation/CFNumber.h +swift510/lib/swift_static/CoreFoundation/CFNumberFormatter.h +swift510/lib/swift_static/CoreFoundation/CFPlugIn.h +swift510/lib/swift_static/CoreFoundation/CFPlugInCOM.h +swift510/lib/swift_static/CoreFoundation/CFPreferences.h +swift510/lib/swift_static/CoreFoundation/CFPriv.h +swift510/lib/swift_static/CoreFoundation/CFPropertyList.h +swift510/lib/swift_static/CoreFoundation/CFRegularExpression.h +swift510/lib/swift_static/CoreFoundation/CFRunArray.h +swift510/lib/swift_static/CoreFoundation/CFRunLoop.h +swift510/lib/swift_static/CoreFoundation/CFRuntime.h +swift510/lib/swift_static/CoreFoundation/CFSet.h +swift510/lib/swift_static/CoreFoundation/CFSocket.h +swift510/lib/swift_static/CoreFoundation/CFStream.h +swift510/lib/swift_static/CoreFoundation/CFStreamPriv.h +swift510/lib/swift_static/CoreFoundation/CFString.h +swift510/lib/swift_static/CoreFoundation/CFStringEncodingConverter.h +swift510/lib/swift_static/CoreFoundation/CFStringEncodingConverterExt.h +swift510/lib/swift_static/CoreFoundation/CFStringEncodingExt.h +swift510/lib/swift_static/CoreFoundation/CFTimeZone.h +swift510/lib/swift_static/CoreFoundation/CFTree.h +swift510/lib/swift_static/CoreFoundation/CFURL.h +swift510/lib/swift_static/CoreFoundation/CFURLAccess.h +swift510/lib/swift_static/CoreFoundation/CFURLComponents.h +swift510/lib/swift_static/CoreFoundation/CFURLPriv.h +swift510/lib/swift_static/CoreFoundation/CFURLSessionInterface.h +swift510/lib/swift_static/CoreFoundation/CFUUID.h +swift510/lib/swift_static/CoreFoundation/CFUserNotification.h +swift510/lib/swift_static/CoreFoundation/CFUtilities.h +swift510/lib/swift_static/CoreFoundation/CoreFoundation.h +swift510/lib/swift_static/CoreFoundation/ForFoundationOnly.h +swift510/lib/swift_static/CoreFoundation/ForSwiftFoundationOnly.h +swift510/lib/swift_static/CoreFoundation/TargetConditionals.h +swift510/lib/swift_static/CoreFoundation/module.map +swift510/lib/swift_static/dispatch/base.h +swift510/lib/swift_static/dispatch/block.h +swift510/lib/swift_static/dispatch/data.h +swift510/lib/swift_static/dispatch/dispatch.h +swift510/lib/swift_static/dispatch/group.h +swift510/lib/swift_static/dispatch/introspection.h +swift510/lib/swift_static/dispatch/io.h +swift510/lib/swift_static/dispatch/module.modulemap +swift510/lib/swift_static/dispatch/object.h +swift510/lib/swift_static/dispatch/once.h +swift510/lib/swift_static/dispatch/queue.h +swift510/lib/swift_static/dispatch/semaphore.h +swift510/lib/swift_static/dispatch/source.h +swift510/lib/swift_static/dispatch/time.h +swift510/lib/swift_static/freebsd/Cxx.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftdoc +swift510/lib/swift_static/freebsd/Cxx.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftinterface +swift510/lib/swift_static/freebsd/Cxx.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftmodule +swift510/lib/swift_static/freebsd/CxxStdlib.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftdoc +swift510/lib/swift_static/freebsd/CxxStdlib.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftinterface +swift510/lib/swift_static/freebsd/CxxStdlib.swiftmodule/%%SWIFT_TARGET_TRIPLE%%.swiftmodule +swift510/lib/swift_static/freebsd/%%SWIFT_ARCH%%/Dispatch.swiftdoc +swift510/lib/swift_static/freebsd/%%SWIFT_ARCH%%/Dispatch.swiftmodule +swift510/lib/swift_static/freebsd/%%SWIFT_ARCH%%/Foundation.swiftdoc +swift510/lib/swift_static/freebsd/%%SWIFT_ARCH%%/Foundation.swiftmodule +swift510/lib/swift_static/freebsd/%%SWIFT_ARCH%%/FoundationNetworking.swiftdoc +swift510/lib/swift_static/freebsd/%%SWIFT_ARCH%%/FoundationNetworking.swiftmodule +swift510/lib/swift_static/freebsd/%%SWIFT_ARCH%%/FoundationXML.swiftdoc +swift510/lib/swift_static/freebsd/%%SWIFT_ARCH%%/FoundationXML.swiftmodule +swift510/lib/swift_static/freebsd/libBlocksRuntime.a +swift510/lib/swift_static/freebsd/libCFURLSessionInterface.a +swift510/lib/swift_static/freebsd/libCFXMLInterface.a +swift510/lib/swift_static/freebsd/libCoreFoundation.a +swift510/lib/swift_static/freebsd/libDispatchStubs.a +swift510/lib/swift_static/freebsd/libFoundation.a +swift510/lib/swift_static/freebsd/libFoundationNetworking.a +swift510/lib/swift_static/freebsd/libFoundationXML.a +swift510/lib/swift_static/freebsd/libdispatch.a +swift510/lib/swift_static/freebsd/libswiftDispatch.a +swift510/lib/swift_static/freebsd/libuuid.a +swift510/lib/swift_static/freebsd/static-stdlib-args.lnk +swift510/lib/swift_static/os/generic_base.h +swift510/lib/swift_static/os/generic_unix_base.h +swift510/lib/swift_static/os/generic_win_base.h +swift510/lib/swift_static/os/object.h +swift510/local/include/indexstore/IndexStoreCXX.h +swift510/local/include/indexstore/indexstore.h +swift510/share/doc/swift/diagnostics/complex-closure-inference.md +swift510/share/doc/swift/diagnostics/dynamic-callable-requirements.md +swift510/share/doc/swift/diagnostics/existential-member-access-limitations.md +swift510/share/doc/swift/diagnostics/multiple-inheritance.md +swift510/share/doc/swift/diagnostics/nominal-types.md +swift510/share/doc/swift/diagnostics/opaque-type-inference.md +swift510/share/doc/swift/diagnostics/property-wrapper-requirements.md +swift510/share/doc/swift/diagnostics/protocol-type-non-conformance.md +swift510/share/doc/swift/diagnostics/result-builder-methods.md +swift510/share/doc/swift/diagnostics/string-interpolation-conformance.md +swift510/share/doc/swift/diagnostics/temporary-pointers.md +swift510/share/doc/swift/diagnostics/trailing-closure-matching.md +swift510/share/emacs/site-lisp/swift-mode.el +swift510/share/man/man1/swift.1.gz +swift510/share/pm/config.json +swift510/share/swift/LICENSE.txt +swift510/share/swift/compatibility-symbols +swift510/share/swift/diagnostics/en.db +swift510/share/swift/diagnostics/en.strings +swift510/share/swift/features.json +swift510/share/swift/testsuite/test-freebsd-%%SWIFT_ARCH%%.lit.site.cfg +swift510/share/swift/testsuite/validation-test-freebsd-%%SWIFT_ARCH%%.lit.site.cfg +swift510/share/vim/vim73/ftdetect/sil.vim +swift510/share/vim/vim73/ftdetect/swift.vim +swift510/share/vim/vim73/ftdetect/swiftgyb.vim +swift510/share/vim/vim73/syntax/sil.vim +swift510/share/vim/vim73/syntax/swift.vim +swift510/share/vim/vim73/syntax/swiftgyb.vim |