diff options
author | Sam James <sam@gentoo.org> | 2023-12-28 00:54:17 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-12-28 00:56:42 +0000 |
commit | 62add71b9ab7a444189d80e00a8eaca179cd1c85 (patch) | |
tree | 4c326e7bf6d8eb074d3eeed4d2e09dc0155dd494 | |
parent | 2.4.6, 2.4.7: add werror upstream link (diff) | |
download | elt-patches-62add71b9ab7a444189d80e00a8eaca179cd1c85.tar.gz elt-patches-62add71b9ab7a444189d80e00a8eaca179cd1c85.tar.bz2 elt-patches-62add71b9ab7a444189d80e00a8eaca179cd1c85.zip |
patches: add cxx-pthread20231228
Bug: https://bugs.gentoo.org/650876
Bug: https://debbugs.gnu.org/15646
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r-- | eltpatch.in | 2 | ||||
-rw-r--r-- | patches/cxx-pthread/2.4.6 | 38 |
2 files changed, 39 insertions, 1 deletions
diff --git a/eltpatch.in b/eltpatch.in index e3842bd..1e6920d 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 - specs fsanitize fuse-ld static-flags werror + specs fsanitize fuse-ld static-flags werror cxx-pthread " for x in "$@" ; do diff --git a/patches/cxx-pthread/2.4.6 b/patches/cxx-pthread/2.4.6 new file mode 100644 index 0000000..a57f58e --- /dev/null +++ b/patches/cxx-pthread/2.4.6 @@ -0,0 +1,38 @@ +http://permalink.gmane.org/gmane.comp.gnu.libtool.patches/11704 +https://bugs.gentoo.org/650876 + +From: Pavel Raiskup <praiskup <at> redhat.com> +Subject: [PATCH] libtool: handle the -pthread{,s} options for g++ +Newsgroups: gmane.comp.gnu.libtool.patches +Date: Thursday 28th November 2013 14:18:05 UTC (over 4 years ago) + +As we are forced to pass -nostdlib to g++ for linking, this option +expectedly disables the effectiveness of passed -pthread flag - so +add the -lpthread explicitly to $deplibs to link correctly. + +References: +http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460 +https://bugzilla.redhat.com/show_bug.cgi?id=661333 +http://lists.gnu.org/archive/html/bug-libtool/2013-01/msg00018.htm + +* build-aux/ltmain.in (func_mode_link): Explicitly add -lpthread +flag into $deplibs when -pthread is passed (for g++ only). +--- a/ltmain.sh ++++ b/ltmain.sh +@@ -7127,6 +7127,16 @@ + *" $arg "*) ;; + * ) func_append new_inherited_linker_flags " $arg" ;; + esac ++ ++ # As we are forced to pass -nostdlib to g++ during linking, the option ++ # -pthread{,s} is not in effect; add the -lpthread to $deplist ++ # explicitly to link correctly. ++ if test "$tagname" = CXX -a x"$with_gcc" = xyes; then ++ case "$arg" in ++ -pthread*) func_append deplibs " -lpthread" ;; ++ esac ++ fi ++ + continue + ;; + |