public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/elt-patches:master commit in: /, patches/cxx-pthread/
@ 2023-12-28  1:04 Sam James
  0 siblings, 0 replies; only message in thread
From: Sam James @ 2023-12-28  1:04 UTC (permalink / raw
  To: gentoo-commits

commit:     62add71b9ab7a444189d80e00a8eaca179cd1c85
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 28 00:54:17 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Dec 28 00:56:42 2023 +0000
URL:        https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=62add71b

patches: add cxx-pthread

Bug: https://bugs.gentoo.org/650876
Bug: https://debbugs.gnu.org/15646
Signed-off-by: Sam James <sam <AT> gentoo.org>

 eltpatch.in               |  2 +-
 patches/cxx-pthread/2.4.6 | 38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 39 insertions(+), 1 deletion(-)

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
+ 	;;
+ 


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

only message in thread, other threads:[~2023-12-28  1:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-28  1:04 [gentoo-commits] proj/elt-patches:master commit in: /, patches/cxx-pthread/ Sam James

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