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