MoonchildProductions/UXP#2897: Allow mach configure to pass on loongarch64

This commit is contained in:
Basilisk-Dev 2026-01-07 14:22:05 -05:00 committed by ownedbywuigi
commit cfb4ac338e
3 changed files with 8 additions and 0 deletions

View file

@ -982,6 +982,9 @@ EOF
k1om:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
loongarch64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m32r*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;

View file

@ -378,6 +378,9 @@ def split_triplet(triplet):
elif cpu.startswith('aarch64'):
canonical_cpu = 'aarch64'
endianness = 'little'
elif cpu.startswith('loongarch64'):
canonical_cpu = 'loongarch64'
endianness = 'little'
else:
die('Unknown CPU type: %s' % cpu)

View file

@ -46,6 +46,7 @@ CPU_bitness = {
'arm': 32,
'hppa': 32,
'ia64': 64,
'loongarch64': 64,
'mips32': 32,
'mips64': 64,
'ppc': 32,
@ -77,6 +78,7 @@ CPU_preprocessor_checks = OrderedDict((
('arm', '__arm__ || _M_ARM'),
('aarch64', '__aarch64__'),
('ia64', '__ia64__'),
('loongarch64', '__loongarch64'),
('s390x', '__s390x__'),
('s390', '__s390__'),
('ppc64', '__powerpc64__ || __ppc64__'),