Gentoo Archives: gentoo-commits

From: Benda XU <heroxbd@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/android:master commit in: eclass/
Date: Thu, 26 May 2016 04:05:09
Message-Id: 1463903128.f9104e06308a2f4ffe402469af42a4931dae3297.heroxbd@gentoo
1 commit: f9104e06308a2f4ffe402469af42a4931dae3297
2 Author: Benda Xu <heroxbd <AT> gentoo <DOT> org>
3 AuthorDate: Sun May 22 07:45:28 2016 +0000
4 Commit: Benda XU <heroxbd <AT> gentoo <DOT> org>
5 CommitDate: Sun May 22 07:45:28 2016 +0000
6 URL: https://gitweb.gentoo.org/proj/android.git/commit/?id=f9104e06
7
8 toolchain-binutils.eclass: merged.
9 toolchain.eclass: move the tricks into profiles.
10
11 eclass/toolchain-binutils.eclass | 507 ---------------------------------------
12 eclass/toolchain.eclass | 2 +-
13 2 files changed, 1 insertion(+), 508 deletions(-)
14
15 diff --git a/eclass/toolchain-binutils.eclass b/eclass/toolchain-binutils.eclass
16 deleted file mode 100644
17 index e8ceca4..0000000
18 --- a/eclass/toolchain-binutils.eclass
19 +++ /dev/null
20 @@ -1,507 +0,0 @@
21 -# Copyright 1999-2013 Gentoo Foundation
22 -# Distributed under the terms of the GNU General Public License v2
23 -# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-binutils.eclass,v 1.137 2014/11/08 17:12:09 vapier Exp $
24 -#
25 -# Maintainer: Toolchain Ninjas <toolchain@g.o>
26 -#
27 -# We install binutils into CTARGET-VERSION specific directories. This lets
28 -# us easily merge multiple versions for multiple targets (if we wish) and
29 -# then switch the versions on the fly (with `binutils-config`).
30 -#
31 -# binutils-99999999 -> live cvs
32 -# binutils-9999 -> live git
33 -# binutils-9999_preYYMMDD -> nightly snapshot date YYMMDD
34 -# binutils-# -> normal release
35 -
36 -extra_eclass=""
37 -if [[ -n ${BINUTILS_TYPE} ]] ; then
38 - BTYPE=${BINUTILS_TYPE}
39 -else
40 - case ${PV} in
41 - 99999999) BTYPE="cvs";;
42 - 9999) BTYPE="git";;
43 - 9999_pre*) BTYPE="snap";;
44 - *.*.90) BTYPE="snap";;
45 - *.*.*.*.*) BTYPE="hjlu";;
46 - *) BTYPE="rel";;
47 - esac
48 -fi
49 -
50 -case ${BTYPE} in
51 -cvs)
52 - extra_eclass="cvs"
53 - ECVS_SERVER="sourceware.org:/cvs/src"
54 - ECVS_MODULE="binutils"
55 - ECVS_USER="anoncvs"
56 - ECVS_PASS="anoncvs"
57 - BVER="cvs"
58 - ;;
59 -git)
60 - extra_eclass="git-2"
61 - BVER="git"
62 - EGIT_REPO_URI="git://sourceware.org/git/binutils-gdb.git"
63 - ;;
64 -snap)
65 - BVER=${PV/9999_pre}
66 - ;;
67 -*)
68 - BVER=${BINUTILS_VER:-${PV}}
69 - ;;
70 -esac
71 -
72 -inherit eutils libtool flag-o-matic gnuconfig multilib versionator unpacker ${extra_eclass}
73 -case ${EAPI:-0} in
74 -0|1)
75 - EXPORT_FUNCTIONS src_unpack src_compile src_test src_install pkg_postinst pkg_postrm ;;
76 -2|3|4|5)
77 - EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_test src_install pkg_postinst pkg_postrm ;;
78 -*) die "unsupported EAPI ${EAPI}" ;;
79 -esac
80 -
81 -export CTARGET=${CTARGET:-${CHOST}}
82 -if [[ ${CTARGET} == ${CHOST} ]] ; then
83 - if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
84 - export CTARGET=${CATEGORY/cross-}
85 - fi
86 -fi
87 -is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
88 -
89 -DESCRIPTION="Tools necessary to build programs"
90 -HOMEPAGE="http://sourceware.org/binutils/"
91 -
92 -case ${BTYPE} in
93 - cvs|git) SRC_URI="" ;;
94 - snap)
95 - SRC_URI="ftp://gcc.gnu.org/pub/binutils/snapshots/binutils-${BVER}.tar.bz2
96 - ftp://sourceware.org/pub/binutils/snapshots/binutils-${BVER}.tar.bz2" ;;
97 - hjlu)
98 - SRC_URI="mirror://kernel/linux/devel/binutils/binutils-${BVER}.tar."
99 - version_is_at_least 2.21.51.0.5 && SRC_URI+="xz" || SRC_URI+="bz2" ;;
100 - rel) SRC_URI="mirror://gnu/binutils/binutils-${BVER}.tar.bz2" ;;
101 -esac
102 -add_src_uri() {
103 - [[ -z $2 ]] && return
104 - local a=$1
105 - if version_is_at_least 2.22.52.0.2 ; then
106 - a+=".xz"
107 - else
108 - a+=".bz2"
109 - fi
110 - set -- mirror://gentoo http://dev.gentoo.org/~vapier/dist
111 - SRC_URI="${SRC_URI} ${@/%//${a}}"
112 -}
113 -add_src_uri binutils-${BVER}-patches-${PATCHVER}.tar ${PATCHVER}
114 -add_src_uri binutils-${BVER}-uclibc-patches-${UCLIBC_PATCHVER}.tar ${UCLIBC_PATCHVER}
115 -add_src_uri elf2flt-${ELF2FLT_VER}.tar ${ELF2FLT_VER}
116 -
117 -if version_is_at_least 2.18 ; then
118 - LICENSE="|| ( GPL-3 LGPL-3 )"
119 -else
120 - LICENSE="|| ( GPL-2 LGPL-2 )"
121 -fi
122 -IUSE="cxx multislot multitarget nls static-libs test vanilla"
123 -if version_is_at_least 2.19 ; then
124 - IUSE+=" zlib"
125 -fi
126 -if ! version_is_at_least 2.23.90 || [[ ${PV} == "9999" ]] || use multislot ; then
127 - SLOT="${BVER}"
128 -else
129 - SLOT="0"
130 -fi
131 -
132 -RDEPEND=">=sys-devel/binutils-config-3"
133 -in_iuse zlib && RDEPEND+=" zlib? ( sys-libs/zlib )"
134 -DEPEND="${RDEPEND}
135 - test? ( dev-util/dejagnu )
136 - nls? ( sys-devel/gettext )
137 - sys-devel/flex
138 - virtual/yacc"
139 -
140 -S=${WORKDIR}/binutils
141 -case ${BVER} in
142 -cvs|git) ;;
143 -*) S=${S}-${BVER} ;;
144 -esac
145 -
146 -LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${BVER}
147 -INCPATH=${LIBPATH}/include
148 -DATAPATH=/usr/share/binutils-data/${CTARGET}/${BVER}
149 -MY_BUILDDIR=${WORKDIR}/build
150 -if is_cross ; then
151 - BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${BVER}
152 -else
153 - BINPATH=/usr/${CTARGET}/binutils-bin/${BVER}
154 -fi
155 -
156 -tc-binutils_unpack() {
157 - case ${BTYPE} in
158 - cvs) cvs_src_unpack ;;
159 - git) git-2_src_unpack ;;
160 - *) unpacker ${A} ;;
161 - esac
162 - mkdir -p "${MY_BUILDDIR}"
163 - [[ -d ${WORKDIR}/patch ]] && mkdir "${WORKDIR}"/patch/skip
164 -}
165 -
166 -# In case the ebuild wants to add a few of their own.
167 -PATCHES=()
168 -
169 -tc-binutils_apply_patches() {
170 - cd "${S}"
171 -
172 - if ! use vanilla ; then
173 - if [[ -n ${PATCHVER} ]] ; then
174 - EPATCH_SOURCE=${WORKDIR}/patch
175 - if [[ ${CTARGET} == mips* ]] ; then
176 - # remove gnu-hash for mips (bug #233233)
177 - EPATCH_EXCLUDE+=" 77_all_generate-gnu-hash.patch"
178 - fi
179 - [[ -n $(ls "${EPATCH_SOURCE}"/*.bz2 2>/dev/null) ]] \
180 - && EPATCH_SUFFIX="patch.bz2" \
181 - || EPATCH_SUFFIX="patch"
182 - epatch
183 - fi
184 - if [[ -n ${UCLIBC_PATCHVER} ]] ; then
185 - EPATCH_SOURCE=${WORKDIR}/uclibc-patches
186 - [[ -n $(ls "${EPATCH_SOURCE}"/*.bz2 2>/dev/null) ]] \
187 - && EPATCH_SUFFIX="patch.bz2" \
188 - || EPATCH_SUFFIX="patch"
189 - EPATCH_MULTI_MSG="Applying uClibc fixes ..." \
190 - epatch
191 - elif [[ ${CTARGET} == *-uclibc* ]] ; then
192 - # starting with binutils-2.17.50.0.17, we no longer need
193 - # uClibc patchsets :D
194 - if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
195 - die "sorry, but this binutils doesn't yet support uClibc :("
196 - fi
197 - fi
198 - [[ ${#PATCHES[@]} -gt 0 ]] && epatch "${PATCHES[@]}"
199 - epatch_user
200 - fi
201 -
202 - # fix locale issues if possible #122216
203 - if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
204 - einfo "Fixing misc issues in configure files"
205 - for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
206 - ebegin " Updating ${f/${S}\/}"
207 - patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
208 - || eerror "Please file a bug about this"
209 - eend $?
210 - done
211 - fi
212 - # fix conflicts with newer glibc #272594
213 - if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
214 - sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c
215 - fi
216 -
217 - # Fix po Makefile generators
218 - sed -i \
219 - -e '/^datadir = /s:$(prefix)/@DATADIRNAME@:@datadir@:' \
220 - -e '/^gnulocaledir = /s:$(prefix)/share:$(datadir):' \
221 - */po/Make-in || die "sed po's failed"
222 -
223 - # Run misc portage update scripts
224 - gnuconfig_update
225 - elibtoolize --portage --no-uclibc
226 -}
227 -
228 -toolchain-binutils_src_unpack() {
229 - tc-binutils_unpack
230 - case ${EAPI:-0} in
231 - 0|1) toolchain-binutils_src_prepare ;;
232 - esac
233 -}
234 -
235 -toolchain-binutils_src_prepare() {
236 - tc-binutils_apply_patches
237 -}
238 -
239 -_eprefix_init() {
240 - has "${EAPI:-0}" 0 1 2 && ED=${D} EPREFIX= EROOT=${ROOT}
241 -}
242 -
243 -# Intended for ebuilds to override to set their own versioning information.
244 -toolchain-binutils_bugurl() {
245 - printf "http://bugs.gentoo.org/"
246 -}
247 -toolchain-binutils_pkgversion() {
248 - printf "Gentoo ${BVER}"
249 - [[ -n ${PATCHVER} ]] && printf " p${PATCHVER}"
250 -}
251 -
252 -toolchain-binutils_src_configure() {
253 - _eprefix_init
254 -
255 - # make sure we filter $LINGUAS so that only ones that
256 - # actually work make it through #42033
257 - strip-linguas -u */po
258 -
259 - # keep things sane
260 - strip-flags
261 -
262 - local x
263 - echo
264 - for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
265 - einfo "$(printf '%10s' ${x}:) ${!x}"
266 - done
267 - echo
268 -
269 - cd "${MY_BUILDDIR}"
270 - local myconf=()
271 -
272 - # enable gold if available (installed as ld.gold)
273 - if use cxx ; then
274 - if grep -q 'enable-gold=default' "${S}"/configure ; then
275 - myconf+=( --enable-gold )
276 - # old ways - remove when 2.21 is stable
277 - elif grep -q 'enable-gold=both/ld' "${S}"/configure ; then
278 - myconf+=( --enable-gold=both/ld )
279 - elif grep -q 'enable-gold=both/bfd' "${S}"/configure ; then
280 - myconf+=( --enable-gold=both/bfd )
281 - fi
282 - if grep -q -e '--enable-plugins' "${S}"/ld/configure ; then
283 - myconf+=( --enable-plugins )
284 - fi
285 - fi
286 -
287 - use nls \
288 - && myconf+=( --without-included-gettext ) \
289 - || myconf+=( --disable-nls )
290 -
291 - if in_iuse zlib ; then
292 - # older versions did not have an explicit configure flag
293 - export ac_cv_search_zlibVersion=$(usex zlib -lz no)
294 - myconf+=( $(use_with zlib) )
295 - fi
296 -
297 - # For bi-arch systems, enable a 64bit bfd. This matches
298 - # the bi-arch logic in toolchain.eclass. #446946
299 - # We used to do it for everyone, but it's slow on 32bit arches. #438522
300 - case $(tc-arch) in
301 - ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
302 - esac
303 -
304 - use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
305 - [[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
306 - is_cross && myconf+=( --with-sysroot="${EPREFIX}"/usr/${CTARGET} )
307 -
308 - # glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
309 - # on everyone in alpha (for now), we'll just enable it when possible
310 - has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
311 - has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
312 -
313 - myconf+=(
314 - --prefix="${EPREFIX}"/usr
315 - --host=${CHOST}
316 - --target=${CTARGET}
317 - --datadir="${EPREFIX}"${DATAPATH}
318 - --infodir="${EPREFIX}"${DATAPATH}/info
319 - --mandir="${EPREFIX}"${DATAPATH}/man
320 - --bindir="${EPREFIX}"${BINPATH}
321 - --libdir="${EPREFIX}"${LIBPATH}
322 - --libexecdir="${EPREFIX}"${LIBPATH}
323 - --includedir="${EPREFIX}"${INCPATH}
324 - --enable-obsolete
325 - --enable-shared
326 - --enable-threads
327 - # Newer versions (>=2.24) make this an explicit option. #497268
328 - --enable-install-libiberty
329 - --disable-werror
330 - --with-bugurl="$(toolchain-binutils_bugurl)"
331 - --with-pkgversion="$(toolchain-binutils_pkgversion)"
332 - $(use_enable static-libs static)
333 - ${EXTRA_ECONF}
334 - # Disable modules that are in a combined binutils/gdb tree. #490566
335 - --disable-{gdb,libdecnumber,readline,sim}
336 - # Strip out broken static link flags.
337 - # https://gcc.gnu.org/PR56750
338 - --without-stage1-ldflags
339 - )
340 - echo ./configure "${myconf[@]}"
341 - "${S}"/configure "${myconf[@]}" || die
342 -
343 - # Prevent makeinfo from running in releases. It may not always be
344 - # installed, and older binutils may fail with newer texinfo.
345 - # Besides, we never patch the doc files anyways, so regenerating
346 - # in the first place is useless. #193364
347 - # For older versions, it means we don't get any info pages at all.
348 - # Oh well, tough luck. #294617
349 - if [[ -e ${S}/gas/doc/as.info ]] || ! version_is_at_least 2.24 ; then
350 - sed -i \
351 - -e '/^MAKEINFO/s:=.*:= true:' \
352 - Makefile || die
353 - fi
354 -}
355 -
356 -toolchain-binutils_src_compile() {
357 - _eprefix_init
358 - case ${EAPI:-0} in
359 - 0|1) toolchain-binutils_src_configure ;;
360 - esac
361 -
362 - cd "${MY_BUILDDIR}"
363 - emake all || die "emake failed"
364 -
365 - # only build info pages if we user wants them, and if
366 - # we have makeinfo (may not exist when we bootstrap)
367 - if type -p makeinfo > /dev/null ; then
368 - emake info || die "make info failed"
369 - fi
370 - # we nuke the manpages when we're left with junk
371 - # (like when we bootstrap, no perl -> no manpages)
372 - find . -name '*.1' -a -size 0 -delete
373 -
374 - # elf2flt only works on some arches / targets
375 - if [[ -n ${ELF2FLT_VER} ]] && [[ ${CTARGET} == *linux* || ${CTARGET} == *-elf* ]] ; then
376 - cd "${WORKDIR}"/elf2flt-${ELF2FLT_VER}
377 -
378 - local x supported_arches=$(sed -n '/defined(TARGET_/{s:^.*TARGET_::;s:)::;p}' elf2flt.c | sort -u)
379 - for x in ${supported_arches} UNSUPPORTED ; do
380 - [[ ${CTARGET} == ${x}* ]] && break
381 - done
382 -
383 - if [[ ${x} != "UNSUPPORTED" ]] ; then
384 - append-flags -I"${S}"/include
385 - myconf+=(
386 - --with-bfd-include-dir=${MY_BUILDDIR}/bfd
387 - --with-libbfd=${MY_BUILDDIR}/bfd/libbfd.a
388 - --with-libiberty=${MY_BUILDDIR}/libiberty/libiberty.a
389 - --with-binutils-ldscript-dir="${EPREFIX}"${LIBPATH}/ldscripts
390 - )
391 - echo ./configure "${myconf[@]}"
392 - ./configure "${myconf[@]}" || die
393 - emake || die "make elf2flt failed"
394 - fi
395 - fi
396 -}
397 -
398 -toolchain-binutils_src_test() {
399 - cd "${MY_BUILDDIR}"
400 - emake -k check || die "check failed :("
401 -}
402 -
403 -toolchain-binutils_src_install() {
404 - _eprefix_init
405 - local x d
406 -
407 - cd "${MY_BUILDDIR}"
408 - emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install || die
409 - rm -rf "${ED}"/${LIBPATH}/bin
410 - use static-libs || find "${ED}" -name '*.la' -delete
411 -
412 - # Newer versions of binutils get fancy with ${LIBPATH} #171905
413 - cd "${ED}"/${LIBPATH}
414 - for d in ../* ; do
415 - [[ ${d} == ../${BVER} ]] && continue
416 - mv ${d}/* . || die
417 - rmdir ${d} || die
418 - done
419 -
420 - # Now we collect everything intp the proper SLOT-ed dirs
421 - # When something is built to cross-compile, it installs into
422 - # /usr/$CHOST/ by default ... we have to 'fix' that :)
423 - if is_cross ; then
424 - cd "${ED}"/${BINPATH}
425 - for x in * ; do
426 - mv ${x} ${x/${CTARGET}-}
427 - done
428 -
429 - if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
430 - mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
431 - mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
432 - rm -r "${ED}"/usr/${CHOST}/{include,lib}
433 - fi
434 - fi
435 - insinto ${INCPATH}
436 - local libiberty_headers=(
437 - # Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir.
438 - demangle.h
439 - dyn-string.h
440 - fibheap.h
441 - hashtab.h
442 - libiberty.h
443 - objalloc.h
444 - splay-tree.h
445 - )
446 - doins "${libiberty_headers[@]/#/${S}/include/}" || die
447 - if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
448 - mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
449 - rm -r "${ED}"/${LIBPATH}/lib
450 - fi
451 -
452 - # Insert elf2flt where appropriate
453 - if [[ -x ${WORKDIR}/elf2flt-${ELF2FLT_VER}/elf2flt ]] ; then
454 - cd "${WORKDIR}"/elf2flt-${ELF2FLT_VER}
455 - insinto ${LIBPATH}/ldscripts
456 - doins elf2flt.ld || die "doins elf2flt.ld failed"
457 - exeinto ${BINPATH}
458 - doexe elf2flt flthdr || die "doexe elf2flt flthdr failed"
459 - mv "${ED}"/${BINPATH}/{ld,ld.real} || die
460 - newexe ld-elf2flt ld || die "doexe ld-elf2flt failed"
461 - newdoc README README.elf2flt
462 - fi
463 -
464 - # Generate an env.d entry for this binutils
465 - insinto /etc/env.d/binutils
466 - cat <<-EOF > "${T}"/env.d
467 - TARGET="${CTARGET}"
468 - VER="${BVER}"
469 - LIBPATH="${EPREFIX}${LIBPATH}"
470 - EOF
471 - newins "${T}"/env.d ${CTARGET}-${BVER}
472 -
473 - # Handle documentation
474 - if ! is_cross ; then
475 - cd "${S}"
476 - dodoc README
477 - docinto bfd
478 - dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
479 - docinto binutils
480 - dodoc binutils/ChangeLog binutils/NEWS binutils/README
481 - docinto gas
482 - dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
483 - docinto gprof
484 - dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
485 - docinto ld
486 - dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
487 - docinto libiberty
488 - dodoc libiberty/ChangeLog* libiberty/README
489 - docinto opcodes
490 - dodoc opcodes/ChangeLog*
491 - fi
492 - # Remove shared info pages
493 - rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
494 - # Trim all empty dirs
495 - find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
496 -}
497 -
498 -toolchain-binutils_pkg_postinst() {
499 - _eprefix_init
500 - # Make sure this ${CTARGET} has a binutils version selected
501 - [[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
502 - binutils-config ${CTARGET}-${BVER}
503 -}
504 -
505 -toolchain-binutils_pkg_postrm() {
506 - _eprefix_init
507 - local current_profile=$(binutils-config -c ${CTARGET})
508 -
509 - # If no other versions exist, then uninstall for this
510 - # target ... otherwise, switch to the newest version
511 - # Note: only do this if this version is unmerged. We
512 - # rerun binutils-config if this is a remerge, as
513 - # we want the mtimes on the symlinks updated (if
514 - # it is the same as the current selected profile)
515 - if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${BVER} ]] ; then
516 - local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
517 - choice=${choice//$'\n'/ }
518 - choice=${choice/* }
519 - if [[ -z ${choice} ]] ; then
520 - env -i ROOT="${ROOT}" binutils-config -u ${CTARGET}
521 - else
522 - binutils-config ${choice}
523 - fi
524 - elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${BVER} ]] ; then
525 - binutils-config ${CTARGET}-${BVER}
526 - fi
527 -}
528
529 diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
530 index b9088ca..aeb17b9 100644
531 --- a/eclass/toolchain.eclass
532 +++ b/eclass/toolchain.eclass
533 @@ -8,7 +8,7 @@ DESCRIPTION="The GNU Compiler Collection"
534 HOMEPAGE="http://gcc.gnu.org/"
535 RESTRICT="strip" # cross-compilers need controlled stripping
536
537 -inherit eutils fixheadtails flag-o-matic gnuconfig libtool multilib pax-utils toolchain-funcs versionator
538 +inherit eutils fixheadtails flag-o-matic gnuconfig libtool multilib pax-utils toolchain-funcs versionator prefix
539
540 if [[ ${PV} == *_pre9999* ]] ; then
541 EGIT_REPO_URI="git://gcc.gnu.org/git/gcc.git"