From 7287a5a18004504a1919fe0cea91b818cd852b8d Mon Sep 17 00:00:00 2001 From: Python Maint Date: Wed, 3 Jun 2026 17:49:59 +0200 Subject: [PATCH 1/8] Rebuilt for Python 3.15 From d55bd0b7ed95dec7d1c7207cc65e467c348265ae Mon Sep 17 00:00:00 2001 From: Link Dupont Date: Mon, 8 Jun 2026 09:38:29 +0000 Subject: [PATCH 2/8] Split runtime libraries into a separate subpackage --- swift-lang.spec | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/swift-lang.spec b/swift-lang.spec index 70f1f58..360ba06 100644 --- a/swift-lang.spec +++ b/swift-lang.spec @@ -278,6 +278,7 @@ BuildRequires: kernel-cross-headers Requires: glibc-devel Requires: lld Requires: gcc +Requires: %{name}-runtime = %{version}-%{release} Recommends: libstdc++-devel Recommends: gcc-c++ @@ -315,6 +316,18 @@ and desktop apps, scaling up to cloud services. Most importantly, Swift is designed to make writing and maintaining correct programs easier for the developer. +%package runtime +Summary: Swift runtime libraries + +%description runtime +Swift is a general-purpose programming language built using +a modern approach to safety, performance, and software design +patterns. + +This package contains the Swift runtime libraries needed to run +applications built with Swift. + + %prep %forgesetup -a @@ -535,15 +548,6 @@ export QA_SKIP_RPATHS=1 # Man pages %{_mandir}/man1/swift.1.gz -# Swift runtime libraries (what users link against) -%{_libdir}/libswift*.so* -%{_libdir}/libFoundation*.so* -%{_libdir}/libdispatch.so* -%{_libdir}/libBlocksRuntime.so* -%{_libdir}/libTesting.so* -%{_libdir}/libXCTest.so* -%{_libdir}/lib_*.so* - # SourceKit/IndexStore public libraries %{_libdir}/libIndexStore.so* %{_libdir}/libsourcekitdInProc.so* @@ -561,6 +565,17 @@ export QA_SKIP_RPATHS=1 # Data files (diagnostics, features.json, etc.) %{_datadir}/swift/ +%files runtime +%license swift/LICENSE.txt + +%{_libdir}/libswift*.so* +%{_libdir}/libFoundation*.so* +%{_libdir}/libdispatch.so* +%{_libdir}/libBlocksRuntime.so* +%{_libdir}/libTesting.so* +%{_libdir}/libXCTest.so* +%{_libdir}/lib_*.so* + # Dynamic linker configuration %{_sysconfdir}/ld.so.conf.d/swiftlang.conf @@ -568,6 +583,9 @@ export QA_SKIP_RPATHS=1 %post -p /sbin/ldconfig %postun -p /sbin/ldconfig +%post runtime -p /sbin/ldconfig +%postun runtime -p /sbin/ldconfig + %changelog %autochangelog From f617dce50326134832b194c66cac2a7c800d2fdd Mon Sep 17 00:00:00 2001 From: Link Dupont Date: Wed, 10 Jun 2026 01:44:47 +0000 Subject: [PATCH 3/8] Fix compile errors with GCC 16 and Python 3.15 (RHBZ#2483711) --- cmake.patch | 13 +++++++++++++ swift-lang.spec | 4 ++++ 2 files changed, 17 insertions(+) diff --git a/cmake.patch b/cmake.patch index 6e5a113..1a767a1 100644 --- a/cmake.patch +++ b/cmake.patch @@ -10,3 +10,16 @@ index 9d14f6b70f..491f023493 100644 #include #include + +--- cmake.orig/Source/cmake.cxx ++++ cmake/Source/cmake.cxx +@@ -131,7 +131,9 @@ + // NOTE: the __linux__ macro is predefined on Android host too, but + // main CMakeLists.txt filters out this generator by host name. + #if (defined(__linux__) && !defined(__ANDROID__)) || defined(_WIN32) ++#if !defined(CMAKE_BOOTSTRAP) + # include "cmGlobalGhsMultiGenerator.h" ++#endif + #endif + + #if defined(__APPLE__) diff --git a/swift-lang.spec b/swift-lang.spec index 360ba06..dfb6e96 100644 --- a/swift-lang.spec +++ b/swift-lang.spec @@ -361,6 +361,10 @@ cp %{SOURCE100} swift/utils/fedora-presets.ini %build export VERBOSE=1 +# Workaround for GCC 16 ICE in cmath / riemann_zeta +export CFLAGS="-O2 -g -fno-builtin-logf" +export CXXFLAGS="-O2 -g -fno-builtin-logf" + # Four-stage bootstrap to build Swift from scratch without external Swift compiler # Stage 0: Build minimal Swift toolchain from C++ using gold linker # Produces: Swift compiler with C++ legacy driver (no SwiftPM, no swift-driver) From a12a511b59d10a590ae8b01a1b2298c7d6062d5c Mon Sep 17 00:00:00 2001 From: Link Dupont Date: Tue, 30 Jun 2026 11:05:02 +0000 Subject: [PATCH 4/8] Move libIndexStore.so to private toolchain library path (RHBZ#2493390) --- swift-lang.spec | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/swift-lang.spec b/swift-lang.spec index dfb6e96..92beeef 100644 --- a/swift-lang.spec +++ b/swift-lang.spec @@ -459,15 +459,15 @@ if [ -f %{_builddir}/build/fedora_final/swift-linux-%{_arch}/lib/libsourcekitdIn cp -a %{_builddir}/build/fedora_final/swift-linux-%{_arch}/lib/libsourcekitdInProc.so %{_builddir}/usr/lib/ fi -# Install SourceKit/IndexStore public libraries +# Install private libraries to toolchain lib dir for lib in libIndexStore.so libIndexStore.so.17.0 libsourcekitdInProc.so libswiftDemangle.so; do if [ -f %{_builddir}/usr/lib/$lib ]; then - install -m 0755 %{_builddir}/usr/lib/$lib %{buildroot}%{_libdir}/ + install -m 0755 %{_builddir}/usr/lib/$lib %{buildroot}%{_libexecdir}/swift/%{version}/lib/ fi done -# Create any missing version symlinks -if [ -f %{buildroot}%{_libdir}/libIndexStore.so.17.0 ] && [ ! -e %{buildroot}%{_libdir}/libIndexStore.so ]; then - ln -sf libIndexStore.so.17.0 %{buildroot}%{_libdir}/libIndexStore.so +# Create any missing version symlinks in private dir +if [ -f %{buildroot}%{_libexecdir}/swift/%{version}/lib/libIndexStore.so.17.0 ] && [ ! -e %{buildroot}%{_libexecdir}/swift/%{version}/lib/libIndexStore.so ]; then + ln -sf libIndexStore.so.17.0 %{buildroot}%{_libexecdir}/swift/%{version}/lib/libIndexStore.so fi # Install lldb libraries to %{_libexecdir} (private, bundled with Swift toolchain) @@ -552,10 +552,10 @@ export QA_SKIP_RPATHS=1 # Man pages %{_mandir}/man1/swift.1.gz -# SourceKit/IndexStore public libraries -%{_libdir}/libIndexStore.so* -%{_libdir}/libsourcekitdInProc.so* -%{_libdir}/libswiftDemangle.so* +# SourceKit/IndexStore/SwiftDemangle private libraries +%{_libexecdir}/swift/%{version}/lib/libIndexStore.so* +%{_libexecdir}/swift/%{version}/lib/libsourcekitdInProc.so* +%{_libexecdir}/swift/%{version}/lib/libswiftDemangle.so* # Compatibility symlink for module lookup %{_libdir}/swift From cc5d6886184b964baf678f2810e87bfd5af78ae7 Mon Sep 17 00:00:00 2001 From: Link Dupont Date: Mon, 8 Jun 2026 09:38:29 +0000 Subject: [PATCH 5/8] Split runtime libraries into a separate subpackage --- swift-lang.spec | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/swift-lang.spec b/swift-lang.spec index 70f1f58..360ba06 100644 --- a/swift-lang.spec +++ b/swift-lang.spec @@ -278,6 +278,7 @@ BuildRequires: kernel-cross-headers Requires: glibc-devel Requires: lld Requires: gcc +Requires: %{name}-runtime = %{version}-%{release} Recommends: libstdc++-devel Recommends: gcc-c++ @@ -315,6 +316,18 @@ and desktop apps, scaling up to cloud services. Most importantly, Swift is designed to make writing and maintaining correct programs easier for the developer. +%package runtime +Summary: Swift runtime libraries + +%description runtime +Swift is a general-purpose programming language built using +a modern approach to safety, performance, and software design +patterns. + +This package contains the Swift runtime libraries needed to run +applications built with Swift. + + %prep %forgesetup -a @@ -535,15 +548,6 @@ export QA_SKIP_RPATHS=1 # Man pages %{_mandir}/man1/swift.1.gz -# Swift runtime libraries (what users link against) -%{_libdir}/libswift*.so* -%{_libdir}/libFoundation*.so* -%{_libdir}/libdispatch.so* -%{_libdir}/libBlocksRuntime.so* -%{_libdir}/libTesting.so* -%{_libdir}/libXCTest.so* -%{_libdir}/lib_*.so* - # SourceKit/IndexStore public libraries %{_libdir}/libIndexStore.so* %{_libdir}/libsourcekitdInProc.so* @@ -561,6 +565,17 @@ export QA_SKIP_RPATHS=1 # Data files (diagnostics, features.json, etc.) %{_datadir}/swift/ +%files runtime +%license swift/LICENSE.txt + +%{_libdir}/libswift*.so* +%{_libdir}/libFoundation*.so* +%{_libdir}/libdispatch.so* +%{_libdir}/libBlocksRuntime.so* +%{_libdir}/libTesting.so* +%{_libdir}/libXCTest.so* +%{_libdir}/lib_*.so* + # Dynamic linker configuration %{_sysconfdir}/ld.so.conf.d/swiftlang.conf @@ -568,6 +583,9 @@ export QA_SKIP_RPATHS=1 %post -p /sbin/ldconfig %postun -p /sbin/ldconfig +%post runtime -p /sbin/ldconfig +%postun runtime -p /sbin/ldconfig + %changelog %autochangelog From 50f7ca358e3197bcdd5fc429b491dd49886e8e30 Mon Sep 17 00:00:00 2001 From: Link Dupont Date: Tue, 30 Jun 2026 11:05:02 +0000 Subject: [PATCH 6/8] Move libIndexStore.so to private toolchain library path (RHBZ#2493390) --- swift-lang.spec | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/swift-lang.spec b/swift-lang.spec index 360ba06..b24bf79 100644 --- a/swift-lang.spec +++ b/swift-lang.spec @@ -455,15 +455,15 @@ if [ -f %{_builddir}/build/fedora_final/swift-linux-%{_arch}/lib/libsourcekitdIn cp -a %{_builddir}/build/fedora_final/swift-linux-%{_arch}/lib/libsourcekitdInProc.so %{_builddir}/usr/lib/ fi -# Install SourceKit/IndexStore public libraries +# Install private libraries to toolchain lib dir for lib in libIndexStore.so libIndexStore.so.17.0 libsourcekitdInProc.so libswiftDemangle.so; do if [ -f %{_builddir}/usr/lib/$lib ]; then - install -m 0755 %{_builddir}/usr/lib/$lib %{buildroot}%{_libdir}/ + install -m 0755 %{_builddir}/usr/lib/$lib %{buildroot}%{_libexecdir}/swift/%{version}/lib/ fi done -# Create any missing version symlinks -if [ -f %{buildroot}%{_libdir}/libIndexStore.so.17.0 ] && [ ! -e %{buildroot}%{_libdir}/libIndexStore.so ]; then - ln -sf libIndexStore.so.17.0 %{buildroot}%{_libdir}/libIndexStore.so +# Create any missing version symlinks in private dir +if [ -f %{buildroot}%{_libexecdir}/swift/%{version}/lib/libIndexStore.so.17.0 ] && [ ! -e %{buildroot}%{_libexecdir}/swift/%{version}/lib/libIndexStore.so ]; then + ln -sf libIndexStore.so.17.0 %{buildroot}%{_libexecdir}/swift/%{version}/lib/libIndexStore.so fi # Install lldb libraries to %{_libexecdir} (private, bundled with Swift toolchain) @@ -548,10 +548,10 @@ export QA_SKIP_RPATHS=1 # Man pages %{_mandir}/man1/swift.1.gz -# SourceKit/IndexStore public libraries -%{_libdir}/libIndexStore.so* -%{_libdir}/libsourcekitdInProc.so* -%{_libdir}/libswiftDemangle.so* +# SourceKit/IndexStore/SwiftDemangle private libraries +%{_libexecdir}/swift/%{version}/lib/libIndexStore.so* +%{_libexecdir}/swift/%{version}/lib/libsourcekitdInProc.so* +%{_libexecdir}/swift/%{version}/lib/libswiftDemangle.so* # Compatibility symlink for module lookup %{_libdir}/swift From 001d0b1d64b260f62eefac7b70566b5905a59afe Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jul 2026 07:14:39 +0000 Subject: [PATCH 7/8] Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild From 7670c8d0fafade9cfc805b5a5da1f6a35ef5afb8 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Wed, 22 Jul 2026 10:10:58 +0200 Subject: [PATCH 8/8] Rebuilt for Python 3.15.0b4 ABI change