File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -312,6 +312,11 @@ def default_build_triple(verbose):
312
312
313
313
kernel , cputype , processor = uname .decode (default_encoding ).split (maxsplit = 2 )
314
314
315
+ # ON NetBSD, use `uname -p` to set the CPU type
316
+ if kernel == 'NetBSD' :
317
+ cputype = subprocess .check_output (
318
+ ['uname' , '-p' ]).strip ().decode (default_encoding )
319
+
315
320
# The goal here is to come up with the same triple as LLVM would,
316
321
# at least for the subset of platforms we're willing to target.
317
322
kerneltype_mapper = {
@@ -433,10 +438,16 @@ def default_build_triple(verbose):
433
438
kernel = "linux-androideabi"
434
439
else :
435
440
kernel += "eabihf"
436
- elif cputype in {"armv7l" , "armv8l" }:
441
+ elif cputype in {"armv6hf" , "earmv6hf" }:
442
+ cputype = "armv6"
443
+ if kernel == "unknown-netbsd" :
444
+ kernel += "-eabihf"
445
+ elif cputype in {"armv7l" , "earmv7hf" , "armv8l" }:
437
446
cputype = "armv7"
438
447
if kernel == "linux-android" :
439
448
kernel = "linux-androideabi"
449
+ elif kernel == "unknown-netbsd" :
450
+ kernel += "-eabihf"
440
451
else :
441
452
kernel += "eabihf"
442
453
elif cputype == "mips" :
You can’t perform that action at this time.
0 commit comments