commit: 03f945855a7ee0664b79b276b0e74cea27865b51
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: Fri Jun 10 01:47:29 2016 +0000
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=03f94585
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 cb649dc..72f7195 100755
--- a/scripts/bootstrap-prefix.sh
+++ b/scripts/bootstrap-prefix.sh
@@ -1098,6 +1098,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