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