commit:     b3a5e57ae32e547e98e43856e517333538a83e42
Author:     Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Sun Jul  6 11:26:46 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jul 18 15:48:12 2025 +0000
URL:        https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=b3a5e57a

patches: clang-runtime: modify to apply to libtool-2.5.0

Bug: https://bugs.gentoo.org/948829
Signed-off-by: Alfred Wingate <parona <AT> protonmail.com>
Part-of: https://github.com/gentoo/elt-patches/pull/5
Closes: https://github.com/gentoo/elt-patches/pull/5
Signed-off-by: Sam James <sam <AT> gentoo.org>

 patches/clang-runtime/2.5.0 | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/patches/clang-runtime/2.5.0 b/patches/clang-runtime/2.5.0
new file mode 100644
index 0000000..9e5bab2
--- /dev/null
+++ b/patches/clang-runtime/2.5.0
@@ -0,0 +1,35 @@
+https://github.com/chimera-linux/cports/blob/master/main/libtool/patches/cxx-clang-runtimes.patch
+https://lists.gnu.org/archive/html/libtool-patches/2021-10/msg00016.html
+https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=1d2577357ee704da2d6d7c7da119ad82ba8ca172
+https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=6132006b5fb6b95f31c30a972fbb829f93e1878b
+
+https://bugs.gentoo.org/914068
+https://bugs.gentoo.org/948829
+
+Modified to apply after
+https://cgit.git.savannah.gnu.org/cgit/libtool.git/commit/?h=development&id=fb617e2ba0809218486323823b74f706cedd9aac
+
+From 969258b1b25b5b0f78a2a0a2427c4dd4b038f13f Mon Sep 17 00:00:00 2001
+From: q66 <[email protected]>
+Date: Sat, 3 Sep 2022 09:41:45 +0000
+Subject: [PATCH] permit clang builtins library to be linked in
+
+libtool links c++ stuff with -nostdlib and manually extracts the
+allowed libs, but this did not previously cover the clang runtimes
+and broke builds on some targets where builtins are needed.
+
+diff --git a/m4/libtool.m4 b/m4/libtool.m4
+index 79a2451..9c08481 100644
+--- a/m4/libtool.m4
++++ b/m4/libtool.m4
+@@ -7554,7 +7554,7 @@ if AC_TRY_EVAL(ac_compile); then
+   for p in `eval "$output_verbose_link_cmd"`; do
+     case $prev$p in
+ 
+-    -L* | -R* | -l*)
++    -L* | -R* | -l* | */libclang_rt*.a)
+        # Some compilers place space between "-{L,R,l}" and the path.
+        # Remove the space.
+        if test x-L = "$p" ||
+-- 
+2.34.1

Reply via email to