From: "Benda XU" <heroxbd@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/prefix:rap0 commit in: scripts/
Date: Fri, 10 Jun 2016 03:29:50 +0000 (UTC) [thread overview]
Message-ID: <1465523249.fbe97b8ff249b261bd09b0e90d209bb9cb23b106.heroxbd@gentoo> (raw)
commit: fbe97b8ff249b261bd09b0e90d209bb9cb23b106
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: Fri Jun 10 01:47:29 2016 +0000
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=fbe97b8f
scripts/bootstrap-prefix.sh: support sys-libs/glibc.
- do not need a linker in stage2 on RAP.
- binutils-config and ldconfig should be called explicitly
- lto of gcc should be disabled. ld points to the host dynamic
loader and gcc points to the RAP one, ld cannot load the gcc
lto plugin.
scripts/bootstrap-prefix.sh | 32 +++++++++++++++++++++++++++++---
1 file changed, 29 insertions(+), 3 deletions(-)
diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
index 239aec0..0d209b2 100755
--- a/scripts/bootstrap-prefix.sh
+++ b/scripts/bootstrap-prefix.sh
@@ -1271,7 +1271,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
)
@@ -1282,6 +1282,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
@@ -1291,6 +1292,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}" \
@@ -1385,6 +1387,24 @@ bootstrap_stage3() {
)
emerge_pkgs --nodeps "${pkgs[@]}" || return 1
+ if is-rap ; then
+ binutils-config 1 || return 1
+ # We need ${ROOT}/usr/bin/perl to merge glibc.
+ if [[ ! -x "${ROOT}"/usr/bin/perl ]]; then
+ # trick "perl -V:apiversion" check of glibc-2.19.
+ echo -e "#!${ROOT}/bin/sh\necho 'apiversion=9999'" > "${ROOT}"/usr/bin/perl
+ chmod +x "${ROOT}"/usr/bin/perl
+ fi
+ # Tell dynamic loader the path of libgcc_s.so of stage2
+ if [[ ! -f "${ROOT}"/etc/ld.so.conf.d/stage2.conf ]]; then
+ mkdir -p "${ROOT}"/etc/ld.so.conf.d
+ dirname $(gcc -print-libgcc-file-name) > "${ROOT}"/etc/ld.so.conf.d/stage2.conf
+ fi
+ BOOTSTRAP_RAP=yes \
+ emerge_pkgs --nodeps sys-kernel/linux-headers sys-libs/glibc \
+ && "${ROOT}"/usr/sbin/ldconfig || return 1
+ 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.
@@ -1398,11 +1418,17 @@ bootstrap_stage3() {
( cd "${ROOT}"/usr/bin && test ! -e python && ln -s "${ROOT}"/tmp/usr/bin/python2.7 )
# in addition, avoid collisions
rm -Rf "${ROOT}"/tmp/usr/lib/python2.7/site-packages/clang
+
+ RAP_DLINKER=$(echo "${ROOT}"/$(get_libdir)/ld*.so.[0-9])
# try to get ourself out of the mudd, bug #575324
- EXTRA_ECONF="--disable-compiler-version-checks" \
+ EXTRA_ECONF="--disable-compiler-version-checks $(rapx --disable-lto)" \
+ LDFLAGS="${LDFLAGS} $(rapx -Wl,--dynamic-linker=${RAP_DLINKER})" \
emerge_pkgs --nodeps ${compiler} || return 1
- ( cd "${ROOT}"/usr/bin && test ! -e python && rm -f python2.7 )
+ # undo libgcc_s.so path of stage2
+ rm -f "${ROOT}"/etc/ld.so.conf.d/stage2.conf
+ "${ROOT}"/usr/sbin/ldconfig || return 1
+ ( cd "${ROOT}"/usr/bin && test ! -e python && rm -f python2.7 )
# Use $ROOT tools where possible from now on.
rm -f "${ROOT}"/bin/sh
ln -s bash "${ROOT}"/bin/sh
next reply other threads:[~2016-06-10 3:30 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-10 3:29 Benda XU [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-07-02 1:33 [gentoo-commits] repo/proj/prefix:rap0 commit in: scripts/ Benda XU
2016-06-15 11:32 Benda XU
2016-06-15 11:32 Benda XU
2016-06-15 11:32 Benda XU
2016-06-15 11:32 Benda XU
2016-06-15 11:32 Benda XU
2016-06-15 11:32 Benda XU
2016-06-15 11:32 Benda XU
2016-06-15 11:32 Benda XU
2016-06-15 11:32 Benda XU
2016-06-15 11:32 Benda XU
2016-06-15 11:32 Benda XU
2016-06-15 11:32 Benda XU
2016-06-15 11:32 Benda XU
2016-06-15 10:12 [gentoo-commits] repo/proj/prefix:master " Benda XU
2016-06-15 11:32 ` [gentoo-commits] repo/proj/prefix:rap0 " Benda XU
2016-06-15 8:04 Benda XU
2016-06-15 8:04 Benda XU
2016-06-15 8:04 Benda XU
2016-06-15 8:04 Benda XU
2016-06-15 8:04 Benda XU
2016-06-15 8:04 Benda XU
2016-06-15 8:04 Benda XU
2016-06-15 8:04 Benda XU
2016-06-15 8:04 Benda XU
2016-06-15 8:04 Benda XU
2016-06-15 8:04 Benda XU
2016-06-15 8:04 Benda XU
2016-06-15 8:04 Benda XU
2016-06-15 8:04 Benda XU
2016-06-15 8:04 Benda XU
2016-06-15 8:04 Benda XU
2016-06-15 8:04 Benda XU
2016-06-15 7:58 [gentoo-commits] repo/proj/prefix:master " Benda XU
2016-06-15 8:04 ` [gentoo-commits] repo/proj/prefix:rap0 " Benda XU
2016-06-15 0:35 Benda XU
2016-06-15 0:35 Benda XU
2016-06-10 3:29 Benda XU
2016-06-10 3:29 Benda XU
2016-06-10 3:29 Benda XU
2016-06-10 3:29 Benda XU
2016-06-10 3:29 Benda XU
2016-06-10 3:29 Benda XU
2016-06-10 3:29 Benda XU
2016-06-10 3:29 Benda XU
2016-06-10 3:29 Benda XU
2016-06-10 3:29 Benda XU
2016-06-10 3:29 Benda XU
2016-06-10 3:29 Benda XU
2016-06-10 3:29 Benda XU
2016-06-10 3:29 Benda XU
2016-06-10 3:29 Benda XU
2016-06-10 3:29 Benda XU
2016-06-10 3:29 Benda XU
2016-06-10 3:29 Benda XU
2016-06-10 3:29 Benda XU
2016-06-10 3:29 Benda XU
2016-06-08 1:10 Benda XU
2016-06-08 1:10 Benda XU
2016-06-08 1:10 Benda XU
2016-06-08 1:10 Benda XU
2016-06-08 1:10 Benda XU
2016-06-04 7:29 Benda XU
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1465523249.fbe97b8ff249b261bd09b0e90d209bb9cb23b106.heroxbd@gentoo \
--to=heroxbd@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox