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