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