HarmonyOS (HongMeng Kernel) is a variant of OHOS, so normalize all
HarmonyOS/HongMeng related names to 'ohos' to reuse existing OHOS
support logic.
This patch:
1. In config.guess: Detect uname -s=HarmonyOS and output *-unknown-ohos
2. In config.sub: Map harmonyos/HarmonyOS/HongMeng to ohos
---
build-aux/config.guess | 17 +++++++++++++++++
build-aux/config.sub | 4 ++++
2 files changed, 21 insertions(+)
diff --git a/build-aux/config.guess b/build-aux/config.guess
index a9d01fde46..a1c07a2e70 100755
--- a/build-aux/config.guess
+++ b/build-aux/config.guess
@@ -1427,6 +1427,23 @@ EOF
*:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat)
GUESS=$UNAME_MACHINE-unknown-haiku
;;
+ *HarmonyOS*) # HarmonyOS (HongMeng Kernel) is a variant of
OHOS
+ case $UNAME_MACHINE in
+ aarch64|arm64)
+ UNAME_MACHINE=aarch64
+ ;;
+ x86_64|amd64)
+ UNAME_MACHINE=x86_64
+ ;;
+ armv7l|armv7)
+ UNAME_MACHINE=armv7l
+ ;;
+ *)
+ UNAME_MACHINE=$UNAME_MACHINE
+ ;;
+ esac
+ GUESS=${UNAME_MACHINE}-unknown-ohos
+ ;;
SX-4:SUPER-UX:*:*)
GUESS=sx4-nec-superux$UNAME_RELEASE
;;
diff --git a/build-aux/config.sub b/build-aux/config.sub
index 3d35cde174..093b5ee987 100755
--- a/build-aux/config.sub
+++ b/build-aux/config.sub
@@ -2157,6 +2157,10 @@ case $os in
| zephyr* \
| zvmoe* )
;;
+ # HarmonyOS (HongMeng Kernel) is a variant of OHOS
+ harmonyos* | HarmonyOS* | HongMeng*)
+ os=ohos
+ ;;
# This one is extra strict with allowed versions
sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
# Don't forget version if it is 3.2v4 or newer.
--
2.45.2