Subject: [bug#75051] [PATCH 07/14] gnu: readline: Fix cross-compiling to loongarch64.

From: Ludovic Courtès <[email-masked]>
Date: Fri, 24 Jan 2025 16:50:41 +0100

Zheng Junjie <[email-masked]> skribis:

> * gnu/packages/readline.scm (readline)[arguments]: When cross-compiling to
> loongarch64, Add update-config-scripts phase.
> [native-inputs]: When cross-compiling to loongarch64, Add config.
>
> Change-Id: Ie369d53c7f2493a7a65fe592a3671719dee264c0

[...]

> +     (append
> +      (if (and (target-loongarch64?)
> +               (%current-target-system))
> +          (list #:phases
> +                #~(modify-phases %standard-phases
> +                    (add-after 'unpack 'update-config-scripts
> +                      (lambda* (#:key inputs native-inputs #:allow-other-keys)
> +                        ;; Replace outdated config.guess and config.sub.

Since this would be useful even when building natively for loongarch64
(what it becomes possible), I’d write:

  (if (target-loongarch64?) …)

without (%current-target-system).

Same for the following patches.

Ludo’.