commit: 5d8daa635220d6ac96f5891c8b46fd815f7c8082
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 6 06:41:48 2022 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Mon Jun 6 06:41:48 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=5d8daa63
scripts/bootstrap-prefix: try and detect musl libc on Linux
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
scripts/bootstrap-prefix.sh | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
index 3b5d911680..dc78743b93 100755
--- a/scripts/bootstrap-prefix.sh
+++ b/scripts/bootstrap-prefix.sh
@@ -3140,15 +3140,18 @@ if [[ -z ${CHOST} ]]; then
if [[ x$(type -t uname) == "xfile" ]]; then
case `uname -s` in
Linux)
+ plt="gnu"
+ [[ -e /lib/ld-musl-*.so.1 ]] && plt="musl"
+ sfx="unknown-linux-${plt}"
case `uname -m` in
ppc*)
- CHOST="`uname -m | sed -e
's/^ppc/powerpc/'`-unknown-linux-gnu"
+ CHOST="`uname -m | sed -e
's/^ppc/powerpc/'`-${sfx}"
;;
powerpc*|aarch64*)
- CHOST="`uname
-m`-unknown-linux-gnu"
+ CHOST="`uname -m`-${sfx}"
;;
*)
- CHOST="`uname -m`-pc-linux-gnu"
+ CHOST="`uname
-m`-${sfx/unknown/pc}"
;;
esac
;;