1 |
commit: 5d8daa635220d6ac96f5891c8b46fd815f7c8082 |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jun 6 06:41:48 2022 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jun 6 06:41:48 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=5d8daa63 |
7 |
|
8 |
scripts/bootstrap-prefix: try and detect musl libc on Linux |
9 |
|
10 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
11 |
|
12 |
scripts/bootstrap-prefix.sh | 9 ++++++--- |
13 |
1 file changed, 6 insertions(+), 3 deletions(-) |
14 |
|
15 |
diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh |
16 |
index 3b5d911680..dc78743b93 100755 |
17 |
--- a/scripts/bootstrap-prefix.sh |
18 |
+++ b/scripts/bootstrap-prefix.sh |
19 |
@@ -3140,15 +3140,18 @@ if [[ -z ${CHOST} ]]; then |
20 |
if [[ x$(type -t uname) == "xfile" ]]; then |
21 |
case `uname -s` in |
22 |
Linux) |
23 |
+ plt="gnu" |
24 |
+ [[ -e /lib/ld-musl-*.so.1 ]] && plt="musl" |
25 |
+ sfx="unknown-linux-${plt}" |
26 |
case `uname -m` in |
27 |
ppc*) |
28 |
- CHOST="`uname -m | sed -e 's/^ppc/powerpc/'`-unknown-linux-gnu" |
29 |
+ CHOST="`uname -m | sed -e 's/^ppc/powerpc/'`-${sfx}" |
30 |
;; |
31 |
powerpc*|aarch64*) |
32 |
- CHOST="`uname -m`-unknown-linux-gnu" |
33 |
+ CHOST="`uname -m`-${sfx}" |
34 |
;; |
35 |
*) |
36 |
- CHOST="`uname -m`-pc-linux-gnu" |
37 |
+ CHOST="`uname -m`-${sfx/unknown/pc}" |
38 |
;; |
39 |
esac |
40 |
;; |