From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 0FXTLm2NMGeUcwEA62LTzQ:P1 (envelope-from ) for ; Sun, 10 Nov 2024 10:39:41 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id 0FXTLm2NMGeUcwEA62LTzQ (envelope-from ) for ; Sun, 10 Nov 2024 11:39:41 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=uP9qkO8o; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b="DcX1d/5F"; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1731235181; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=U3393vj9SLGcR9xYmbaMJUzCKszCGGKYXMuqOdjZjJg=; b=XAzOBCudxGG+wiiiHwiibbhHOicr8knkvF7xRIJOEQZiXgOPu32LTwVnxzSoRoF0KjIEuX kUYPT5/G40aVo6VihoEsCPIAKmVm23Kz71iWHuZ7Sg8qF1cM8lBsWr37tEx+SOoLZuGEG6 aJYEcbnkYNiOTzs91fs1KAtYB2PH8TjSmi9UMrrqBTpE4bQq+++SZbqEZD3nwfF810ls3J 1AEuuwR7Gz6UcvS9g98/Dt9I2+m6R/qAa9TyG1vWksSZehNLNs+XOejNArP5xUt5uBvk9o bpOEK4bHMHwiwY68cVxIlRJhLfacd20Vvjpro3OmauTRqmLHuwkaeD5l7Rh+hw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=uP9qkO8o; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b="DcX1d/5F"; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1731235181; a=rsa-sha256; cv=none; b=lKAOaedX6rcTubtgmhJ8BsJ573GtUQobjK3ShVb0K17ae3HSKZWT3ubkfDLWL14oHK2RiI 0AnwQvFAvw3fR0vP/lyfBN7LK6gdNyJr6uBgGFqixkxDvH4YlFLRVxHVbqh+msA5MkAv9M c5NBBuil6C1cJa6nlW3Cc0oIZ/RhaeGyZPr5dW9TCrUDB4LAvuEWqh+lh5I2vyfdak2z/S C3+RNFebEimopr8t2YahUqb79JuG+8VhLP7C5RHqFNfAAw+MiOakk1fm+Z1FPpkaiPNpl5 Z7rteb82bB4k2G0kvBoFTbsf4v3uBN5ntcXHHOI6nMzGPSU7qszgZ+OTuUHvEA== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5ABE67BAFE for ; Sun, 10 Nov 2024 11:39:41 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tA5LY-0008V2-TW; Sun, 10 Nov 2024 05:39:08 -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 1tA5LW-0008UV-Qy for guix-patches@gnu.org; Sun, 10 Nov 2024 05:39:06 -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 1tA5LV-0007sU-OH; Sun, 10 Nov 2024 05:39:05 -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=U3393vj9SLGcR9xYmbaMJUzCKszCGGKYXMuqOdjZjJg=; b=uP9qkO8ovAszkNZ3+UF1sHftYDDLBUj8ujX+HCZ0jC4Bfx0q5j4XYWBn72KsLdO0GxGYzzqPR/cc1zDjeYIRf81PEoGSnveVCc5GLg2XaR7pOaJqNRgXfhJ/swo3BseMCINwIuZvTnH14KM4SQ6AcMrO0DxKk9EE1oNzlrkyw7Umbuh0d10ros9WN98YZKca4/wRTg0WKWoeOghajJjEdnsmgvLUB8I7xM3gT9boRCJ69A16x2BFYnfBnWLiDpF18X8bLjxtgE4TVas26TjzshHnn+C9VD4jEOQcautzByfPt8xtgBtmxDtUQ5kVU4bzbWcrySKC7oo7h8GL5lgouQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tA5LV-0002aL-6c; Sun, 10 Nov 2024 05:39:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74290] [PATCH 06/31] 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: Sun, 10 Nov 2024 10:39:05 +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?Court=C3=A8s?= Received: via spool by 74290-submit@debbugs.gnu.org id=B74290.17312351399844 (code B ref 74290); Sun, 10 Nov 2024 10:39:05 +0000 Received: (at 74290) by debbugs.gnu.org; 10 Nov 2024 10:38:59 +0000 Received: from localhost ([127.0.0.1]:55687 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tA5LO-0002Ye-7I for submit@debbugs.gnu.org; Sun, 10 Nov 2024 05:38:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54628) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tA5LI-0002X1-Mw for 74290@debbugs.gnu.org; Sun, 10 Nov 2024 05:38:53 -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 1tA5LD-0007nQ-H3; Sun, 10 Nov 2024 05:38:47 -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=U3393vj9SLGcR9xYmbaMJUzCKszCGGKYXMuqOdjZjJg=; b=DcX1d/5FWO8fEIL7UFmB zfPLeTWEQJhAu72lqzrDT2yJ5obvWfrJtLRW9lTu5mMNAtsZxmQZ3X7bBuORPGQtx2DCKW9NgtTia zGnwnITNWD79IivB9Ev1a71h7qE9eqtv93yXAYf3rwbcAmf5INEEXbebJoSs0fBiOyvTRrxqoCSp6 j9XbGKPsnNlhp+T9y45knjVBedLgYtpxVxowrxcjBifPSRZVHkikqFP7U90OVs3PGglf2O8NMRfmM CEBatdgqK1SzKoB7Ph4X7fpk0rEd7ohz5fWGiyGPXgupqgn8hKse5biiO97jlUAipa+Tmx/Sp+/Xc ard8pXU3fCkXJg==; From: Janneke Nieuwenhuizen Date: Sun, 10 Nov 2024 11:38:02 +0100 Message-ID: <5d540a65fb1897c844300061df1eb72ec630c4b8.1731232753.git.janneke@gnu.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: 0.88 X-Spam-Score: 0.88 X-Migadu-Queue-Id: 5ABE67BAFE X-TUID: ntlUoaLCHxoB * 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 | 18 ++++++++++++------ gnu/packages/cross-base.scm | 17 +++++++++++------ 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 4e8121ae2c..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") @@ -1088,11 +1088,17 @@ (define-public glibc " libmachuser.so libhurduser.so")))))) (add-after 'install 'create-machine-symlink (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (cpu "i386")) - (symlink cpu - (string-append out - "/include/mach/machine")))))) + (let* ((out (assoc-ref outputs "out")) + (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) + (symlink cpu machine)))))) '())))) (inputs `(("static-bash" ,static-bash))) diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index 7b32a6b64e..3827e87aec 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") @@ -747,11 +747,16 @@ (define* (cross-libc* target " libmachuser.so libhurduser.so")))))) (add-after 'install 'create-machine-symlink (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (cpu "i386")) - (symlink cpu - (string-append out - "/include/mach/machine")))))) + (let* ((out (assoc-ref outputs "out")) + (cpu ,(match target + ((? target-x86-32?) + "i386") + ((? target-x86-64?) + "x86_64"))) + (machine (string-append + out "/include/mach/machine"))) + (unless (file-exists? machine) + (symlink cpu machine)))))) '()))))) ;; Shadow the native "kernel-headers" because glibc's recipe expects the -- Janneke Nieuwenhuizen | GNU LilyPond https://LilyPond.org Freelance IT https://www.JoyOfSource.com | AvatarĀ® https://AvatarAcademy.com