From patchwork Mon May 22 09:04:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josselin Poiret X-Patchwork-Id: 50222 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 CFF4D27BBE9; Mon, 22 May 2023 10:05:45 +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 9F74727BBE2 for ; Mon, 22 May 2023 10:05:44 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q11Tm-0001eP-TU; Mon, 22 May 2023 05:05:29 -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-0001aE-7p for guix-patches@gnu.org; Mon, 22 May 2023 05:05:03 -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 1q11TS-00047S-RG for guix-patches@gnu.org; Mon, 22 May 2023 05:05:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q11TS-00077P-MY for guix-patches@gnu.org; Mon, 22 May 2023 05:05:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63641] [PATCH 2/8] gnu: glibc/hurd-headers: Properly cross-build. Resent-From: Josselin Poiret Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 22 May 2023 09:05:02 +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.168474626227214 (code B ref 63641); Mon, 22 May 2023 09:05:02 +0000 Received: (at 63641) by debbugs.gnu.org; 22 May 2023 09:04:22 +0000 Received: from localhost ([127.0.0.1]:33530 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q11So-00074m-5J for submit@debbugs.gnu.org; Mon, 22 May 2023 05:04:22 -0400 Received: from jpoiret.xyz ([206.189.101.64]:39234) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q11Sn-00074W-5z for 63641@debbugs.gnu.org; Mon, 22 May 2023 05:04:21 -0400 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id 7018B1853FC; Mon, 22 May 2023 09:04:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1684746260; 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=ISGCMo6d8OSC+hxZvwNU2qJPL5J+Bw+0BrhGPc6aQAA=; b=P/gzX2AHJkSYx0HG9YXCmRKvHwarIZFbEChKi+aAHPKYaTUtDlHw8tBOGIYW4Wh2N3TiPC STxXDZmWykN5HQZjM5gn1xd4gMIZLkGot/9vACou6L8m3ETJF7FRUukKL9yV2Gq5tuQyOL ybX6lbIDL5fjspCggZL1SAk/Xm+LV4K+k9rUPtxohYzmV9ktnTahOyTz3npiu2KGaqLrmO spNMs9lUmeeOdsJJXlmMsLsnOJs7Bh4DrBfW4L1wiJ3PWvxz/EYDzh7rZ7VcCmC7RQXtSZ /CtmwgMt4xAKs/0+ldlyw+owqGwPYKceoYaJckHquTYadBKB5t4wunJChf65/A== Date: Mon, 22 May 2023 11:04:12 +0200 Message-Id: <873b5a865c24b22b98332cc6f26e2ebef31ae68b.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/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)))) (arguments (substitute-keyword-arguments (package-arguments glibc) ;; We just pass the flags really needed to build the headers. ((#:configure-flags flags) `(list "--enable-add-ons" - "--host=i586-pc-gnu" ,@%glibc/hurd-configure-flags)) ((#:phases _) '(modify-phases %standard-phases @@ -1448,7 +1446,8 @@ (define-public glibc/hurd-headers (close-port (open-output-file (string-append out "/include/gnu/stubs.h")))))) - (delete 'build))))))) ; nothing to build + (delete 'build))))) ; nothing to build + (supported-systems %hurd-systems))) (define-public tzdata (package diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index 8d0b41180b..50e86083c3 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -492,7 +492,11 @@ (define* (cross-kernel-headers* target hurd "/include"))) (for-each (cut setenv <> cpath) ',%gcc-cross-include-paths) - #t))))))) + #t))))) + ((#:configure-flags flags) + `(cons* ,(string-append "--build=" (%current-system)) + ,(string-append "--host=" target) + ,flags)))) (propagated-inputs `(("gnumach-headers" ,xgnumach-headers) ("hurd-headers" ,xhurd-headers)))