Rollup merge of #144092 - Gelbpunkt:musl-stage0, r=Kobzol
bootstrap: Detect musl hosts Currently, all non-Android Linux hosts are assumed to be using glibc. This obviously isn't very portable and will currently result in downloading a stage0 toolchain for glibc even on musl hosts. There are multiple ways to detect musl somewhat reliably, but the easiest option is to check for the python target, which is exposed in `sys.implementation._multiarch` and has values like "x86_64-linux-gnu" or "powerpc64le-linux-musl".
This commit is contained in:
commit
870d429e25
1 changed files with 6 additions and 1 deletions
|
|
@ -8,6 +8,7 @@ import re
|
|||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
import sysconfig
|
||||
import tarfile
|
||||
import tempfile
|
||||
|
||||
|
|
@ -333,7 +334,11 @@ def default_build_triple(verbose):
|
|||
if ostype == "Android":
|
||||
kernel = "linux-android"
|
||||
else:
|
||||
kernel = "unknown-linux-gnu"
|
||||
python_soabi = sysconfig.get_config_var("SOABI")
|
||||
if python_soabi is not None and "musl" in python_soabi:
|
||||
kernel = "unknown-linux-musl"
|
||||
else:
|
||||
kernel = "unknown-linux-gnu"
|
||||
elif kernel == "SunOS":
|
||||
kernel = "pc-solaris"
|
||||
# On Solaris, uname -m will return a machine classification instead
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue