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: Fri, 25 Sep 2020 14:20:23
Message-Id: 1601043576.3a7b39fe3f2587bbe01626451f1126eb966e82bc.dilfridge@gentoo
1 commit: 3a7b39fe3f2587bbe01626451f1126eb966e82bc
2 Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 25 14:11:07 2020 +0000
4 Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 25 14:19:36 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a7b39fe
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 | 2 -
14 sys-devel/binutils/binutils-2.35.ebuild | 437 --------------------------------
15 2 files changed, 439 deletions(-)
16
17 diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest
18 index 2dff0ea6ec9..3d995073da3 100644
19 --- a/sys-devel/binutils/Manifest
20 +++ b/sys-devel/binutils/Manifest
21 @@ -5,7 +5,5 @@ DIST binutils-2.33.1-patches-2.tar.xz 18636 BLAKE2B 0e0757329b6a83aeff4f4c450c95
22 DIST binutils-2.33.1.tar.xz 21490848 BLAKE2B c336a8412938dc8c224f40a763a8bea9937cca0462a8fb80e62f14aabe590107fc061a3f4b9327e1f4652cb026384d36a91b4766d4d469d2d0680932874b638c SHA512 b7a6767c6c7ca6b5cafa7080e6820b7bb3a53b7148348c438d99905defbdf0d30c9744a484ee01c9441a8153901808513366b15ba9533e20c9673c262ade36ac
23 DIST binutils-2.34-patches-6.tar.xz 103028 BLAKE2B d0e866d0941d2b550c7d7f23530c6ee393fa13b4f2f27832f07790989476f11d1beddb5ad5a9be5c65c1d4dff9d4598d21adcb00c1d0490f69a99127f4527447 SHA512 e05ed8886acb5cb95a3e97c5bc0564215f7d44b604610f5c4545997fd9625d6de909c37063127e819926cd1548a48d3529dd3e82e98ee6a5dbaced028c57355d
24 DIST binutils-2.34.tar.xz 21637796 BLAKE2B 07dd23916a7d27f71c3f160c8c16abe2bd4fce294c738c665a012a3be6a87dbe8160d0c38740524f9025e01d438e99b2a94bcf9f9f79ee214f5dd033de8aad3d SHA512 2c7976939dcf5e8c5b7374cccd39bfe803b1bec73c6abfa0eb17c24e1942574c6bdb874c66a092a82adc443182eacd8a5a8001c19a76101f0c7ba40c27de0bbd
25 -DIST binutils-2.35-patches-1.tar.xz 12216 BLAKE2B a811449da684e3501a7520a26639e04dda2f2d2fc8610974293eff3e4a1e23c4abeb97f52fe3b796679452bd6e3a5330fef4beb6f64b9ce2a1162076803390a0 SHA512 b8da16a4d97b264da925cc939b54bedbc148eb72a8d60f79d7ed222e9e299dca2a4f1fad4a6d60448d9d196c11331443eca0508dcbb85cb4c2da6c67bfaf4cd2
26 DIST binutils-2.35.1-patches-1.tar.xz 10088 BLAKE2B fa4b0c417b6452757f90243921c60b2406c9bf60d1aaa393654fb23ce52e32fb3e7ed90f6d59286786dd95398a10d008c75bfdca065d704025cc828ff65b225f SHA512 dccb4407f4f2a8b38488f9f42638c10777ee344239cf5d4fcc8f580df3e8ff15d03211dc51ef18d905c326a71771da4b38f47381d6d549422a8353b5da0e7b0b
27 DIST binutils-2.35.1.tar.xz 22031720 BLAKE2B d3468da90b75e9b5fa7fbd64d3fdb0a4bc445e4cb7da5ae058f73a1e9d948b3e9438bc9f1b5b351db369b76a25960c9c1f58f828fd2c7646f555de45fa3c052b SHA512 94ff72708403413b70b247f3af4099ebaa882b6659249869f1ed9941a0f1912e313f08357d470f9fd2359e7f5e5b0eb86285e5eaf883fa8187789d6b1bd304eb
28 -DIST binutils-2.35.tar.xz 22042160 BLAKE2B 72ea79edf3a77aa93dcf38274123abbae5ce8f800a95e6379b4c8807050b05c2dfec314f06c027b1343c5570f369324fa3e195d7e0db5f8a57c0579937c49d3f SHA512 9f222e4ab6720036402d03904fb11b73ab87714b85cd84997f7d357f405c7e10581d70202f9165a1ee0c70538632db27ecc9dfe627dddb1e6bc7edb1537cf786
29
30 diff --git a/sys-devel/binutils/binutils-2.35.ebuild b/sys-devel/binutils/binutils-2.35.ebuild
31 deleted file mode 100644
32 index fb041ee7e6b..00000000000
33 --- a/sys-devel/binutils/binutils-2.35.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 vanilla"
47 -REQUIRED_USE="default-gold? ( gold )"
48 -
49 -# Variables that can be set here (ignored for live ebuilds)
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=1
58 -PATCH_DEV=dilfridge
59 -
60 -if [[ ${PV} == 9999* ]]; then
61 - inherit git-r3
62 - SLOT=${PV}
63 -else
64 - PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
65 - PATCH_DEV=${PATCH_DEV:-slyfox}
66 - SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
67 - [[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
68 - https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
69 - SLOT=$(ver_cut 1-2)
70 - # live ebuild
71 - #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86"
72 -fi
73 -
74 -#
75 -# The cross-compile logic
76 -#
77 -export CTARGET=${CTARGET:-${CHOST}}
78 -if [[ ${CTARGET} == ${CHOST} ]] ; then
79 - if [[ ${CATEGORY} == cross-* ]] ; then
80 - export CTARGET=${CATEGORY#cross-}
81 - fi
82 -fi
83 -is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
84 -
85 -#
86 -# The dependencies
87 -#
88 -RDEPEND="
89 - >=sys-devel/binutils-config-3
90 - sys-libs/zlib
91 -"
92 -DEPEND="${RDEPEND}"
93 -BDEPEND="
94 - doc? ( sys-apps/texinfo )
95 - test? ( dev-util/dejagnu )
96 - nls? ( sys-devel/gettext )
97 - sys-devel/flex
98 - virtual/yacc
99 -"
100 -
101 -RESTRICT="!test? ( test )"
102 -
103 -MY_BUILDDIR=${WORKDIR}/build
104 -
105 -src_unpack() {
106 - if [[ ${PV} == 9999* ]] ; then
107 - EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
108 - EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
109 - git-r3_src_unpack
110 - mv patches-git/9999 patch || die
111 -
112 - EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
113 - S=${WORKDIR}/binutils
114 - EGIT_CHECKOUT_DIR=${S}
115 - git-r3_src_unpack
116 - else
117 - unpack ${P}.tar.xz
118 -
119 - cd "${WORKDIR}" || die
120 - unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
121 - fi
122 -
123 - cd "${WORKDIR}" || die
124 - mkdir -p "${MY_BUILDDIR}" || die
125 -}
126 -
127 -src_prepare() {
128 - local patchsetname
129 - if [[ ${PV} == 9999* ]] ; then
130 - patchsetname="from git master"
131 - else
132 - patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
133 - fi
134 -
135 - if [[ ! -z ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
136 - if ! use vanilla; then
137 - einfo "Applying binutils patchset ${patchsetname}"
138 - eapply "${WORKDIR}/patch"
139 - einfo "Done."
140 - fi
141 - fi
142 -
143 - # This check should probably go somewhere else, like pkg_pretend.
144 - if [[ ${CTARGET} == *-uclibc* ]] ; then
145 - if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
146 - die "sorry, but this binutils doesn't yet support uClibc :("
147 - fi
148 - fi
149 -
150 - # Make sure our explicit libdir paths don't get clobbered. #562460
151 - sed -i \
152 - -e 's:@bfdlibdir@:@libdir@:g' \
153 - -e 's:@bfdincludedir@:@includedir@:g' \
154 - {bfd,opcodes}/Makefile.in || die
155 -
156 - # Fix locale issues if possible #122216
157 - if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
158 - einfo "Fixing misc issues in configure files"
159 - for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
160 - ebegin " Updating ${f/${S}\/}"
161 - patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
162 - || eerror "Please file a bug about this"
163 - eend $?
164 - done
165 - fi
166 -
167 - # Fix conflicts with newer glibc #272594
168 - if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
169 - sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
170 - fi
171 -
172 - # Apply things from PATCHES and user dirs
173 - default
174 -
175 - # Run misc portage update scripts
176 - gnuconfig_update
177 - elibtoolize --portage --no-uclibc
178 -}
179 -
180 -toolchain-binutils_bugurl() {
181 - printf "https://bugs.gentoo.org/"
182 -}
183 -toolchain-binutils_pkgversion() {
184 - printf "Gentoo ${PV}"
185 - [[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
186 -}
187 -
188 -src_configure() {
189 - # Setup some paths
190 - LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
191 - INCPATH=${LIBPATH}/include
192 - DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
193 - if is_cross ; then
194 - TOOLPATH=/usr/${CHOST}/${CTARGET}
195 - else
196 - TOOLPATH=/usr/${CTARGET}
197 - fi
198 - BINPATH=${TOOLPATH}/binutils-bin/${PV}
199 -
200 - # Make sure we filter $LINGUAS so that only ones that
201 - # actually work make it through #42033
202 - strip-linguas -u */po
203 -
204 - # Keep things sane
205 - strip-flags
206 -
207 - local x
208 - echo
209 - for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
210 - einfo "$(printf '%10s' ${x}:) ${!x}"
211 - done
212 - echo
213 -
214 - cd "${MY_BUILDDIR}"
215 - local myconf=()
216 -
217 - if use plugins ; then
218 - myconf+=( --enable-plugins )
219 - fi
220 - # enable gold (installed as ld.gold) and ld's plugin architecture
221 - if use gold ; then
222 - myconf+=( --enable-gold )
223 - if use default-gold; then
224 - myconf+=( --enable-gold=default )
225 - fi
226 - fi
227 -
228 - if use nls ; then
229 - myconf+=( --without-included-gettext )
230 - else
231 - myconf+=( --disable-nls )
232 - fi
233 -
234 - myconf+=( --with-system-zlib )
235 -
236 - # For bi-arch systems, enable a 64bit bfd. This matches
237 - # the bi-arch logic in toolchain.eclass. #446946
238 - # We used to do it for everyone, but it's slow on 32bit arches. #438522
239 - case $(tc-arch) in
240 - ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
241 - esac
242 -
243 - use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
244 -
245 - [[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
246 -
247 - is_cross && myconf+=(
248 - --with-sysroot="${EPREFIX}"/usr/${CTARGET}
249 - --enable-poison-system-directories
250 - )
251 -
252 - # glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
253 - # on everyone in alpha (for now), we'll just enable it when possible
254 - has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
255 - has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
256 -
257 - # mips can't do hash-style=gnu ...
258 - if [[ $(tc-arch) != mips ]] ; then
259 - myconf+=( --enable-default-hash-style=gnu )
260 - fi
261 -
262 - myconf+=(
263 - --prefix="${EPREFIX}"/usr
264 - --host=${CHOST}
265 - --target=${CTARGET}
266 - --datadir="${EPREFIX}"${DATAPATH}
267 - --datarootdir="${EPREFIX}"${DATAPATH}
268 - --infodir="${EPREFIX}"${DATAPATH}/info
269 - --mandir="${EPREFIX}"${DATAPATH}/man
270 - --bindir="${EPREFIX}"${BINPATH}
271 - --libdir="${EPREFIX}"${LIBPATH}
272 - --libexecdir="${EPREFIX}"${LIBPATH}
273 - --includedir="${EPREFIX}"${INCPATH}
274 - --enable-obsolete
275 - --enable-shared
276 - --enable-threads
277 - # Newer versions (>=2.27) offer a configure flag now.
278 - --enable-relro
279 - # Newer versions (>=2.24) make this an explicit option. #497268
280 - --enable-install-libiberty
281 - # Available from 2.35 on
282 - --enable-textrel-check=warning
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}