diff options
author | Alfred Wingate <parona@protonmail.com> | 2024-07-18 23:54:51 +0300 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-08-24 16:19:15 +0100 |
commit | b852475e1efd8600c385bf09be7b85441abb2a7d (patch) | |
tree | b4563ee78cc7c152b099a028d19b15c76239155b | |
parent | patches: new patch to fix finding file on mips64 (diff) | |
download | elt-patches-20240824.tar.gz elt-patches-20240824.tar.bz2 elt-patches-20240824.zip |
patches: add patch to fix use of clang builtins20240824
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>
-rw-r--r-- | eltpatch.in | 6 | ||||
-rw-r--r-- | patches/clang-runtime-ltmain/2.4.7 | 33 | ||||
-rw-r--r-- | patches/clang-runtime/2.4.7 | 31 |
3 files changed, 69 insertions, 1 deletions
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 |