public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Link Dupont <link@sub-pop.net>
To: git-commits@fedoraproject.org
Subject: [rpms/swift-lang] rawhide: Fix runtime library path for relocated toolchain (RHBZ#2521988)
Date: Mon, 19 Oct 2026 10:27:09 GMT	[thread overview]
Message-ID: <179240562958.1.8059551796058432683.rpms-swift-lang-9fefc0b10327@fedoraproject.org> (raw)

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)

                 reply	other threads:[~2026-10-19 10:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179240562958.1.8059551796058432683.rpms-swift-lang-9fefc0b10327@fedoraproject.org \
    --to=link@sub-pop.net \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox