1 |
commit: 2b1e55d1a19d544550e4566faaeb40ec2657315b |
2 |
Author: Andreas K. Huettel <dilfridge <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Apr 25 18:40:31 2019 +0000 |
4 |
Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Apr 25 18:42:31 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b1e55d1 |
7 |
|
8 |
sys-devel/binutils: Patchlevel bump |
9 |
|
10 |
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org> |
11 |
Closes: https://bugs.gentoo.org/683790 |
12 |
Package-Manager: Portage-2.3.64, Repoman-2.3.12 |
13 |
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org> |
14 |
|
15 |
sys-devel/binutils/Manifest | 1 + |
16 |
sys-devel/binutils/binutils-2.31.1-r6.ebuild | 437 +++++++++++++++++++++++++++ |
17 |
2 files changed, 438 insertions(+) |
18 |
|
19 |
diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest |
20 |
index 21ace0ab8b9..90df1f04f08 100644 |
21 |
--- a/sys-devel/binutils/Manifest |
22 |
+++ b/sys-devel/binutils/Manifest |
23 |
@@ -12,6 +12,7 @@ DIST binutils-2.30-patches-5.tar.xz 590864 BLAKE2B 71de4d08f92ab1898ad576a21763f |
24 |
DIST binutils-2.30.tar.xz 20286700 BLAKE2B 2dd5436a15a601011a1950e6082ec00082f5916fb82ce95ceab424fd8dc19f6daa7ac32a149f222ccdcc603354165cc206fde070eaa44fe2cc5e57486efc7868 SHA512 e747ea20d8d79fcd21b9d9f6695059caa7189d60f19256da398e34b789fea9a133c32b192e9693b5828d27683739b0198431bf8b3e39fb3b04884cf89d9aa839 |
25 |
DIST binutils-2.31.1-patches-5.tar.xz 65896 BLAKE2B 7fb2c4c71336a77f3fef57a0430c511ef7326f8196d8f3a57a6d56aed464953172eeb0755f020387739cf27f709d0bc3de9c3c8b972a94f1480639465158e180 SHA512 c254f22b8ca662cf49cd5fc076d3e9b82d7f421420408c960c54310fc49462600325e7bc50f863cab7c8c49caebac3ac353dc24ab5947e8f01b98c11f43f57d2 |
26 |
DIST binutils-2.31.1-patches-6.tar.xz 76196 BLAKE2B e3c8de07dad62bb3093846389bc1fae0921dd6e63ee2458a85051d298cd1dd52487f83affa33d899e4ddd34b6fd3e28c79a525854c0432d576f83f855d843588 SHA512 6ddfe7b0dc9f340fb1dde3bbc426d087241738b15a5f16a336569b45b2c8ac4077e81e19168c5b165bd4abbaed419e2f290291ef7438a0ecde1f8a6a72217d4c |
27 |
+DIST binutils-2.31.1-patches-7.tar.xz 76828 BLAKE2B 354e7c3aa76c0cfe8fc6bb419a5b19294c0be09ebdff2fc4533dd16116fcd4f4a1b4c8db02233dabe33ca68347e0a30e542456988a4ead407edb47ed031e018c SHA512 c84ff9cd9f5b1e313e93d0f25bb4244950a73e0d97ec4dacb8763382219a08a01b16a8e93173032232ea4239098b29448331ed461f792e663e1117eb0811f85b |
28 |
DIST binutils-2.31.1.tar.xz 20467996 BLAKE2B 6b914df1fbb7cf54f2159f71b2c2b09f3f6a569b7a3cb4cf9790d0a3733a7548bc0ea32334a178ed3b56e8b97656ae99c7abaf212601beeaeae9a0884c0f6051 SHA512 0fca326feb1d5f5fe505a827b20237fe3ec9c13eaf7ec7e35847fd71184f605ba1cefe1314b1b8f8a29c0aa9d88162849ee1c1a3e70c2f7407d88339b17edb30 |
29 |
DIST binutils-2.32-patches-2.tar.xz 145672 BLAKE2B 8218e621f99cb4bcd1638c3011449b94480d207eaeb79cf75c0072e0f1a86bfd1603fc4515bc40d3ac1921a18b9a211b20568f59b11b13eb44e6cff1329c5af9 SHA512 55c25a603f6175af3ade6848e5c1faba06a147d72e9a4f53d44502d97db76499485a67b278a654d18884714a7bf7b360c77c9e42dba3cdc188f805bfe461f09f |
30 |
DIST binutils-2.32.tar.xz 20774880 BLAKE2B d1bdbd9c8487c091665c197974ce4bdf520b7a67ed6997a81b87e6a0af9514a091458244f583acec5ae580ac2ee5e908f67f483b8e5263cd18ced794cb235da6 SHA512 d326408f12a03d9a61a9de56584c2af12f81c2e50d2d7e835d51565df8314df01575724afa1e43bd0db45cfc9916b41519b67dfce03232aa4978704492a6994a |
31 |
|
32 |
diff --git a/sys-devel/binutils/binutils-2.31.1-r6.ebuild b/sys-devel/binutils/binutils-2.31.1-r6.ebuild |
33 |
new file mode 100644 |
34 |
index 00000000000..98700705d01 |
35 |
--- /dev/null |
36 |
+++ b/sys-devel/binutils/binutils-2.31.1-r6.ebuild |
37 |
@@ -0,0 +1,437 @@ |
38 |
+# Copyright 1999-2019 Gentoo Authors |
39 |
+# Distributed under the terms of the GNU General Public License v2 |
40 |
+ |
41 |
+EAPI=6 |
42 |
+ |
43 |
+inherit eutils libtool flag-o-matic gnuconfig multilib versionator |
44 |
+ |
45 |
+DESCRIPTION="Tools necessary to build programs" |
46 |
+HOMEPAGE="https://sourceware.org/binutils/" |
47 |
+LICENSE="GPL-3+" |
48 |
+# USE="+cxx" is a transitional flag until llvm migrates to new flags: |
49 |
+# bug #677888 |
50 |
+IUSE="+cxx default-gold doc +gold multitarget +nls +plugins static-libs test" |
51 |
+REQUIRED_USE="cxx? ( gold plugins ) default-gold? ( gold )" |
52 |
+ |
53 |
+# Variables that can be set here: |
54 |
+# PATCH_VER - the patchset version |
55 |
+# Default: empty, no patching |
56 |
+# PATCH_BINUTILS_VER - the binutils version in the patchset name |
57 |
+# - Default: PV |
58 |
+# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/... |
59 |
+# for the patchsets |
60 |
+# Default: dilfridge :) |
61 |
+ |
62 |
+PATCH_VER=7 |
63 |
+PATCH_DEV=dilfridge |
64 |
+ |
65 |
+case ${PV} in |
66 |
+ 9999) |
67 |
+ EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git" |
68 |
+ inherit git-r3 |
69 |
+ S=${WORKDIR}/binutils |
70 |
+ EGIT_CHECKOUT_DIR=${S} |
71 |
+ SLOT=${PV} |
72 |
+ ;; |
73 |
+ *.9999) |
74 |
+ EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git" |
75 |
+ inherit git-r3 |
76 |
+ S=${WORKDIR}/binutils |
77 |
+ EGIT_CHECKOUT_DIR=${S} |
78 |
+ EGIT_BRANCH=$(get_version_component_range 1-2) |
79 |
+ EGIT_BRANCH="binutils-${EGIT_BRANCH/./_}-branch" |
80 |
+ SLOT=$(get_version_component_range 1-2) |
81 |
+ ;; |
82 |
+ *) |
83 |
+ SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz" |
84 |
+ SLOT=$(get_version_component_range 1-2) |
85 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd" |
86 |
+ ;; |
87 |
+esac |
88 |
+ |
89 |
+# |
90 |
+# The Gentoo patchset |
91 |
+# |
92 |
+PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}} |
93 |
+PATCH_DEV=${PATCH_DEV:-slyfox} |
94 |
+ |
95 |
+[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI} |
96 |
+ https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz" |
97 |
+ |
98 |
+# Disable gold testsuite since it always fails. |
99 |
+PATCHES=( "${FILESDIR}/${PN}-2.29.1-nogoldtest.patch" ) |
100 |
+ |
101 |
+# |
102 |
+# The cross-compile logic |
103 |
+# |
104 |
+export CTARGET=${CTARGET:-${CHOST}} |
105 |
+if [[ ${CTARGET} == ${CHOST} ]] ; then |
106 |
+ if [[ ${CATEGORY} == cross-* ]] ; then |
107 |
+ export CTARGET=${CATEGORY#cross-} |
108 |
+ fi |
109 |
+fi |
110 |
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; } |
111 |
+ |
112 |
+# |
113 |
+# The dependencies |
114 |
+# |
115 |
+RDEPEND=" |
116 |
+ >=sys-devel/binutils-config-3 |
117 |
+ sys-libs/zlib |
118 |
+" |
119 |
+DEPEND="${RDEPEND} |
120 |
+ doc? ( sys-apps/texinfo ) |
121 |
+ test? ( dev-util/dejagnu ) |
122 |
+ nls? ( sys-devel/gettext ) |
123 |
+ sys-devel/flex |
124 |
+ virtual/yacc |
125 |
+" |
126 |
+ |
127 |
+MY_BUILDDIR=${WORKDIR}/build |
128 |
+ |
129 |
+src_unpack() { |
130 |
+ case ${PV} in |
131 |
+ *9999) |
132 |
+ git-r3_src_unpack |
133 |
+ ;; |
134 |
+ *) |
135 |
+ ;; |
136 |
+ esac |
137 |
+ default |
138 |
+ mkdir -p "${MY_BUILDDIR}" |
139 |
+} |
140 |
+ |
141 |
+src_prepare() { |
142 |
+ if [[ ! -z ${PATCH_VER} ]] ; then |
143 |
+ einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}" |
144 |
+ eapply "${WORKDIR}/patch"/*.patch |
145 |
+ fi |
146 |
+ |
147 |
+ # This check should probably go somewhere else, like pkg_pretend. |
148 |
+ if [[ ${CTARGET} == *-uclibc* ]] ; then |
149 |
+ if grep -qs 'linux-gnu' "${S}"/ltconfig ; then |
150 |
+ die "sorry, but this binutils doesn't yet support uClibc :(" |
151 |
+ fi |
152 |
+ fi |
153 |
+ |
154 |
+ # Make sure our explicit libdir paths don't get clobbered. #562460 |
155 |
+ sed -i \ |
156 |
+ -e 's:@bfdlibdir@:@libdir@:g' \ |
157 |
+ -e 's:@bfdincludedir@:@includedir@:g' \ |
158 |
+ {bfd,opcodes}/Makefile.in || die |
159 |
+ |
160 |
+ # Fix locale issues if possible #122216 |
161 |
+ if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then |
162 |
+ einfo "Fixing misc issues in configure files" |
163 |
+ for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do |
164 |
+ ebegin " Updating ${f/${S}\/}" |
165 |
+ patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \ |
166 |
+ || eerror "Please file a bug about this" |
167 |
+ eend $? |
168 |
+ done |
169 |
+ fi |
170 |
+ |
171 |
+ # Fix conflicts with newer glibc #272594 |
172 |
+ if [[ -e libiberty/testsuite/test-demangle.c ]] ; then |
173 |
+ sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c |
174 |
+ fi |
175 |
+ |
176 |
+ # Apply things from PATCHES and user dirs |
177 |
+ default |
178 |
+ |
179 |
+ # Run misc portage update scripts |
180 |
+ gnuconfig_update |
181 |
+ elibtoolize --portage --no-uclibc |
182 |
+} |
183 |
+ |
184 |
+toolchain-binutils_bugurl() { |
185 |
+ printf "https://bugs.gentoo.org/" |
186 |
+} |
187 |
+toolchain-binutils_pkgversion() { |
188 |
+ printf "Gentoo ${PV}" |
189 |
+ [[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}" |
190 |
+} |
191 |
+ |
192 |
+src_configure() { |
193 |
+ # Setup some paths |
194 |
+ LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV} |
195 |
+ INCPATH=${LIBPATH}/include |
196 |
+ DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV} |
197 |
+ if is_cross ; then |
198 |
+ TOOLPATH=/usr/${CHOST}/${CTARGET} |
199 |
+ else |
200 |
+ TOOLPATH=/usr/${CTARGET} |
201 |
+ fi |
202 |
+ BINPATH=${TOOLPATH}/binutils-bin/${PV} |
203 |
+ |
204 |
+ # Make sure we filter $LINGUAS so that only ones that |
205 |
+ # actually work make it through #42033 |
206 |
+ strip-linguas -u */po |
207 |
+ |
208 |
+ # Keep things sane |
209 |
+ strip-flags |
210 |
+ |
211 |
+ local x |
212 |
+ echo |
213 |
+ for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do |
214 |
+ einfo "$(printf '%10s' ${x}:) ${!x}" |
215 |
+ done |
216 |
+ echo |
217 |
+ |
218 |
+ cd "${MY_BUILDDIR}" |
219 |
+ local myconf=() |
220 |
+ |
221 |
+ if use plugins ; then |
222 |
+ myconf+=( --enable-plugins ) |
223 |
+ fi |
224 |
+ # enable gold (installed as ld.gold) and ld's plugin architecture |
225 |
+ if use gold ; then |
226 |
+ myconf+=( --enable-gold ) |
227 |
+ if use default-gold; then |
228 |
+ myconf+=( --enable-gold=default ) |
229 |
+ fi |
230 |
+ fi |
231 |
+ |
232 |
+ if use nls ; then |
233 |
+ myconf+=( --without-included-gettext ) |
234 |
+ else |
235 |
+ myconf+=( --disable-nls ) |
236 |
+ fi |
237 |
+ |
238 |
+ myconf+=( --with-system-zlib ) |
239 |
+ |
240 |
+ # For bi-arch systems, enable a 64bit bfd. This matches |
241 |
+ # the bi-arch logic in toolchain.eclass. #446946 |
242 |
+ # We used to do it for everyone, but it's slow on 32bit arches. #438522 |
243 |
+ case $(tc-arch) in |
244 |
+ ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;; |
245 |
+ esac |
246 |
+ |
247 |
+ use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd ) |
248 |
+ |
249 |
+ [[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} ) |
250 |
+ |
251 |
+ is_cross && myconf+=( |
252 |
+ --with-sysroot="${EPREFIX}"/usr/${CTARGET} |
253 |
+ --enable-poison-system-directories |
254 |
+ ) |
255 |
+ |
256 |
+ # glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+ |
257 |
+ # on everyone in alpha (for now), we'll just enable it when possible |
258 |
+ has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt ) |
259 |
+ has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt ) |
260 |
+ |
261 |
+ # mips can't do hash-style=gnu ... |
262 |
+ if [[ $(tc-arch) != mips ]] ; then |
263 |
+ myconf+=( --enable-default-hash-style=gnu ) |
264 |
+ fi |
265 |
+ |
266 |
+ myconf+=( |
267 |
+ --prefix="${EPREFIX}"/usr |
268 |
+ --host=${CHOST} |
269 |
+ --target=${CTARGET} |
270 |
+ --datadir="${EPREFIX}"${DATAPATH} |
271 |
+ --datarootdir="${EPREFIX}"${DATAPATH} |
272 |
+ --infodir="${EPREFIX}"${DATAPATH}/info |
273 |
+ --mandir="${EPREFIX}"${DATAPATH}/man |
274 |
+ --bindir="${EPREFIX}"${BINPATH} |
275 |
+ --libdir="${EPREFIX}"${LIBPATH} |
276 |
+ --libexecdir="${EPREFIX}"${LIBPATH} |
277 |
+ --includedir="${EPREFIX}"${INCPATH} |
278 |
+ --enable-obsolete |
279 |
+ --enable-shared |
280 |
+ --enable-threads |
281 |
+ # Newer versions (>=2.27) offer a configure flag now. |
282 |
+ --enable-relro |
283 |
+ # Newer versions (>=2.24) make this an explicit option. #497268 |
284 |
+ --enable-install-libiberty |
285 |
+ --disable-werror |
286 |
+ --with-bugurl="$(toolchain-binutils_bugurl)" |
287 |
+ --with-pkgversion="$(toolchain-binutils_pkgversion)" |
288 |
+ $(use_enable static-libs static) |
289 |
+ ${EXTRA_ECONF} |
290 |
+ # Disable modules that are in a combined binutils/gdb tree. #490566 |
291 |
+ --disable-{gdb,libdecnumber,readline,sim} |
292 |
+ # Strip out broken static link flags. |
293 |
+ # https://gcc.gnu.org/PR56750 |
294 |
+ --without-stage1-ldflags |
295 |
+ # Change SONAME to avoid conflict across |
296 |
+ # {native,cross}/binutils, binutils-libs. #666100 |
297 |
+ --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st) |
298 |
+ ) |
299 |
+ echo ./configure "${myconf[@]}" |
300 |
+ "${S}"/configure "${myconf[@]}" || die |
301 |
+ |
302 |
+ # Prevent makeinfo from running if doc is unset. |
303 |
+ if ! use doc ; then |
304 |
+ sed -i \ |
305 |
+ -e '/^MAKEINFO/s:=.*:= true:' \ |
306 |
+ Makefile || die |
307 |
+ fi |
308 |
+} |
309 |
+ |
310 |
+src_compile() { |
311 |
+ cd "${MY_BUILDDIR}" |
312 |
+ # see Note [tooldir hack for ldscripts] |
313 |
+ emake tooldir="${EPREFIX}${TOOLPATH}" all |
314 |
+ |
315 |
+ # only build info pages if the user wants them |
316 |
+ if use doc ; then |
317 |
+ emake info |
318 |
+ fi |
319 |
+ |
320 |
+ # we nuke the manpages when we're left with junk |
321 |
+ # (like when we bootstrap, no perl -> no manpages) |
322 |
+ find . -name '*.1' -a -size 0 -delete |
323 |
+} |
324 |
+ |
325 |
+src_test() { |
326 |
+ cd "${MY_BUILDDIR}" |
327 |
+ |
328 |
+ # bug 637066 |
329 |
+ filter-flags -Wall -Wreturn-type |
330 |
+ |
331 |
+ emake -k check |
332 |
+} |
333 |
+ |
334 |
+src_install() { |
335 |
+ local x d |
336 |
+ |
337 |
+ cd "${MY_BUILDDIR}" |
338 |
+ # see Note [tooldir hack for ldscripts] |
339 |
+ emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install |
340 |
+ rm -rf "${ED}"/${LIBPATH}/bin |
341 |
+ use static-libs || find "${ED}" -name '*.la' -delete |
342 |
+ |
343 |
+ # Newer versions of binutils get fancy with ${LIBPATH} #171905 |
344 |
+ cd "${ED}"/${LIBPATH} |
345 |
+ for d in ../* ; do |
346 |
+ [[ ${d} == ../${PV} ]] && continue |
347 |
+ mv ${d}/* . || die |
348 |
+ rmdir ${d} || die |
349 |
+ done |
350 |
+ |
351 |
+ # Now we collect everything intp the proper SLOT-ed dirs |
352 |
+ # When something is built to cross-compile, it installs into |
353 |
+ # /usr/$CHOST/ by default ... we have to 'fix' that :) |
354 |
+ if is_cross ; then |
355 |
+ cd "${ED}"/${BINPATH} |
356 |
+ for x in * ; do |
357 |
+ mv ${x} ${x/${CTARGET}-} |
358 |
+ done |
359 |
+ |
360 |
+ if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then |
361 |
+ mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH} |
362 |
+ mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/ |
363 |
+ rm -r "${ED}"/usr/${CHOST}/{include,lib} |
364 |
+ fi |
365 |
+ fi |
366 |
+ insinto ${INCPATH} |
367 |
+ local libiberty_headers=( |
368 |
+ # Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir. |
369 |
+ demangle.h |
370 |
+ dyn-string.h |
371 |
+ fibheap.h |
372 |
+ hashtab.h |
373 |
+ libiberty.h |
374 |
+ objalloc.h |
375 |
+ splay-tree.h |
376 |
+ ) |
377 |
+ doins "${libiberty_headers[@]/#/${S}/include/}" || die |
378 |
+ if [[ -d ${ED}/${LIBPATH}/lib ]] ; then |
379 |
+ mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/ |
380 |
+ rm -r "${ED}"/${LIBPATH}/lib |
381 |
+ fi |
382 |
+ |
383 |
+ # Generate an env.d entry for this binutils |
384 |
+ insinto /etc/env.d/binutils |
385 |
+ cat <<-EOF > "${T}"/env.d |
386 |
+ TARGET="${CTARGET}" |
387 |
+ VER="${PV}" |
388 |
+ LIBPATH="${EPREFIX}${LIBPATH}" |
389 |
+ EOF |
390 |
+ newins "${T}"/env.d ${CTARGET}-${PV} |
391 |
+ |
392 |
+ # Handle documentation |
393 |
+ if ! is_cross ; then |
394 |
+ cd "${S}" |
395 |
+ dodoc README |
396 |
+ docinto bfd |
397 |
+ dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO |
398 |
+ docinto binutils |
399 |
+ dodoc binutils/ChangeLog binutils/NEWS binutils/README |
400 |
+ docinto gas |
401 |
+ dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README* |
402 |
+ docinto gprof |
403 |
+ dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl |
404 |
+ docinto ld |
405 |
+ dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO |
406 |
+ docinto libiberty |
407 |
+ dodoc libiberty/ChangeLog* libiberty/README |
408 |
+ docinto opcodes |
409 |
+ dodoc opcodes/ChangeLog* |
410 |
+ fi |
411 |
+ |
412 |
+ # Remove shared info pages |
413 |
+ rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} |
414 |
+ |
415 |
+ # Trim all empty dirs |
416 |
+ find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null |
417 |
+} |
418 |
+ |
419 |
+pkg_postinst() { |
420 |
+ # Make sure this ${CTARGET} has a binutils version selected |
421 |
+ [[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0 |
422 |
+ binutils-config ${CTARGET}-${PV} |
423 |
+} |
424 |
+ |
425 |
+pkg_postrm() { |
426 |
+ local current_profile=$(binutils-config -c ${CTARGET}) |
427 |
+ |
428 |
+ # If no other versions exist, then uninstall for this |
429 |
+ # target ... otherwise, switch to the newest version |
430 |
+ # Note: only do this if this version is unmerged. We |
431 |
+ # rerun binutils-config if this is a remerge, as |
432 |
+ # we want the mtimes on the symlinks updated (if |
433 |
+ # it is the same as the current selected profile) |
434 |
+ if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then |
435 |
+ local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}') |
436 |
+ choice=${choice//$'\n'/ } |
437 |
+ choice=${choice/* } |
438 |
+ if [[ -z ${choice} ]] ; then |
439 |
+ binutils-config -u ${CTARGET} |
440 |
+ else |
441 |
+ binutils-config ${choice} |
442 |
+ fi |
443 |
+ elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then |
444 |
+ binutils-config ${CTARGET}-${PV} |
445 |
+ fi |
446 |
+} |
447 |
+ |
448 |
+# Note [slotting support] |
449 |
+# ----------------------- |
450 |
+# Gentoo's layout for binutils files is non-standard as Gentoo |
451 |
+# supports slotted installation for binutils. Many tools |
452 |
+# still expect binutils to reside in known locations. |
453 |
+# binutils-config package restores symlinks into known locations, |
454 |
+# like: |
455 |
+# /usr/bin/${CTARGET}-<tool> |
456 |
+# /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips |
457 |
+# /usr/include/ |
458 |
+# |
459 |
+# Note [tooldir hack for ldscripts] |
460 |
+# --------------------------------- |
461 |
+# Build system does not allow ./configure to tweak every location |
462 |
+# we need for slotting binutils hence all the shuffling in |
463 |
+# src_install(). This note is about SCRIPTDIR define handling. |
464 |
+# |
465 |
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value |
466 |
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib' |
467 |
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time. |
468 |
+# Thus we can't just move files around after compilation finished. |
469 |
+# |
470 |
+# Our goal is the following: |
471 |
+# - at build-time set scriptdir to point to symlinked location: |
472 |
+# ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case) |
473 |
+# - at install-time set scriptdir to point to slotted location: |
474 |
+# ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV} |