From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 25490158015 for ; Thu, 28 Dec 2023 01:04:28 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5A4102BC014; Thu, 28 Dec 2023 01:04:27 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3B58E2BC014 for ; Thu, 28 Dec 2023 01:04:27 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5580E335DC2 for ; Thu, 28 Dec 2023 01:04:26 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E0FD8119 for ; Thu, 28 Dec 2023 01:04:24 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1703725002.62add71b9ab7a444189d80e00a8eaca179cd1c85.sam@gentoo> Subject: [gentoo-commits] proj/elt-patches:master commit in: /, patches/cxx-pthread/ X-VCS-Repository: proj/elt-patches X-VCS-Files: eltpatch.in patches/cxx-pthread/2.4.6 X-VCS-Directories: patches/cxx-pthread/ / X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 62add71b9ab7a444189d80e00a8eaca179cd1c85 X-VCS-Branch: master Date: Thu, 28 Dec 2023 01:04:24 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 92d299d2-aff8-4d49-9d02-68f1093268c1 X-Archives-Hash: ad2ded989600a13620cb9cb580783848 commit: 62add71b9ab7a444189d80e00a8eaca179cd1c85 Author: Sam James gentoo org> AuthorDate: Thu Dec 28 00:54:17 2023 +0000 Commit: Sam James gentoo 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 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 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 + ;; +