unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Josselin Poiret via Guix-patches via <guix-patches@gnu.org>
To: 63641@debbugs.gnu.org
Cc: Josselin Poiret <dev@jpoiret.xyz>
Subject: [bug#63641] [PATCH 3/8] gnu: gnumach-headers: Cross-build without relying on x86.
Date: Mon, 22 May 2023 11:04:13 +0200	[thread overview]
Message-ID: <9ce52afdf9e69355ba0011bbaba3bbeefab3fb11.1684745752.git.dev@jpoiret.xyz> (raw)
In-Reply-To: <cover.1684745752.git.dev@jpoiret.xyz>

From: Josselin Poiret <dev@jpoiret.xyz>

* gnu/packages/hurd.scm (gnumach-headers): Remove configure flags where we
say the builder is running x86.
* gnu/packages/cross-base.scm (cross-gnumach-headers): Work around limitation
of build system, by manually changing the target host_cpu without relying on
--host, because we don't have a working cross-compiler yet.
---
 gnu/packages/cross-base.scm | 18 ++++++++++++++++++
 gnu/packages/hurd.scm       | 10 ----------
 2 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 50e86083c3..01c2295853 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -374,6 +374,24 @@ (define* (cross-gnumach-headers target
     (inherit gnumach-headers)
     (name (string-append (package-name gnumach-headers)
                          "-cross-" target))
+    (arguments
+     (substitute-keyword-arguments (package-arguments gnumach-headers)
+       ((#:phases phases #~%standard-phases)
+        #~(modify-phases #$phases
+            ;; Cheat by setting the host_cpu variable manually, since using
+            ;; --host= would require a working cross-compiler, which we don't
+            ;; have yet.
+            (add-after 'unpack 'substitute-host-cpu
+              (lambda _
+                (substitute* "configure.ac"
+                  (("AC_CANONICAL_HOST")
+                   #$(string-append
+                      "host_cpu="
+                      (match target
+                        ((? target-x86-32?)
+                         "i386")
+                        ((? target-x86-64?)
+                         "x86_64")))))))))))
     (native-inputs
      (modify-inputs (package-native-inputs gnumach-headers)
        (prepend xgcc xbinutils)))))
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index 34c7c00f2d..a6f0f76009 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -88,16 +88,6 @@ (define-public gnumach-headers
            (lambda _
              (invoke "make" "install-data")))
          (delete 'build))
-
-       ;; GNU Mach supports only IA32 currently, so cheat so that we can at
-       ;; least install its headers.
-       ,@(if (%current-target-system)
-             '()
-             ;; See <http://lists.gnu.org/archive/html/bug-hurd/2015-06/msg00042.html>
-             ;; <http://lists.gnu.org/archive/html/guix-devel/2015-06/msg00716.html>
-             '(#:configure-flags '("--build=i586-pc-gnu"
-                                   "--host=i686-linux-gnu")))
-
        #:tests? #f))
     (native-inputs
      (list autoconf automake texinfo-4))
-- 
2.40.1





  parent reply	other threads:[~2023-05-22  9:05 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-22  9:00 [bug#63641] [PATCH 0/8] Add libc specific to Hurd and update components Josselin Poiret via Guix-patches via
2023-05-22  9:04 ` [bug#63641] [PATCH 1/8] hurd-boot: Add urandom and default-pager translators Josselin Poiret via Guix-patches via
2023-05-23 21:28   ` Janneke Nieuwenhuizen
2023-05-28  8:26     ` Janneke Nieuwenhuizen
2023-05-22  9:04 ` [bug#63641] [PATCH 2/8] gnu: glibc/hurd-headers: Properly cross-build Josselin Poiret via Guix-patches via
2023-05-23 16:11   ` Janneke Nieuwenhuizen
2023-05-22  9:04 ` Josselin Poiret via Guix-patches via [this message]
2023-05-23 21:32   ` [bug#63641] [PATCH 3/8] gnu: gnumach-headers: Cross-build without relying on x86 Janneke Nieuwenhuizen
2023-05-22  9:04 ` [bug#63641] [PATCH 4/8] gnu: hurd: Update supported systems Josselin Poiret via Guix-patches via
2023-05-24  8:11   ` Janneke Nieuwenhuizen
2023-05-22  9:04 ` [bug#63641] [PATCH 5/8] gnu: Add libc-for-target and glibc/hurd Josselin Poiret via Guix-patches via
2023-05-22  9:37   ` Josselin Poiret via Guix-patches via
2023-05-22  9:42     ` [bug#63641] [PATCH v2 " Josselin Poiret via Guix-patches via
2023-05-24  8:11       ` Janneke Nieuwenhuizen
2023-05-24  8:57       ` [bug#63641] [PATCH 0/8] Add libc specific to Hurd and update components Ludovic Courtès
2023-06-02  5:18       ` [bug#63641] [PATCH v2 5/8] gnu: Add libc-for-target and glibc/hurd Janneke Nieuwenhuizen
2023-06-08  8:17         ` Janneke Nieuwenhuizen
2023-06-14  9:29           ` [bug#63641] [PATCH 0/8] Add libc specific to Hurd and update components Ludovic Courtès
2023-06-14 10:33             ` Janneke Nieuwenhuizen
2023-05-22  9:04 ` [bug#63641] [PATCH 6/8] gnu: gnumach: Update to 1.8+git20221224 Josselin Poiret via Guix-patches via
2023-05-24  8:12   ` Janneke Nieuwenhuizen
2023-05-22  9:04 ` [bug#63641] [PATCH 7/8] gnu: mig: Update to 04bfe7a91223ba15d868f7165e49328b1c6e86c3 Josselin Poiret via Guix-patches via
2023-05-23 12:17   ` Janneke Nieuwenhuizen
2023-05-22  9:04 ` [bug#63641] [PATCH 8/8] gnu: hurd: Update to v0.9.git20230216 Josselin Poiret via Guix-patches via
2023-05-24  8:48   ` [bug#63641] [PATCH 0/8] Add libc specific to Hurd and update components Ludovic Courtès
2023-05-23 12:17 ` Janneke Nieuwenhuizen
2023-05-24  9:02   ` Ludovic Courtès
2023-07-13 17:12 ` Josselin Poiret via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9ce52afdf9e69355ba0011bbaba3bbeefab3fb11.1684745752.git.dev@jpoiret.xyz \
    --to=guix-patches@gnu.org \
    --cc=63641@debbugs.gnu.org \
    --cc=dev@jpoiret.xyz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).