From patchwork Mon May 22 09:04:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josselin Poiret X-Patchwork-Id: 50224 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 99D5E27BBE2; Mon, 22 May 2023 10:05:48 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 3856B27BBEB for ; Mon, 22 May 2023 10:05:45 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q11U7-0001sK-SE; Mon, 22 May 2023 05:05:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q11TT-0001aq-OU for guix-patches@gnu.org; Mon, 22 May 2023 05:05:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q11TT-000485-Cm for guix-patches@gnu.org; Mon, 22 May 2023 05:05:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q11TT-00077X-4O for guix-patches@gnu.org; Mon, 22 May 2023 05:05:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63641] [PATCH 3/8] gnu: gnumach-headers: Cross-build without relying on x86. Resent-From: Josselin Poiret Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 22 May 2023 09:05:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63641 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63641@debbugs.gnu.org Cc: Josselin Poiret Received: via spool by 63641-submit@debbugs.gnu.org id=B63641.168474626827231 (code B ref 63641); Mon, 22 May 2023 09:05:03 +0000 Received: (at 63641) by debbugs.gnu.org; 22 May 2023 09:04:28 +0000 Received: from localhost ([127.0.0.1]:33534 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q11St-000759-JV for submit@debbugs.gnu.org; Mon, 22 May 2023 05:04:27 -0400 Received: from jpoiret.xyz ([206.189.101.64]:39302) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q11So-00074n-DH for 63641@debbugs.gnu.org; Mon, 22 May 2023 05:04:22 -0400 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id 600E6185328; Mon, 22 May 2023 09:04:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1684746261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UqN3hY9UA0R53I8m6cJCaGO8jDOo2mBea+3Tbx4HL/8=; b=oubY/veU4GjB8pQ1n11lktPun4ULSV24JKTDsVEKNF/du9ccrzDLx6GtM7/RZBGZvZPJRN nrzxI3ckFwBAU9iSFr4tZTJeHGuhTsxjzq2GKW9OqYL9nQORaW/2nov0eV3Yso4JbYpirI U7/o1DacxTTYRwQmk3y83J9v3sQFTLes40WJbeWC4EITiCpvHfNDHJDpAhppeUvzhPi1XQ V2NLABiqLCVcgkB/k74GwXWFChpttJXk4F7WTHzTsX6jzq7t1QBeluIP/j3pTUgTmEADKE jojI/s7/comXjWTPuyMzTuXhewxExwmvu1Dk/hzUcO/Jv55g31MxdiGU2KaETA== Date: Mon, 22 May 2023 11:04:13 +0200 Message-Id: <9ce52afdf9e69355ba0011bbaba3bbeefab3fb11.1684745752.git.dev@jpoiret.xyz> In-Reply-To: References: MIME-Version: 1.0 X-Spamd-Bar: / Authentication-Results: jpoiret.xyz; auth=pass smtp.auth=jpoiret@jpoiret.xyz smtp.mailfrom=dev@jpoiret.xyz X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Josselin Poiret X-ACL-Warn: , Josselin Poiret via Guix-patches X-Patchwork-Original-From: Josselin Poiret via Guix-patches via From: Josselin Poiret Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: Josselin Poiret * 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 - ;; - '(#:configure-flags '("--build=i586-pc-gnu" - "--host=i686-linux-gnu"))) - #:tests? #f)) (native-inputs (list autoconf automake texinfo-4))