Hi goblinrs,

This looks good.  Thanks.

--
With Valediction,
Kamila Szewczyk (https://iczelia.net)

On 10/20/26 3:06 PM, [email protected] wrote:
Hi Kamila,

thanks for the review. Revised patch attached, now in git format-patch form. 
Addressing your points:

- The LIBC hunk is gone; agreed it was dead code.
- The UNAME_MACHINE normalization is gone too. The block is now just 
GUESS=$UNAME_MACHINE-unknown-linux-ohos.
- Added an entry to testsuite/config-guess.data.

On `-linux-`: this follows how LLVM upstream models the platform. In llvm's 
TargetParser/Triple.h [1], `ohos` parses as the environment component on top of 
the Linux OS (`aarch64-linux-ohos` -> OS=Linux, Environment=OpenHOS), and 
`Triple::OpenHOS` sits in the musl environment family (`isMusl()`). The toolchain 
released by the OpenHarmony official community reports the same target:

$ clang -v
clang version 15.0.4 ...
Target: aarch64-unknown-linux-ohos

The device is musl based (/lib/ld-musl-aarch64.so.1), and config.sub already 
takes `linux-ohos*` since the 2024 OpenHarmony patch, so keeping `-linux-` in 
config.guess just produces the triplets the on-device toolchains emit, which is 
what autotools builds on these machines end up consuming. The patch itself only 
touches the config.guess output for `uname -s = HarmonyOS`; config.sub and its 
validation are unchanged.

Verification: a full autotools build of GNU hello 2.12.1 completes on-device with this 
exact config.guess and the upstream config.sub -- configure reports `build system type: 
aarch64-unknown-linux-ohos`, and `make` and the resulting binary run fine. The same 
detection has also been through complete `configure && make` cycles for other 
packages on this platform (PHP 8.5.8, git 2.56.0) including their upstream test suites.

$ uname -s
HarmonyOS
$ uname -m
aarch64
$ uname -r
HongMeng Kernel 1.13.0
$ sh config.guess
aarch64-unknown-linux-ohos

[1] 
https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/TargetParser/Triple.h

Best regards,
goblinrs

Attachment: OpenPGP_0xC868F0B6DE38409D.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to