blob: 7827b0adc0e5b4cadb0a27d7cd3964cca2ead7c4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
GCC_FILESDIR="${PORTDIR}/sys-devel/gcc/files"
inherit multilib toolchain
KEYWORDS=""
SLOT="${GCC_BRANCH_VER}-vcs"
IUSE="nobootstrap offline"
RDEPEND=""
DEPEND="${RDEPEND}
>=${CATEGORY}/binutils-2.20"
if [[ ${CATEGORY} != cross-* ]] ; then
PDEPEND="${PDEPEND} elibc_glibc? ( >=sys-libs/glibc-2.12 )"
fi
src_unpack() {
# use the offline USE flag to prevent the ebuild from trying to update from
# the repo. the current sources will be used instead.
use offline && EVCS_OFFLINE="yes"
toolchain_src_unpack
echo "commit ${EGIT_VERSION}" > "${S}"/gcc/REVISION
}
src_prepare() {
toolchain_src_prepare
if ! use vanilla ; then
# drop-in patches
if [[ -e ${FILESDIR}/${GCC_RELEASE_VER} ]]; then
EPATCH_SOURCE="${FILESDIR}/${GCC_RELEASE_VER}" \
EPATCH_EXCLUDE="${FILESDIR}/${GCC_RELEASE_VER}/exclude" \
EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" epatch
fi
fi
# single-stage build for quick patch testing
if use nobootstrap; then
GCC_MAKE_TARGET="all"
EXTRA_ECONF+=" --disable-bootstrap"
fi
}
|