Hi,

On Tue, Mar 03, 2026 at 10:32:36PM +0800, goblinrs wrote:
> 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

config.guess normally uses stricter patterns.
Could you provide a rationale for this wide pattern?

> +       case $UNAME_MACHINE in
> +           aarch64|arm64)
> +               UNAME_MACHINE=aarch64
> +               ;;
> +           x86_64|amd64)
> +               UNAME_MACHINE=x86_64
> +               ;;
> +           armv7l|armv7)
> +               UNAME_MACHINE=armv7l
> +               ;;

config.guess normally doesn't translate these $UNAME_MACHINE's.
Could you provide a rationale for these translations?

> +           *)
> +               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
> +             ;;

Could you provide a rationale for this pattern?

On Tue, Mar 03, 2026 at 05:36:48PM +0100, Bruno Haible via Gnulib discussion 
list wrote:
> config.guess and config.sub are maintained in the GNU 'config' project
> https://savannah.gnu.org/projects/config/ . Gnulib only redistributes
> them. The right place to submit patches is therefore the config-patches
> mailing list https://lists.gnu.org/mailman/listinfo/config-patches .

Also, please note that changes to these files should be covered by tests.


-- 
ldv

Reply via email to