diff options
author | Fabian Groffen <grobian@gentoo.org> | 2019-01-04 20:53:24 +0100 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2019-01-04 20:57:52 +0100 |
commit | 8aa4df8e784b96b336a82abc383bba7c60426cdf (patch) | |
tree | 15c1ea57628b2a7179c6ea0054f1ededadd0085b | |
parent | scripts/bootstrap-prefix: bootstrap with older GCC when using older GCC (diff) | |
download | prefix-8aa4df8e784b96b336a82abc383bba7c60426cdf.tar.gz prefix-8aa4df8e784b96b336a82abc383bba7c60426cdf.tar.bz2 prefix-8aa4df8e784b96b336a82abc383bba7c60426cdf.zip |
scripts/bootstrap-prefix: ensure temp libgcc_s remains available
On Solaris 64-bit, ensure libgcc_s remains available to stage2-built
objects, by copying and referencing a temp location. gcc-config will
remove the libgcc_s from usr/lib, so we need to ensure it's in a place
where it won't get wiped (after installing the compiler)
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
-rwxr-xr-x | scripts/bootstrap-prefix.sh | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh index 6703edcc33..ff5132ae7e 100755 --- a/scripts/bootstrap-prefix.sh +++ b/scripts/bootstrap-prefix.sh @@ -1536,8 +1536,16 @@ bootstrap_stage2() { # on Solaris 64-bits, (at least up to 10) libgcc_s resides in a # non-standard location, and the compiler doesn't seem to record # this in rpath while it does find it, resulting in a runtime trap - [[ ${CHOST} == x86_64-*-solaris* || ${CHOST} == sparcv9-*-solaris* ]] && \ - cp /usr/sfw/lib/64/libgcc_s.so.1 "${ROOT}"/tmp/usr/lib/ >& /dev/null + if [[ ${CHOST} == x86_64-*-solaris* || ${CHOST} == sparcv9-*-solaris* ]] ; + then + [[ -e ${ROOT}/tmp/usr/bin/gcc ]] || \ + cp /usr/sfw/lib/64/libgcc_s.so.1 "${ROOT}"/tmp/usr/lib/ >& /dev/null + # save another copy for after gcc-config gets run and removes + # usr/lib/libgcc_s.* because new links should use the compiler + # specific libgcc_s. + LDFLAGS="${LDFLAGS} -R${ROOT}/tmp/tmp" + cp /usr/sfw/lib/64/libgcc_s.so.1 "${ROOT}"/tmp/tmp/ >& /dev/null + fi # Disable RAP directory hacks of binutils and gcc. If libc.so # linker script provides no hint of ld-linux*.so*, ld should |