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