Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/prefix:master commit in: sys-devel/binutils/
Date: Mon, 12 Sep 2022 17:52:36
Message-Id: 1663005114.067591a87843b997107dd4d48b72d1ddd37e4909.grobian@gentoo
1 commit: 067591a87843b997107dd4d48b72d1ddd37e4909
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Mon Sep 12 17:51:54 2022 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 12 17:51:54 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=067591a8
7
8 sys-devel/binutils: sync 2.39-r2 from gx86
9
10 Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
11
12 sys-devel/binutils/Manifest | 2 +
13 ...ls-2.29.1-r1.ebuild => binutils-2.39-r2.ebuild} | 301 ++++++++++++---------
14 2 files changed, 182 insertions(+), 121 deletions(-)
15
16 diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest
17 index 300ae6a9f4..eba64a25c1 100644
18 --- a/sys-devel/binutils/Manifest
19 +++ b/sys-devel/binutils/Manifest
20 @@ -1,3 +1,5 @@
21 DIST binutils-2.29.1.tar.xz 19886772 BLAKE2B e6e86fc148fe42b56c026aa62766b10acf1039c47106e55193ee7cb9cac0ed4414fed4a554624962c114e454261d9fc38843f3cd5b0c3cae9b5a36e09eefc0a5 SHA512 d748d22306477d60d921078804d21943248c23fca0707aac9b016a352c01c75ca69e82624ae37fb0bbd03af3b17088a94f60dfe1a86a7ff82e18ece3c24f0fd0
22 DIST binutils-2.34-patches-4.tar.xz 95232 BLAKE2B 0a355120ecaf447d863f6d0837028061968166c9024da36212ce7d172ee2060e4027be1fca0089e38ab9073b5332307ff1dc05b868603bd2aa0ec8e88af7cd0a SHA512 e593edbeddaf97ef23fa8eb25c5714c7f2dd2500d11422bd9dba42e119884fe71593adc98862f74c7d391ceb298556ed049eee3c504733c634faef236045876b
23 DIST binutils-2.34.tar.xz 21637796 BLAKE2B 07dd23916a7d27f71c3f160c8c16abe2bd4fce294c738c665a012a3be6a87dbe8160d0c38740524f9025e01d438e99b2a94bcf9f9f79ee214f5dd033de8aad3d SHA512 2c7976939dcf5e8c5b7374cccd39bfe803b1bec73c6abfa0eb17c24e1942574c6bdb874c66a092a82adc443182eacd8a5a8001c19a76101f0c7ba40c27de0bbd
24 +DIST binutils-2.39-patches-4.tar.xz 62880 BLAKE2B 5cc335769d9c88417583ce059c61d0d7655f3ab9ac69647e6e2f65bd3a9dd143fe34c50bb68ab81d4226ddd0e4ef405d7102f67375a672eedc3d01b92b8ef497 SHA512 ef81350979af64cf35800b39982c84657a5c01362c01d221164a43d8f0dd80276c9f052c55d24516fad457e6671a58d467d71b5edd6c1f53fddbdb31172a21ee
25 +DIST binutils-2.39.tar.xz 25167756 BLAKE2B ac6a5296c6586d53eaadcbffc5c399a6d79edf72450b9bb8b3525ce525129cef3d2eb90c85ef3bb3270b5a03b0e1ffb8f0b705f028158726f9777ebb8685066f SHA512 68e038f339a8c21faa19a57bbc447a51c817f47c2e06d740847c6e9cc3396c025d35d5369fa8c3f8b70414757c89f0e577939ddc0d70f283182504920f53b0a3
26
27 diff --git a/sys-devel/binutils/binutils-2.29.1-r1.ebuild b/sys-devel/binutils/binutils-2.39-r2.ebuild
28 similarity index 61%
29 rename from sys-devel/binutils/binutils-2.29.1-r1.ebuild
30 rename to sys-devel/binutils/binutils-2.39-r2.ebuild
31 index 435264c817..41f01bb583 100644
32 --- a/sys-devel/binutils/binutils-2.29.1-r1.ebuild
33 +++ b/sys-devel/binutils/binutils-2.39-r2.ebuild
34 @@ -1,52 +1,40 @@
35 -# Copyright 1999-2021 Gentoo Authors
36 +# Copyright 1999-2022 Gentoo Authors
37 # Distributed under the terms of the GNU General Public License v2
38
39 -# NOTE: currently latest version on Solaris that works
40 +EAPI=7
41
42 -EAPI=6
43 -
44 -inherit eutils libtool flag-o-matic gnuconfig multilib versionator
45 +inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
46
47 DESCRIPTION="Tools necessary to build programs"
48 HOMEPAGE="https://sourceware.org/binutils/"
49 -LICENSE="GPL-3+"
50 -IUSE="+cxx doc multitarget +nls static-libs test"
51 -
52 -PATCHVER="3"
53 -ELF2FLT_VER=""
54
55 -case ${PV} in
56 - 9999)
57 - EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
58 - inherit git-r3
59 - S=${WORKDIR}/binutils
60 - EGIT_CHECKOUT_DIR=${S}
61 - SLOT=${PV}
62 - ;;
63 - *.9999)
64 - EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
65 - inherit git-r3
66 - S=${WORKDIR}/binutils
67 - EGIT_CHECKOUT_DIR=${S}
68 - EGIT_BRANCH=$(get_version_component_range 1-2)
69 - EGIT_BRANCH="binutils-${EGIT_BRANCH/./_}-branch"
70 - SLOT=$(get_version_component_range 1-2)
71 - ;;
72 - *)
73 - SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
74 - SLOT=$(get_version_component_range 1-2)
75 - KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
76 - ;;
77 -esac
78 -
79 -#
80 -# The Gentoo patchset
81 -#
82 -PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
83 -PATCH_DEV=${PATCH_DEV:-sam}
84 -
85 -[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
86 - https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
87 +LICENSE="GPL-3+"
88 +IUSE="cet default-gold doc gold gprofng multitarget +nls pgo +plugins static-libs test vanilla"
89 +REQUIRED_USE="default-gold? ( gold )"
90 +
91 +# Variables that can be set here (ignored for live ebuilds)
92 +# PATCH_VER - the patchset version
93 +# Default: empty, no patching
94 +# PATCH_BINUTILS_VER - the binutils version in the patchset name
95 +# - Default: PV
96 +# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
97 +# for the patchsets
98 +
99 +PATCH_VER=4
100 +PATCH_DEV=dilfridge
101 +
102 +if [[ ${PV} == 9999* ]]; then
103 + inherit git-r3
104 + SLOT=${PV}
105 +else
106 + PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
107 + PATCH_DEV=${PATCH_DEV:-dilfridge}
108 + SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
109 + [[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
110 + https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
111 + SLOT=$(ver_cut 1-2)
112 + KEYWORDS="~x64-cygwin ~amd64-linux ~x86-linux ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
113 +fi
114
115 #
116 # The cross-compile logic
117 @@ -66,60 +54,77 @@ RDEPEND="
118 >=sys-devel/binutils-config-3
119 sys-libs/zlib
120 "
121 -DEPEND="${RDEPEND}
122 +DEPEND="${RDEPEND}"
123 +BDEPEND="
124 doc? ( sys-apps/texinfo )
125 - test? ( dev-util/dejagnu )
126 + test? (
127 + dev-util/dejagnu
128 + sys-devel/bc
129 + )
130 nls? ( sys-devel/gettext )
131 sys-devel/flex
132 virtual/yacc
133 "
134 -if is_cross ; then
135 - # The build assumes the host has libiberty and such when cross-compiling
136 - # its build tools. We should probably make binutils itself build a local
137 - # copy to use, but until then, be lazy.
138 - DEPEND+=" >=sys-libs/binutils-libs-${PV}"
139 -fi
140
141 -MY_BUILDDIR=${WORKDIR}/build
142 +RESTRICT="!test? ( test )"
143
144 PATCHES=(
145 - "${FILESDIR}/${P}-nogoldtest.patch"
146 "${FILESDIR}"/${PN}-2.22-solaris-anonymous-version-script-fix.patch
147 - "${FILESDIR}"/${PN}-2.24-cygwin-nointl.patch
148 )
149
150 +MY_BUILDDIR=${WORKDIR}/build
151 +
152 src_unpack() {
153 - case ${PV} in
154 - *9999)
155 - git-r3_src_unpack
156 - ;;
157 - *)
158 - ;;
159 - esac
160 - default
161 - mkdir -p "${MY_BUILDDIR}"
162 + if [[ ${PV} == 9999* ]] ; then
163 + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
164 + EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
165 + git-r3_src_unpack
166 + mv patches-git/9999 patch || die
167 +
168 + EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
169 + S=${WORKDIR}/binutils
170 + EGIT_CHECKOUT_DIR=${S}
171 + git-r3_src_unpack
172 + else
173 + unpack ${P/-hppa64/}.tar.xz
174 +
175 + cd "${WORKDIR}" || die
176 + unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
177 +
178 + # _p patch versions are Gentoo specific tarballs ...
179 + local dir=${P%_p?}
180 + dir=${dir/-hppa64/}
181 +
182 + S=${WORKDIR}/${dir}
183 + fi
184 +
185 + cd "${WORKDIR}" || die
186 + mkdir -p "${MY_BUILDDIR}" || die
187 }
188
189 src_prepare() {
190 - if [[ ! -z ${PATCH_VER} ]] ; then
191 - einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
192 - eapply "${WORKDIR}/patch"/*.patch
193 + local patchsetname
194 + if [[ ${PV} == 9999* ]] ; then
195 + patchsetname="from git master"
196 + else
197 + patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
198 fi
199
200 - # This check should probably go somewhere else, like pkg_pretend.
201 - if [[ ${CTARGET} == *-uclibc* ]] ; then
202 - if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
203 - die "sorry, but this binutils doesn't yet support uClibc :("
204 + if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
205 + if ! use vanilla; then
206 + einfo "Applying binutils patchset ${patchsetname}"
207 + eapply "${WORKDIR}/patch"
208 + einfo "Done."
209 fi
210 fi
211
212 - # Make sure our explicit libdir paths don't get clobbered. #562460
213 + # Make sure our explicit libdir paths don't get clobbered, bug #562460
214 sed -i \
215 -e 's:@bfdlibdir@:@libdir@:g' \
216 -e 's:@bfdincludedir@:@includedir@:g' \
217 {bfd,opcodes}/Makefile.in || die
218
219 - # Fix locale issues if possible #122216
220 + # Fix locale issues if possible, bug #122216
221 if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
222 einfo "Fixing misc issues in configure files"
223 for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
224 @@ -130,11 +135,6 @@ src_prepare() {
225 done
226 fi
227
228 - # Fix conflicts with newer glibc #272594
229 - if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
230 - sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
231 - fi
232 -
233 # Apply things from PATCHES and user dirs
234 default
235
236 @@ -152,6 +152,11 @@ toolchain-binutils_pkgversion() {
237 }
238
239 src_configure() {
240 + # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
241 + # Avoid really confusing logs from subconfigure spam, makes logs far
242 + # more legible.
243 + MAKEOPTS="--output-sync=line ${MAKEOPTS}"
244 +
245 # Setup some paths
246 LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
247 INCPATH=${LIBPATH}/include
248 @@ -164,12 +169,14 @@ src_configure() {
249 BINPATH=${TOOLPATH}/binutils-bin/${PV}
250
251 # Make sure we filter $LINGUAS so that only ones that
252 - # actually work make it through #42033
253 + # actually work make it through, bug #42033
254 strip-linguas -u */po
255
256 # Keep things sane
257 strip-flags
258
259 + use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
260 +
261 local x
262 echo
263 for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
264 @@ -177,34 +184,37 @@ src_configure() {
265 done
266 echo
267
268 - cd "${MY_BUILDDIR}"
269 + cd "${MY_BUILDDIR}" || die
270 local myconf=()
271
272 + if use plugins ; then
273 + myconf+=( --enable-plugins )
274 + fi
275 # enable gold (installed as ld.gold) and ld's plugin architecture
276 - # PREFIX LOCAL: Linux only (fails to compile on Solaris, MiNT #353410)
277 - [[ ${CHOST} == *-linux* ]] &&
278 - if use cxx ; then
279 + if use gold ; then
280 myconf+=( --enable-gold )
281 - myconf+=( --enable-plugins )
282 + if use default-gold; then
283 + myconf+=( --enable-gold=default )
284 + fi
285 fi
286
287 if use nls ; then
288 myconf+=( --without-included-gettext )
289 + [[ ${CHOST} == *"-solaris"* ]] && append-libs -lintl
290 else
291 myconf+=( --disable-nls )
292 fi
293
294 myconf+=( --with-system-zlib )
295
296 - # For bi-arch systems, enable a 64bit bfd. This matches
297 - # the bi-arch logic in toolchain.eclass. #446946
298 - # We used to do it for everyone, but it's slow on 32bit arches. #438522
299 + # For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
300 + # logic in toolchain.eclass. bug #446946
301 + #
302 + # We used to do it for everyone, but it's slow on 32bit arches. bug #438522
303 case $(tc-arch) in
304 ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
305 esac
306
307 - [[ ${CHOST} == *"-solaris"* ]] && use nls && append-libs -lintl
308 -
309 use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
310
311 [[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
312 @@ -214,13 +224,11 @@ src_configure() {
313 --enable-poison-system-directories
314 )
315
316 - # glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
317 - # on everyone in alpha (for now), we'll just enable it when possible
318 - has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
319 - has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
320 + myconf+=( --enable-secureplt )
321
322 # mips can't do hash-style=gnu ...
323 - if [[ $(tc-arch) != mips ]] ; then
324 + # let's not do this on Solaris either
325 + if [[ $(tc-arch) != mips && ${CHOST} != *-solaris* ]] ; then
326 myconf+=( --enable-default-hash-style=gnu )
327 fi
328
329 @@ -241,24 +249,69 @@ src_configure() {
330 --enable-threads
331 # Newer versions (>=2.27) offer a configure flag now.
332 --enable-relro
333 - # Newer versions (>=2.24) make this an explicit option. #497268
334 + # Newer versions (>=2.24) make this an explicit option, bug #497268
335 --enable-install-libiberty
336 + # Available from 2.35 on
337 + --enable-textrel-check=warning
338 +
339 + # Available from 2.39 on
340 + --enable-warn-execstack
341 + --enable-warn-rwx-segments
342 + # TODO: Available from 2.39+ on but let's try the warning on for a bit
343 + # first... (--enable-warn-execstack)
344 + # Could put it under USE=hardened?
345 + #--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing)
346 +
347 + # Things to think about
348 + #--enable-deterministic-archives
349 +
350 + # Works better than vapier's patch, bug #808787
351 + --enable-new-dtags
352 +
353 + --disable-jansson
354 --disable-werror
355 --with-bugurl="$(toolchain-binutils_bugurl)"
356 --with-pkgversion="$(toolchain-binutils_pkgversion)"
357 $(use_enable static-libs static)
358 - ${EXTRA_ECONF}
359 - # Disable modules that are in a combined binutils/gdb tree. #490566
360 + # Disable modules that are in a combined binutils/gdb tree, bug #490566
361 --disable-{gdb,libdecnumber,readline,sim}
362 # Strip out broken static link flags.
363 # https://gcc.gnu.org/PR56750
364 --without-stage1-ldflags
365 # Change SONAME to avoid conflict across
366 - # {native,cross}/binutils, binutils-libs. #666100
367 + # {native,cross}/binutils, binutils-libs. bug #666100
368 --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
369 +
370 + # Avoid automagic dependency on (currently prefix) systems
371 + # systems with debuginfod library, bug #754753
372 + --without-debuginfod
373 +
374 + # Avoid automagic dev-libs/msgpack dep, bug #865875
375 + --without-msgpack
376 +
377 + # Allow user to opt into CET for host libraries.
378 + # Ideally we would like automagic-or-disabled here.
379 + # But the check does not quite work on i686: bug #760926.
380 + $(use_enable cet)
381 +
382 + # We can enable this by default in future, but it's brand new
383 + # in 2.39 with several bugs:
384 + # - Doesn't build on musl (https://sourceware.org/bugzilla/show_bug.cgi?id=29477)
385 + # - No man pages (https://sourceware.org/bugzilla/show_bug.cgi?id=29521)
386 + # - Broken at runtime without Java (https://sourceware.org/bugzilla/show_bug.cgi?id=29479)
387 + # - binutils-config (and this ebuild?) needs adaptation first (https://bugs.gentoo.org/865113)
388 + $(use_enable gprofng)
389 )
390 - echo ./configure "${myconf[@]}"
391 - "${S}"/configure "${myconf[@]}" || die
392 +
393 + if ! is_cross ; then
394 + myconf+=( $(use_enable pgo pgo-build lto) )
395 +
396 + if use pgo ; then
397 + export BUILD_CFLAGS="${CFLAGS}"
398 + fi
399 + fi
400 +
401 + ECONF_SOURCE="${S}" econf "${myconf[@]}" || die
402
403 # Prevent makeinfo from running if doc is unset.
404 if ! use doc ; then
405 @@ -269,21 +322,14 @@ src_configure() {
406 }
407
408 src_compile() {
409 - local makeargs=()
410 - if has noinfo "${FEATURES}" \
411 - || ! type -p makeinfo >/dev/null
412 - then
413 - # binutils >= 2.17 (accidentally?) requires 'makeinfo'
414 - makeargs+=("MAKEINFO=true")
415 - fi
416 + cd "${MY_BUILDDIR}" || die
417
418 - cd "${MY_BUILDDIR}"
419 # see Note [tooldir hack for ldscripts]
420 - emake tooldir="${EPREFIX}${TOOLPATH}" all "${makeargs[@]}"
421 + emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
422
423 # only build info pages if the user wants them
424 if use doc ; then
425 - emake info
426 + emake V=1 info
427 fi
428
429 # we nuke the manpages when we're left with junk
430 @@ -292,21 +338,26 @@ src_compile() {
431 }
432
433 src_test() {
434 - cd "${MY_BUILDDIR}"
435 - emake -k check
436 + cd "${MY_BUILDDIR}" || die
437 +
438 + # bug #637066
439 + filter-flags -Wall -Wreturn-type
440 +
441 + emake -k V=1 check
442 }
443
444 src_install() {
445 local x d
446
447 - cd "${MY_BUILDDIR}"
448 + cd "${MY_BUILDDIR}" || die
449 +
450 # see Note [tooldir hack for ldscripts]
451 - emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
452 - rm -rf "${ED}"/${LIBPATH}/bin
453 + emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
454 + rm -rf "${ED}"/${LIBPATH}/bin || die
455 use static-libs || find "${ED}" -name '*.la' -delete
456
457 - # Newer versions of binutils get fancy with ${LIBPATH} #171905
458 - cd "${ED}"/${LIBPATH}
459 + # Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
460 + cd "${ED}"/${LIBPATH} || die
461 for d in ../* ; do
462 [[ ${d} == ../${PV} ]] && continue
463 mv ${d}/* . || die
464 @@ -317,9 +368,9 @@ src_install() {
465 # When something is built to cross-compile, it installs into
466 # /usr/$CHOST/ by default ... we have to 'fix' that :)
467 if is_cross ; then
468 - cd "${ED}"/${BINPATH}
469 + cd "${ED}"/${BINPATH} || die
470 for x in * ; do
471 - mv ${x} ${x/${CTARGET}-}
472 + mv ${x} ${x/${CTARGET}-} || die
473 done
474
475 if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
476 @@ -328,6 +379,7 @@ src_install() {
477 rm -r "${ED}"/usr/${CHOST}/{include,lib}
478 fi
479 fi
480 +
481 insinto ${INCPATH}
482 local libiberty_headers=(
483 # Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir.
484 @@ -339,10 +391,10 @@ src_install() {
485 objalloc.h
486 splay-tree.h
487 )
488 - doins "${libiberty_headers[@]/#/${S}/include/}" || die
489 + doins "${libiberty_headers[@]/#/${S}/include/}"
490 if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
491 - mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
492 - rm -r "${ED}"/${LIBPATH}/lib
493 + mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/ || die
494 + rm -r "${ED}"/${LIBPATH}/lib || die
495 fi
496
497 # Generate an env.d entry for this binutils
498 @@ -356,20 +408,27 @@ src_install() {
499
500 # Handle documentation
501 if ! is_cross ; then
502 - cd "${S}"
503 + cd "${S}" || die
504 dodoc README
505 +
506 docinto bfd
507 dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
508 +
509 docinto binutils
510 dodoc binutils/ChangeLog binutils/NEWS binutils/README
511 +
512 docinto gas
513 dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
514 +
515 docinto gprof
516 dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
517 +
518 docinto ld
519 dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
520 +
521 docinto libiberty
522 dodoc libiberty/ChangeLog* libiberty/README
523 +
524 docinto opcodes
525 dodoc opcodes/ChangeLog*
526 fi