public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/elt-patches:master commit in: /, patches/clang-runtime-ltmain/, patches/clang-runtime/
@ 2024-08-24 15:19 Sam James
  0 siblings, 0 replies; only message in thread
From: Sam James @ 2024-08-24 15:19 UTC (permalink / raw
  To: gentoo-commits

commit:     b852475e1efd8600c385bf09be7b85441abb2a7d
Author:     Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Thu Jul 18 20:54:51 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Aug 24 15:19:15 2024 +0000
URL:        https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=b852475e

patches: add patch to fix use of clang builtins

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

 eltpatch.in                        |  6 +++++-
 patches/clang-runtime-ltmain/2.4.7 | 33 +++++++++++++++++++++++++++++++++
 patches/clang-runtime/2.4.7        | 31 +++++++++++++++++++++++++++++++
 3 files changed, 69 insertions(+), 1 deletion(-)

diff --git a/eltpatch.in b/eltpatch.in
index d253d66..2714ba0 100644
--- a/eltpatch.in
+++ b/eltpatch.in
@@ -129,7 +129,7 @@ elibtoolize() {
 	local force="false"
 	local elt_patches="
 		install-sh ltmain portage relink max_cmd_len sed test tmp cross as-needed target-nm ppc64le
-		g-debug specs fsanitize fuse-ld static-flags werror cxx-pthread color-record sed-quote openmp verbose-pic fix-file-check
+		g-debug specs fsanitize fuse-ld static-flags werror cxx-pthread color-record sed-quote openmp verbose-pic fix-file-check clang-runtime-ltmain clang-runtime
 	"
 
 	for x in "$@" ; do
@@ -421,6 +421,10 @@ elibtoolize() {
 					ELT_walk_patches "${d}/configure" "${p}"
 					ret=$?
 					;;
+                clang-runtime)
+					ELT_walk_patches "${d}/configure" "${p}"
+					ret=$?
+					;;
 				*)
 					# ltmain.sh patches are applied above
 					;;

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


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

only message in thread, other threads:[~2024-08-24 15:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-24 15:19 [gentoo-commits] proj/elt-patches:master commit in: /, patches/clang-runtime-ltmain/, patches/clang-runtime/ Sam James

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