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