commit: c79d9272b631eadd79b5e81b0f3aef887d30eb63
Author: Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 20 08:03:13 2017 +0000
Commit: Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Wed Dec 20 08:04:20 2017 +0000
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=c79d9272
bootstrap-prefix.sh: enable RAP on any linux-based installations.
This can be disabled by setting envvar PREFIX_DISABLE_RAP=yes.
scripts/bootstrap-prefix.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
index 1b15a7add2..5c7ec7bd45 100755
--- a/scripts/bootstrap-prefix.sh
+++ b/scripts/bootstrap-prefix.sh
@@ -7,8 +7,8 @@ trap 'exit 1' TERM KILL INT QUIT ABRT
# some basic output functions
eerror() { echo "!!! $*" 1>&2; }
einfo() { echo "* $*"; }
-# RAP (libc) mode is triggered if the script is renamed to bootstrap-rap.sh.
-is-rap() { [[ ${BASH_SOURCE} = *rap.sh ]]; }
+# RAP (libc) mode is triggered on Linux kernel and glibc.
+is-rap() { [[ ${PREFIX_DISABLE_RAP} != "yes" && ${CHOST} = *linux-gnu* ]]; }
rapx() { is-rap && echo $1 || echo $2; }
# prefer gtar over tar