1 |
commit: 8aa4df8e784b96b336a82abc383bba7c60426cdf |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jan 4 19:53:24 2019 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jan 4 19:57:52 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=8aa4df8e |
7 |
|
8 |
scripts/bootstrap-prefix: ensure temp libgcc_s remains available |
9 |
|
10 |
On Solaris 64-bit, ensure libgcc_s remains available to stage2-built |
11 |
objects, by copying and referencing a temp location. gcc-config will |
12 |
remove the libgcc_s from usr/lib, so we need to ensure it's in a place |
13 |
where it won't get wiped (after installing the compiler) |
14 |
|
15 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
16 |
|
17 |
scripts/bootstrap-prefix.sh | 12 ++++++++++-- |
18 |
1 file changed, 10 insertions(+), 2 deletions(-) |
19 |
|
20 |
diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh |
21 |
index 6703edcc33..ff5132ae7e 100755 |
22 |
--- a/scripts/bootstrap-prefix.sh |
23 |
+++ b/scripts/bootstrap-prefix.sh |
24 |
@@ -1536,8 +1536,16 @@ bootstrap_stage2() { |
25 |
# on Solaris 64-bits, (at least up to 10) libgcc_s resides in a |
26 |
# non-standard location, and the compiler doesn't seem to record |
27 |
# this in rpath while it does find it, resulting in a runtime trap |
28 |
- [[ ${CHOST} == x86_64-*-solaris* || ${CHOST} == sparcv9-*-solaris* ]] && \ |
29 |
- cp /usr/sfw/lib/64/libgcc_s.so.1 "${ROOT}"/tmp/usr/lib/ >& /dev/null |
30 |
+ if [[ ${CHOST} == x86_64-*-solaris* || ${CHOST} == sparcv9-*-solaris* ]] ; |
31 |
+ then |
32 |
+ [[ -e ${ROOT}/tmp/usr/bin/gcc ]] || \ |
33 |
+ cp /usr/sfw/lib/64/libgcc_s.so.1 "${ROOT}"/tmp/usr/lib/ >& /dev/null |
34 |
+ # save another copy for after gcc-config gets run and removes |
35 |
+ # usr/lib/libgcc_s.* because new links should use the compiler |
36 |
+ # specific libgcc_s. |
37 |
+ LDFLAGS="${LDFLAGS} -R${ROOT}/tmp/tmp" |
38 |
+ cp /usr/sfw/lib/64/libgcc_s.so.1 "${ROOT}"/tmp/tmp/ >& /dev/null |
39 |
+ fi |
40 |
|
41 |
# Disable RAP directory hacks of binutils and gcc. If libc.so |
42 |
# linker script provides no hint of ld-linux*.so*, ld should |