From patchwork Tue Nov 19 06:54:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janneke Nieuwenhuizen X-Patchwork-Id: 70549 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 A316427BBEC; Tue, 19 Nov 2024 07:01:35 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham 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 168EE27BBE2 for ; Tue, 19 Nov 2024 07:01:35 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tDICh-0008N3-2J; Tue, 19 Nov 2024 01:59:15 -0500 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 1tDICa-0008I6-4i for guix-patches@gnu.org; Tue, 19 Nov 2024 01:59:08 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tDICZ-0004I4-9i; Tue, 19 Nov 2024 01:59:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=c8onV7OhuF9SSTXP9WNCS6hOWvgt/CoTjai2PjzC0k0=; b=r5quX96H2OpgPp+kGBad5hAAKWK/47QeTveCrFuLBDLZ65iuW2NLvcO4EaFeu48sx8gU+UTXLfm/f7L76gGUPfe23n/y2gokCe5L/rFWhTDQsvTETbI9gyq6y04mi0gL70Crl6+YYiHAC7a3fe7mrhtXIj7EnHS3WNiheRxt2QOkpgVOD7wD1PcTroPp2KgxnUKivwMMbWYkwQAXqRIOpL1fXk/OQgiktG6JrQTyd/SGXEoKCEorR9x8htLg6O/rR2WeHlZIQvEXVyeUOjPL+G929z7aDEdvJS8rPPUF9cNS/k0tUpom4B35BTdGpLVFfl0lJFWH59CkJwqpBY7oiw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tDICZ-0005F5-4M; Tue, 19 Nov 2024 01:59:07 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74290] [PATCH v3 05/51] gnu: cross-libc: Support cross-building for the 64bit Hurd. Resent-From: Janneke Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: andreas@enge.fr, ludo@gnu.org, guix-patches@gnu.org Resent-Date: Tue, 19 Nov 2024 06:59:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74290 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74290@debbugs.gnu.org Cc: Andreas Enge , Ludovic =?utf-8?q?Court=C3=A8s?= X-Debbugs-Original-Xcc: Andreas Enge , Ludovic =?utf-8?q?Co?= =?utf-8?q?urt=C3=A8s?= Received: via spool by 74290-submit@debbugs.gnu.org id=B74290.173199949219621 (code B ref 74290); Tue, 19 Nov 2024 06:59:07 +0000 Received: (at 74290) by debbugs.gnu.org; 19 Nov 2024 06:58:12 +0000 Received: from localhost ([127.0.0.1]:40429 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tDIBf-00056C-Sf for submit@debbugs.gnu.org; Tue, 19 Nov 2024 01:58:12 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41396) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tDIBb-00054f-3l for 74290@debbugs.gnu.org; Tue, 19 Nov 2024 01:58:08 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tDI9Q-0003w1-HI; Tue, 19 Nov 2024 01:55:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=c8onV7OhuF9SSTXP9WNCS6hOWvgt/CoTjai2PjzC0k0=; b=japP3QyeLL/pbo0prETN 3aciOHhwtCvFNaxef9XNuLVVAVBh1XPoKUcBlI1FAgHElTxtZ3j+JQNy4xpIKj1iBZt9cIKs5e5oG +mpk99BEJUMu8rGCTBX3JJQoWoZSzhzFDRpi9MjByFMrCGq3cfS2YRp33NPYfU/HBQmL5yfI90ydb DIjlAgX4IQ8KGc/J7XGnRRjH1bCi15LqD81cTG98tDlZ7tC2SUEwZXbcAFlvG82YeCeFHDHpSYGpz 0HWw6/5j6mlSr/iwwd11bPJb5y/Pc7oOE7zlAJ3y07wTpWDB1odhHUZV2ZZOYmOhZx9P60OCZXFUC N36N9hGfKzuLaw==; From: Janneke Nieuwenhuizen Date: Tue, 19 Nov 2024 07:54:35 +0100 Message-ID: <39e939ffd890362b01626b242d583d34e9176a9f.1731999203.git.janneke@gnu.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 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: , 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 * gnu/packages/base.scm (glibc)[arguments]: When building for the Hurd, in phase "create-machine-symlink", do not assume CPU is i386, also cater for x86_64. * gnu/packages/cross-base.scm (cross-libc*)[arguments]: Likewise. Change-Id: Ib009b7bd301b543b8629382330cca9d963b7a812 --- gnu/packages/base.scm | 9 +++++++-- gnu/packages/bootstrap.scm | 2 +- gnu/packages/cross-base.scm | 8 ++++++-- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 90c25b54e1..02ef71f20d 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -1079,7 +1079,7 @@ (define-public glibc (string-append locale "/C.UTF-8"))))) ,@(if (target-hurd?) - '((add-after 'install 'augment-libc.so + `((add-after 'install 'augment-libc.so (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (substitute* (string-append out "/lib/libc.so") @@ -1089,7 +1089,12 @@ (define-public glibc (add-after 'install 'create-machine-symlink (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) - (cpu "i386") + (cpu ,(match (or (%current-target-system) + (%current-system)) + ((? target-x86-32?) + "i386") + ((? target-x86-64?) + "x86_64"))) (machine (string-append out "/include/mach/machine"))) (unless (file-exists? machine) diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm index 33cbaa30ae..27798fe278 100644 --- a/gnu/packages/bootstrap.scm +++ b/gnu/packages/bootstrap.scm @@ -311,7 +311,7 @@ (define* (glibc-dynamic-linker gnu-triplet->nix-system) (%current-system)))) "Return the name of Glibc's dynamic linker for SYSTEM." - ;; See the 'SYSDEP_KNOWN_INTERPRETER_NAMES' cpp macro in libc. + ;; See the appropriate 'shlib-versions' file in libc. (let ((platform (false-if-platform-not-found (lookup-platform-by-system system)))) (cond diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index 83672ab383..4961b3b4c0 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -738,7 +738,7 @@ (define* (cross-libc* target (delete 'install-utf8-c-locale) ,@(if (target-hurd? target) - '((add-after 'install 'augment-libc.so + `((add-after 'install 'augment-libc.so (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (substitute* (string-append out "/lib/libc.so") @@ -748,7 +748,11 @@ (define* (cross-libc* target (add-after 'install 'create-machine-symlink (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) - (cpu "i386") + (cpu ,(match target + ((? target-x86-32?) + "i386") + ((? target-x86-64?) + "x86_64"))) (machine (string-append out "/include/mach/machine"))) (unless (file-exists? machine)