From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/elt-patches:master commit in: /, patches/cxx-pthread/
Date: Thu, 28 Dec 2023 01:04:24 +0000 (UTC) [thread overview]
Message-ID: <1703725002.62add71b9ab7a444189d80e00a8eaca179cd1c85.sam@gentoo> (raw)
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
+ ;;
+
reply other threads:[~2023-12-28 1:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1703725002.62add71b9ab7a444189d80e00a8eaca179cd1c85.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox