Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/libtool/, sys-devel/libtool/files/
Date: Mon, 26 Mar 2018 08:40:15
Message-Id: 1522053511.5690e822e589b92b4225c8c8b671ff8db5faf605.polynomial-c@gentoo
1 commit: 5690e822e589b92b4225c8c8b671ff8db5faf605
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Mon Mar 26 08:37:26 2018 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Mon Mar 26 08:38:31 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5690e822
7
8 sys-devel/libtool: Revbump to add pthread patch.
9
10 Bug: https://bugs.gentoo.org/650876
11 Package-Manager: Portage-2.3.24, Repoman-2.3.6
12
13 .../files/libtool-2.4.6-libtoolize-slow.patch | 6 +--
14 .../libtool/files/libtool-2.4.6-pthread.patch | 43 ++++++++++++++++++++++
15 .../files/libtool-2.4.6-pthread_bootstrapped.patch | 21 +++++++++++
16 ...libtool-9999.ebuild => libtool-2.4.6-r5.ebuild} | 16 +++++++-
17 sys-devel/libtool/libtool-9999.ebuild | 5 +++
18 5 files changed, 87 insertions(+), 4 deletions(-)
19
20 diff --git a/sys-devel/libtool/files/libtool-2.4.6-libtoolize-slow.patch b/sys-devel/libtool/files/libtool-2.4.6-libtoolize-slow.patch
21 index abddee13dc3..d27f976ccb4 100644
22 --- a/sys-devel/libtool/files/libtool-2.4.6-libtoolize-slow.patch
23 +++ b/sys-devel/libtool/files/libtool-2.4.6-libtoolize-slow.patch
24 @@ -37,13 +37,13 @@ Signed-off-by: Pavel Raiskup <praiskup@××××××.com>
25 NEWS | 4 ++++
26 NO-THANKS | 1 +
27 bootstrap | 42 +++++++++++++++++++++++++++---------------
28 - gl/build-aux/extract-trace | 42 +++++++++++++++++++++++++++---------------
29 + build-aux/extract-trace | 42 +++++++++++++++++++++++++++---------------
30 4 files changed, 59 insertions(+), 30 deletions(-)
31
32 diff --git a/gl/build-aux/extract-trace b/gl/build-aux/extract-trace
33 index 315a32a..c6abd21 100755
34 ---- a/gl/build-aux/extract-trace
35 -+++ b/gl/build-aux/extract-trace
36 +--- a/build-aux/extract-trace
37 ++++ b/build-aux/extract-trace
38 @@ -329,29 +329,41 @@ func_extract_trace ()
39 # arguments to Autocof functions, but without following
40 # 'm4_s?include' files.
41
42 diff --git a/sys-devel/libtool/files/libtool-2.4.6-pthread.patch b/sys-devel/libtool/files/libtool-2.4.6-pthread.patch
43 new file mode 100644
44 index 00000000000..49b81c1dcda
45 --- /dev/null
46 +++ b/sys-devel/libtool/files/libtool-2.4.6-pthread.patch
47 @@ -0,0 +1,43 @@
48 +http://permalink.gmane.org/gmane.comp.gnu.libtool.patches/11704
49 +https://bugs.gentoo.org/650876
50 +
51 +From: Pavel Raiskup <praiskup <at> redhat.com>
52 +Subject: [PATCH] libtool: handle the -pthread{,s} options for g++
53 +Newsgroups: gmane.comp.gnu.libtool.patches
54 +Date: Thursday 28th November 2013 14:18:05 UTC (over 4 years ago)
55 +
56 +As we are forced to pass -nostdlib to g++ for linking, this option
57 +expectedly disables the effectiveness of passed -pthread flag - so
58 +add the -lpthread explicitly to $deplibs to link correctly.
59 +
60 +References:
61 +http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460
62 +https://bugzilla.redhat.com/show_bug.cgi?id=661333
63 +http://lists.gnu.org/archive/html/bug-libtool/2013-01/msg00018.htm
64 +
65 +* build-aux/ltmain.in (func_mode_link): Explicitly add -lpthread
66 +flag into $deplibs when -pthread is passed (for g++ only).
67 +---
68 + build-aux/ltmain.in | 10 ++++++++++
69 + 1 file changed, 10 insertions(+)
70 +
71 +diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
72 +index fba05c1..f202b80 100644
73 +--- a/build-aux/ltmain.in
74 ++++ b/build-aux/ltmain.in
75 +@@ -5113,6 +5113,16 @@ func_mode_link ()
76 + *" $arg "*) ;;
77 + * ) func_append new_inherited_linker_flags " $arg" ;;
78 + esac
79 ++
80 ++ # As we are forced to pass -nostdlib to g++ during linking, the option
81 ++ # -pthread{,s} is not in effect; add the -lpthread to $deplist
82 ++ # explicitly to link correctly.
83 ++ if test "$tagname" = CXX -a x"$with_gcc" = xyes; then
84 ++ case "$arg" in
85 ++ -pthread*) func_append deplibs " -lpthread" ;;
86 ++ esac
87 ++ fi
88 ++
89 + continue
90 + ;;
91
92 diff --git a/sys-devel/libtool/files/libtool-2.4.6-pthread_bootstrapped.patch b/sys-devel/libtool/files/libtool-2.4.6-pthread_bootstrapped.patch
93 new file mode 100644
94 index 00000000000..54461ccc54e
95 --- /dev/null
96 +++ b/sys-devel/libtool/files/libtool-2.4.6-pthread_bootstrapped.patch
97 @@ -0,0 +1,21 @@
98 +https://bugs.gentoo.org/650876
99 +
100 +--- libtool-2.4.6/build-aux/ltmain.sh
101 ++++ libtool-2.4.6/build-aux/ltmain.sh
102 +@@ -7079,6 +7079,16 @@
103 + *" $arg "*) ;;
104 + * ) func_append new_inherited_linker_flags " $arg" ;;
105 + esac
106 ++
107 ++ # As we are forced to pass -nostdlib to g++ during linking, the option
108 ++ # -pthread{,s} is not in effect; add the -lpthread to $deplist
109 ++ # explicitly to link correctly.
110 ++ if test "$tagname" = CXX -a x"$with_gcc" = xyes; then
111 ++ case "$arg" in
112 ++ -pthread*) func_append deplibs " -lpthread" ;;
113 ++ esac
114 ++ fi
115 ++
116 + continue
117 + ;;
118 +
119
120 diff --git a/sys-devel/libtool/libtool-9999.ebuild b/sys-devel/libtool/libtool-2.4.6-r5.ebuild
121 similarity index 86%
122 copy from sys-devel/libtool/libtool-9999.ebuild
123 copy to sys-devel/libtool/libtool-2.4.6-r5.ebuild
124 index db8bd168cfd..710968a99a5 100644
125 --- a/sys-devel/libtool/libtool-9999.ebuild
126 +++ b/sys-devel/libtool/libtool-2.4.6-r5.ebuild
127 @@ -5,7 +5,7 @@ EAPI=6
128
129 LIBTOOLIZE="true" #225559
130 WANT_LIBTOOL="none"
131 -inherit autotools epunt-cxx multilib unpacker prefix
132 +inherit autotools epatch epunt-cxx multilib unpacker prefix
133
134 if [[ ${PV} == "9999" ]] ; then
135 EGIT_REPO_URI="git://git.savannah.gnu.org/${PN}.git
136 @@ -35,6 +35,14 @@ DEPEND="${RDEPEND}
137
138 PATCHES=(
139 "${FILESDIR}"/${PN}-2.4.3-use-linux-version-in-fbsd.patch #109105
140 + "${FILESDIR}"/${P}-link-specs.patch
141 + "${FILESDIR}"/${P}-link-fsanitize.patch #573744
142 + "${FILESDIR}"/${P}-link-fuse-ld.patch
143 + "${FILESDIR}"/${P}-libtoolize-slow.patch
144 + "${FILESDIR}"/${P}-libtoolize-delay-help.patch
145 + "${FILESDIR}"/${P}-sed-quote-speedup.patch #542252
146 + "${FILESDIR}"/${P}-ppc64le.patch #581314
147 +
148 "${FILESDIR}"/${PN}-2.4.6-mint.patch
149 "${FILESDIR}"/${PN}-2.2.6a-darwin-module-bundle.patch
150 "${FILESDIR}"/${PN}-2.4.6-darwin-use-linux-version.patch
151 @@ -50,7 +58,12 @@ src_unpack() {
152
153 src_prepare() {
154 if [[ "${PV}" = 9999 ]] ; then
155 + eapply "${FILESDIR}"/${P}-pthread.patch #650876
156 ./bootstrap || die
157 + else
158 + PATCHES+=(
159 + "${FILESDIR}"/${P}-pthread_bootstrapped.patch #650876
160 + )
161 fi
162
163 use vanilla && return 0
164 @@ -68,6 +81,7 @@ src_prepare() {
165 eapply "${FILESDIR}"/${PN}-2.2.10-eprefix.patch
166 eprefixify m4/libtool.m4
167 fi
168 +
169 pushd libltdl >/dev/null
170 AT_NOELIBTOOLIZE=yes eautoreconf
171 popd >/dev/null
172
173 diff --git a/sys-devel/libtool/libtool-9999.ebuild b/sys-devel/libtool/libtool-9999.ebuild
174 index db8bd168cfd..140bf7a5cb4 100644
175 --- a/sys-devel/libtool/libtool-9999.ebuild
176 +++ b/sys-devel/libtool/libtool-9999.ebuild
177 @@ -50,7 +50,12 @@ src_unpack() {
178
179 src_prepare() {
180 if [[ "${PV}" = 9999 ]] ; then
181 + eapply "${FILESDIR}"/${PN}-2.4.6-pthread.patch #650876
182 ./bootstrap || die
183 + else
184 + PATCHES+=(
185 + "${FILESDIR}"/${P}-pthread_bootstrapped.patch #650876
186 + )
187 fi
188
189 use vanilla && return 0