diff mbox series

[bug#63641,2/8] gnu: glibc/hurd-headers: Properly cross-build.

Message ID 871qj73u5c.fsf@gnu.org
State New
Headers show
Series None | expand

Commit Message

Janneke Nieuwenhuizen May 23, 2023, 4:11 p.m. UTC
Josselin Poiret via Guix-patches via writes:

Hi!

> From: Josselin Poiret <dev@jpoiret.xyz>
>
> * gnu/packages/base.scm (glibc/hurd-headers): Rely on cross-mig, and remove
> hardcoded configure flag `--host=i586-pc-gnu`.
> * gnu/packages/cross-base.scm (cross-kernel-headers*): Add `--host` and
> `--build` configure flags.

[..]

> ---
>  gnu/packages/base.scm       | 13 ++++++-------
>  gnu/packages/cross-base.scm |  6 +++++-
>  2 files changed, 11 insertions(+), 8 deletions(-)
>
> diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
> index d2f276c447..f944ab5d47 100644
> --- a/gnu/packages/base.scm
> +++ b/gnu/packages/base.scm
> @@ -1423,17 +1423,15 @@ (define-public glibc/hurd-headers
>      (native-inputs
>       (modify-inputs (package-native-inputs glibc)
>         (prepend (if (%current-target-system)
> -                    ;; XXX: When targeting i586-pc-gnu, we need a 32-bit MiG,
> -                    ;; hence this hack.
> -                    (package (inherit mig)
> -                             (arguments `(#:system "i686-linux")))
> -                    mig))))
> +                   (let* ((cross-base (resolve-interface '(gnu packages cross-base)))
> +                          (cross-mig (module-ref cross-base 'cross-mig)))
> +                     (cross-mig (%current-target-system)))
> +                   mig))))

I believe you can just do

--8<---------------cut here---------------start------------->8---
--8<---------------cut here---------------end--------------->8---

(Learnt that from "someone" https://issues.guix.gnu.org/63527#27 ;)

Otherwise, LGTM!

Greetings,
Janneke
diff mbox series

Patch

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 59c9632551..cdeb3f0a4e 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -53,6 +53,7 @@  (define-module (gnu packages base)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages cross-base)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages pcre)
@@ -1446,9 +1447,7 @@  (define-public glibc/hurd-headers
     (native-inputs
      (modify-inputs (package-native-inputs glibc/hurd)
        (prepend (if (%current-target-system)
-                   (let* ((cross-base (resolve-interface '(gnu packages cross-base)))
-                          (cross-mig (module-ref cross-base 'cross-mig)))
-                     (cross-mig (%current-target-system)))
+                    (cross-mig (%current-target-system))
                    mig))))
     (arguments
      (substitute-keyword-arguments (package-arguments glibc/hurd)