From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 636A2138283 for ; Fri, 27 May 2016 10:54:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F3CC61423F; Fri, 27 May 2016 10:54:01 +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 1BF7D22404E for ; Fri, 27 May 2016 10:54:01 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 2242E340D5B for ; Fri, 27 May 2016 10:53:58 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DA65916C5 for ; Fri, 27 May 2016 10:53:52 +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: <1464335109.2e5a7a84af53d3704290adfe5273f60ff5116180.heroxbd@gentoo> Subject: [gentoo-commits] repo/proj/prefix:script-rap 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: 2e5a7a84af53d3704290adfe5273f60ff5116180 X-VCS-Branch: script-rap Date: Fri, 27 May 2016 10:53:52 +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: ffb736e6-6518-4a19-b1ef-77177807a586 X-Archives-Hash: b43a022930dfa285c9845829fec4422d commit: 2e5a7a84af53d3704290adfe5273f60ff5116180 Author: Benda Xu gentoo org> AuthorDate: Thu May 26 09:41:35 2016 +0000 Commit: Benda XU gentoo org> CommitDate: Fri May 27 07:45:09 2016 +0000 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=2e5a7a84 bootstrap-prefix.sh: get_libdir for multilib support on RAP. scripts/bootstrap-prefix.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh index 9990e41..f3d13f8 100755 --- a/scripts/bootstrap-prefix.sh +++ b/scripts/bootstrap-prefix.sh @@ -9,6 +9,7 @@ eerror() { echo "!!! $*" 1>&2; } einfo() { echo "* $*"; } is-rap() { [[ ${BASH_SOURCE} = *rap.sh ]]; } rapx() { is-rap && echo $1 || echo $2; } +get_libdir() { portageq envvar LIBDIR_$(portageq envvar ABI); } # prefer gtar over tar [[ x$(type -t gtar) == "xfile" ]] \ @@ -124,7 +125,7 @@ configure_cflags() { export LDFLAGS="-L${ROOT}/tmp/usr/lib" ;; *) - export LDFLAGS="-L${ROOT}/tmp/usr/lib -Wl,-rpath=${ROOT}/tmp/usr/lib" + export LDFLAGS="-L${ROOT}/tmp/usr/$(get_libdir) -Wl,-rpath=${ROOT}/tmp/usr/$(get_libdir)" ;; esac @@ -407,7 +408,7 @@ EOF do_tree() { local x - for x in etc{,/portage} usr/{{,s}bin,lib} var/tmp var/lib/portage var/log/portage var/db; + for x in etc{,/portage} usr/{{,s}bin,$(rapx "" lib)} var/tmp var/lib/portage var/log/portage var/db; do [[ -d ${ROOT}/${x} ]] || mkdir -p "${ROOT}/${x}" done @@ -423,7 +424,7 @@ do_tree() { [[ -e ${ROOT}/${x} ]] || ( cd "${ROOT}" && ln -s usr/${x} ) done else - for x in lib sbin ; do + for x in $(rapx "" lib) sbin ; do [[ -d ${ROOT}/${x} ]] || mkdir -p "${ROOT}/${x}" done fi @@ -531,6 +532,7 @@ bootstrap_portage() { [[ -x ${ROOT}/tmp/bin/bash ]] || [[ ! -x ${ROOT}/tmp/usr/bin/bash ]] || ln -s ../usr/bin/bash "${ROOT}"/tmp/bin/bash || return 1 [[ -x ${ROOT}/tmp/bin/bash ]] || ln -s "${BASH}" "${ROOT}"/tmp/bin/bash || return 1 [[ -x ${ROOT}/tmp/bin/sh ]] || ln -s bash "${ROOT}"/tmp/bin/sh || return 1 + [[ -x ${ROOT}/bin/bash ]] || ln -s ../tmp/bin/bash "${ROOT}"/bin/bash || return 1 [[ -x ${ROOT}/bin/sh ]] || ln -s ../tmp/bin/sh "${ROOT}"/bin/sh || return 1 export PORTAGE_BASH="${ROOT}"/tmp/bin/bash @@ -1335,7 +1337,7 @@ bootstrap_stage3() { configure_toolchain || return 1 export CONFIG_SHELL="${ROOT}"/tmp/bin/bash export CPPFLAGS="-I${ROOT}/usr/include" - export LDFLAGS="-L${ROOT}/usr/lib" + export LDFLAGS="-L${ROOT}/usr/$(get_libdir)" unset CC CXX emerge_pkgs() {