summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfred Wingate <parona@protonmail.com>2024-07-18 23:54:51 +0300
committerSam James <sam@gentoo.org>2024-08-24 16:19:15 +0100
commitb852475e1efd8600c385bf09be7b85441abb2a7d (patch)
treeb4563ee78cc7c152b099a028d19b15c76239155b /patches
parentpatches: new patch to fix finding file on mips64 (diff)
downloadelt-patches-master.tar.gz
elt-patches-master.tar.bz2
elt-patches-master.zip
patches: add patch to fix use of clang builtinsHEAD20240824master
Bug: https://bugs.gentoo.org/914068 Signed-off-by: Alfred Wingate <parona@protonmail.com> Closes: https://github.com/gentoo/elt-patches/pull/2 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'patches')
-rw-r--r--patches/clang-runtime-ltmain/2.4.733
-rw-r--r--patches/clang-runtime/2.4.731
2 files changed, 64 insertions, 0 deletions
diff --git a/patches/clang-runtime-ltmain/2.4.7 b/patches/clang-runtime-ltmain/2.4.7
new file mode 100644
index 0000000..9857608
--- /dev/null
+++ b/patches/clang-runtime-ltmain/2.4.7
@@ -0,0 +1,33 @@
+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
+
+From 969258b1b25b5b0f78a2a0a2427c4dd4b038f13f Mon Sep 17 00:00:00 2001
+From: q66 <q66@chimera-linux.org>
+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/build-aux/ltmain.in b/build-aux/ltmain.in
+index a5f21a1..e1d4d81 100644
+--- a/build-aux/ltmain.in
++++ b/build-aux/ltmain.in
+@@ -5900,6 +5900,12 @@ func_mode_link ()
+ lib)
+ # Linking convenience modules into shared libraries is allowed,
+ # but linking other static libraries is non-portable.
++ case "$deplib" in
++ */libclang_rt*.$libext)
++ deplibs="$deplib $deplibs"
++ continue
++ ;;
++ esac
+ case " $dlpreconveniencelibs " in
+ *" $deplib "*) ;;
+ *)
diff --git a/patches/clang-runtime/2.4.7 b/patches/clang-runtime/2.4.7
new file mode 100644
index 0000000..7aaf29f
--- /dev/null
+++ b/patches/clang-runtime/2.4.7
@@ -0,0 +1,31 @@
+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
+
+From 969258b1b25b5b0f78a2a0a2427c4dd4b038f13f Mon Sep 17 00:00:00 2001
+From: q66 <q66@chimera-linux.org>
+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}" and the path.
+ # Remove the space.
+ if test x-L = "$p" ||
+--
+2.34.1