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