1 |
commit: 15ae1999d07446d243021983ee77d89f2335f141 |
2 |
Author: Benda Xu <heroxbd <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat May 28 06:59:33 2016 +0000 |
4 |
Commit: Benda XU <heroxbd <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jul 7 02:40:57 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=15ae1999 |
7 |
|
8 |
scripts/b-p.sh: link /usr/{lib -> lib64} in stage1 |
9 |
|
10 |
on systems get_libdir != lib, |
11 |
python (looks into /usr/lib by default) need to find libffi |
12 |
(installs into /usr/lib64 by default). |
13 |
|
14 |
ugly enumerating all possible libdirs. |
15 |
|
16 |
scripts/bootstrap-prefix.sh | 17 +++++++++++++++++ |
17 |
1 file changed, 17 insertions(+) |
18 |
|
19 |
diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh |
20 |
index fd35927..45c2552 100755 |
21 |
--- a/scripts/bootstrap-prefix.sh |
22 |
+++ b/scripts/bootstrap-prefix.sh |
23 |
@@ -1103,6 +1103,23 @@ bootstrap_stage1() { ( |
24 |
chmod 755 "${ROOT}"/tmp/usr/bin/java{,c} |
25 |
;; |
26 |
esac |
27 |
+ # Host compiler can output a variety of libdirs. At stage1, |
28 |
+ # they should be the same as lib. Otherwise libffi may not be |
29 |
+ # found by python. |
30 |
+ if is-rap ; then |
31 |
+ [[ -d ${ROOT}/tmp/usr/lib ]] || mkdir -p "${ROOT}"/tmp/usr/lib |
32 |
+ local libdir |
33 |
+ for libdir in lib64 lib32 libx32; do |
34 |
+ if [[ ! -L ${ROOT}/tmp/usr/${libdir} ]] ; then |
35 |
+ if [[ -e "${ROOT}"/tmp/usr/${libdir} ]] ; then |
36 |
+ echo "${ROOT}"/tmp/usr/${libdir} should be a symlink to lib |
37 |
+ return 1 |
38 |
+ fi |
39 |
+ ln -s lib "${ROOT}"/tmp/usr/${libdir} |
40 |
+ fi |
41 |
+ done |
42 |
+ fi |
43 |
+ |
44 |
# important to have our own (non-flawed one) since Python (from |
45 |
# Portage) and binutils use it |
46 |
for zlib in ${ROOT}/tmp/usr/lib/libz.* ; do |