config.sub: Recognize OpenHarmony OS

Add support for [OpenHarmony] targets.
The `ohos` targets are available [in `LLVM`] and
documented in the [Rust target documentation].

Known targets in Rust:

- aarch64-unknown-linux-ohos
- armv7-unknown-linux-ohos
- x86_64-unknown-linux-ohos

Known targets in Clang:
- arm-linux-ohos
- aarch64-linux-ohos
- x86_64-linux-ohos

There are also some additional targets available in clang,
e.g. `liteos-ohos`, but I don't know much about those
targets, so I'm leaving `liteos-ohos` out of scope for this
patch.

[OpenHarmony]: https://gitee.com/openharmony/docs/
[in `LLVM`]: https://github.com/llvm/llvm-project/blob/main/clang/lib/Driver/ToolChains/OHOS.cpp
[Rust target documentation]: https://doc.rust-lang.org/rustc/platform-support/openharmony.html

* config.sub ($os == ohos*): Recognize.
* doc/config.sub.1: Regenerate.
* testsuite/config-sub.data (aarch64-linux-ohos): New entry.

Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
This commit is contained in:
Jonathan Schwender
2024-02-24 18:00:13 +01:00
committed by Dmitry V. Levin
parent b7333c432d
commit 5d8be4275f
3 changed files with 5 additions and 4 deletions

View File

@ -17,6 +17,7 @@ aarch64-elf aarch64-unknown-elf
aarch64-genode aarch64-unknown-genode
aarch64-linux aarch64-unknown-linux-gnu
aarch64-linux-mlibc aarch64-unknown-linux-mlibc
aarch64-linux-ohos aarch64-unknown-linux-ohos
aarch64-managarm aarch64-unknown-managarm-mlibc
aarch64-managarm-kernel aarch64-unknown-managarm-kernel
aarch64-managarm-mlibc aarch64-unknown-managarm-mlibc