1 |
commit: 65eddd9e494e298bc65e63700b2b94cdf204a762 |
2 |
Author: Benda Xu <heroxbd <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon May 23 17:23:55 2016 +0000 |
4 |
Commit: Benda XU <heroxbd <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 26 13:55:41 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=65eddd9e |
7 |
|
8 |
scripts/bootstrap-prefix.sh: support sys-libs/glibc. |
9 |
|
10 |
do not need a linker in stage2 on RAP. |
11 |
|
12 |
scripts/bootstrap-prefix.sh | 12 ++++++++++-- |
13 |
1 file changed, 10 insertions(+), 2 deletions(-) |
14 |
|
15 |
diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh |
16 |
index 4b86519..88f24f3 100755 |
17 |
--- a/scripts/bootstrap-prefix.sh |
18 |
+++ b/scripts/bootstrap-prefix.sh |
19 |
@@ -148,7 +148,8 @@ configure_cflags() { |
20 |
configure_toolchain() { |
21 |
linker="sys-devel/binutils" |
22 |
local gcc_deps="dev-libs/gmp dev-libs/mpfr dev-libs/mpc" |
23 |
- compiler="${gcc_deps} sys-devel/gcc-config sys-devel/gcc" |
24 |
+ local gcc_rap_deps=$(rapx "sys-kernel/linux-headers sys-libs/glibc") |
25 |
+ compiler="${gcc_deps} ${gcc_rap_deps} sys-devel/gcc-config sys-devel/gcc" |
26 |
compiler_stage1="${gcc_deps} sys-devel/gcc-config" |
27 |
case ${CHOST} in |
28 |
*-cygwin*) |
29 |
@@ -1249,7 +1250,7 @@ bootstrap_stage2() { |
30 |
sys-devel/flex |
31 |
sys-devel/bison |
32 |
sys-devel/patch |
33 |
- sys-devel/binutils-config |
34 |
+ $(rapx "" sys-devel/binutils-config) |
35 |
$([[ ${CHOST} == *-aix* ]] && echo sys-apps/diffutils ) # gcc can't deal with aix diffutils, gcc PR14251 |
36 |
) |
37 |
|
38 |
@@ -1260,6 +1261,7 @@ bootstrap_stage2() { |
39 |
|
40 |
# Build a linker and compiler that live in ${ROOT}/tmp, but |
41 |
# produce binaries in ${ROOT}. |
42 |
+ is-rap || \ |
43 |
USE="${USE} -cxx" \ |
44 |
TPREFIX="${ROOT}" \ |
45 |
emerge_pkgs --nodeps ${linker} || return 1 |
46 |
@@ -1269,6 +1271,7 @@ bootstrap_stage2() { |
47 |
# package.use to disable in the temporary prefix. |
48 |
echo "dev-libs/gmp -cxx" >> "${ROOT}"/tmp/etc/portage/package.use |
49 |
|
50 |
+ BOOTSTRAP_RAP_STAGE2=yes \ |
51 |
EXTRA_ECONF="--disable-bootstrap" \ |
52 |
GCC_MAKE_TARGET=all \ |
53 |
TPREFIX="${ROOT}" \ |
54 |
@@ -1361,6 +1364,11 @@ bootstrap_stage3() { |
55 |
) |
56 |
emerge_pkgs --nodeps "${pkgs[@]}" || return 1 |
57 |
|
58 |
+ if is-rap && [[ ! -x "${ROOT}"/usr/bin/perl ]]; then |
59 |
+ echo "We need perl at ${ROOT}/usr/bin/perl to merge glibc." > "${ROOT}"/usr/bin/perl |
60 |
+ chmod +x "${ROOT}"/usr/bin/perl |
61 |
+ fi |
62 |
+ |
63 |
# On some hosts, gcc gets confused now when it uses the new linker, |
64 |
# see for instance bug #575480. While we would like to hide that |
65 |
# linker, we can't since we want the compiler to pick it up. |