commit:     af1392f6912caa84e8d47a1b5b4814dd95946f82
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Fri May 26 14:29:59 2023 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Fri May 26 14:30:37 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=af1392f6

scripts/auto-bootstraps/dobootstrap: detect musl

this doesn't make a bootstrap work on musl-based systems

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 scripts/auto-bootstraps/dobootstrap | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/scripts/auto-bootstraps/dobootstrap 
b/scripts/auto-bootstraps/dobootstrap
index b4042a66e0..b2495c4d7d 100755
--- a/scripts/auto-bootstraps/dobootstrap
+++ b/scripts/auto-bootstraps/dobootstrap
@@ -133,7 +133,7 @@ do_prepare() {
                echo $((endtime - starttime)) > elapsedtime
 
                # massage CHOST on Linux systems
-               if [[ ${chost} == *-linux-gnu* ]] ; then
+               if [[ ${chost} == *-linux-* ]] ; then
                        # two choices here: x86_64_ubuntu16-linux-gnu
                        #                   x86_64-pc-linux-ubuntu16
                        # I choose the latter because it is compatible with most
@@ -148,7 +148,10 @@ do_prepare() {
 
                                # Gentoo's versioning isn't really relevant, 
since it is
                                # a rolling distro
-                               [[ ${dist,,} == "gentoo" ]] && rel=
+                               if [[ ${dist,,} == "gentoo" ]] ; then
+                                       rel=
+                                       [[ ${chost##*-} == "musl" ]] && 
rel="musl"
+                               fi
                        fi
                        [[ -z ${dist} ]] && dist=linux
                        # leave rel unset/empty if we don't know about it

Reply via email to