Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion src/bootstrap/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,12 @@ def default_build_triple(verbose):

kernel, cputype, processor = uname.decode(default_encoding).split(maxsplit=2)

# ON NetBSD, use `uname -p` to set the CPU type
if kernel == "NetBSD":
cputype = (
subprocess.check_output(["uname", "-p"]).strip().decode(default_encoding)
)

# The goal here is to come up with the same triple as LLVM would,
# at least for the subset of platforms we're willing to target.
kerneltype_mapper = {
Expand Down Expand Up @@ -433,10 +439,16 @@ def default_build_triple(verbose):
kernel = "linux-androideabi"
else:
kernel += "eabihf"
elif cputype in {"armv7l", "armv8l"}:
elif cputype in {"armv6hf", "earmv6hf"}:
cputype = "armv6"
if kernel == "unknown-netbsd":
kernel += "-eabihf"
elif cputype in {"armv7l", "earmv7hf", "armv8l"}:
cputype = "armv7"
if kernel == "linux-android":
kernel = "linux-androideabi"
elif kernel == "unknown-netbsd":
kernel += "-eabihf"
else:
kernel += "eabihf"
elif cputype == "mips":
Expand Down
Loading