From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 346211382F6 for ; Thu, 7 Jul 2016 02:41:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6C230E0AF0; Thu, 7 Jul 2016 02:41:29 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9F492E0AC9 for ; Thu, 7 Jul 2016 02:41:28 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9C83F340D45 for ; Thu, 7 Jul 2016 02:41:27 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8B563244C for ; Thu, 7 Jul 2016 02:41:24 +0000 (UTC) From: "Benda XU" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Benda XU" Message-ID: <1467859257.15ae1999d07446d243021983ee77d89f2335f141.heroxbd@gentoo> Subject: [gentoo-commits] repo/proj/prefix:master commit in: scripts/ X-VCS-Repository: repo/proj/prefix X-VCS-Files: scripts/bootstrap-prefix.sh X-VCS-Directories: scripts/ X-VCS-Committer: heroxbd X-VCS-Committer-Name: Benda XU X-VCS-Revision: 15ae1999d07446d243021983ee77d89f2335f141 X-VCS-Branch: master Date: Thu, 7 Jul 2016 02:41:24 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 36576030-2e61-4be5-9e26-68b94f186452 X-Archives-Hash: e4fe6f85ec8d3419671a80d61ca71402 commit: 15ae1999d07446d243021983ee77d89f2335f141 Author: Benda Xu gentoo org> AuthorDate: Sat May 28 06:59:33 2016 +0000 Commit: Benda XU gentoo 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