Gentoo Archives: gentoo-commits

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