summaryrefslogtreecommitdiff
path: root/sys-devel/libtool/files/libtool-2.4.6-pthread.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-12-24 15:36:46 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-12-24 15:36:46 +0000
commit2a15bb4c21792825ebc98028bbcfff4bb76230eb (patch)
tree78d658bfc8a6fa5463435afbe598bd3847a26be0 /sys-devel/libtool/files/libtool-2.4.6-pthread.patch
parent7e363b923a5933e24521c24eafc75492fa4f5826 (diff)
import the toolchain from gentoo tree, increase revisions so they cannot beat us
Diffstat (limited to 'sys-devel/libtool/files/libtool-2.4.6-pthread.patch')
-rw-r--r--sys-devel/libtool/files/libtool-2.4.6-pthread.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/sys-devel/libtool/files/libtool-2.4.6-pthread.patch b/sys-devel/libtool/files/libtool-2.4.6-pthread.patch
new file mode 100644
index 00000000..49b81c1d
--- /dev/null
+++ b/sys-devel/libtool/files/libtool-2.4.6-pthread.patch
@@ -0,0 +1,43 @@
+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).
+---
+ build-aux/ltmain.in | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
+index fba05c1..f202b80 100644
+--- a/build-aux/ltmain.in
++++ b/build-aux/ltmain.in
+@@ -5113,6 +5113,16 @@ func_mode_link ()
+ *" $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
+ ;;