public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/swift-lang] rawhide: Fix runtime library path for relocated toolchain (RHBZ#2521988)
@ 2026-10-19 10:27 Link Dupont
  0 siblings, 0 replies; only message in thread
From: Link Dupont @ 2026-10-19 10:27 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/swift-lang
Branch : rawhide
Commit : 9fefc0b10327d8de2d88cd7d60e0925d4bd56097
Author : Link Dupont <link@sub-pop.net>
Date   : 2026-10-18T22:15:33-04:00
Stats  : +16/-5 in 1 file(s)
URL    : https://src.fedoraproject.org/rpms/swift-lang/c/9fefc0b10327d8de2d88cd7d60e0925d4bd56097?branch=rawhide

Log:
Fix runtime library path for relocated toolchain (RHBZ#2521988)

---
diff --git a/swift-lang.spec b/swift-lang.spec
index 3ace2bf..bcd97b6 100644
--- a/swift-lang.spec
+++ b/swift-lang.spec
@@ -532,11 +532,22 @@ fi
 
 # Install compiler private libraries and modules to %{_libexecdir}
 mkdir -p %{buildroot}%{_libexecdir}/swift/%{version}/lib/swift
-cp -a %{_builddir}/usr/lib/swift/* %{buildroot}%{_libexecdir}/swift/%{version}/lib/swift/
-# Remove the runtime .so files we already installed to %{_libdir}
-if [ -d %{buildroot}%{_libexecdir}/swift/%{version}/lib/swift/linux ]; then
-    find %{buildroot}%{_libexecdir}/swift/%{version}/lib/swift/linux -name '*.so*' -type f -delete
-    find %{buildroot}%{_libexecdir}/swift/%{version}/lib/swift/linux -name '*.so*' -type l -delete
+# Copy everything except the runtime .so files (which go to %{_libdir})
+rsync -a --exclude='*.so' --exclude='*.so.*' \
+    %{_builddir}/usr/lib/swift/ \
+    %{buildroot}%{_libexecdir}/swift/%{version}/lib/swift/
+# Create symlinks from toolchain lib path to runtime libs in %{_libdir} (RHBZ#2521988)
+# The toolchain reports /usr/libexec/swift/<ver>/lib/swift/linux in -print-target-info,
+# so the runtime libraries must be findable there.
+if [ -d %{_builddir}/usr/lib/swift/linux ]; then
+    mkdir -p %{buildroot}%{_libexecdir}/swift/%{version}/lib/swift/linux
+    for lib in %{_builddir}/usr/lib/swift/linux/*.so*; do
+        if [ -e "$lib" ]; then
+            libname=$(basename "$lib")
+            ln -s %{_libdir}/$libname \
+                %{buildroot}%{_libexecdir}/swift/%{version}/lib/swift/linux/$libname
+        fi
+    done
 fi
 
 # Install clang resource directory (sanitizer libraries, builtins)

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-19 10:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-19 10:27 [rpms/swift-lang] rawhide: Fix runtime library path for relocated toolchain (RHBZ#2521988) Link Dupont

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox