From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <guix-patches-bounces+larch=yhetil.org@gnu.org>
Received: from mp2.migadu.com ([2001:41d0:303:e16b::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by ms13.migadu.com with LMTPS
	id CH31Ec43PGfqdQAAe85BDQ:P1
	(envelope-from <guix-patches-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Tue, 19 Nov 2024 07:01:34 +0000
Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by mp2.migadu.com with LMTPS
	id CH31Ec43PGfqdQAAe85BDQ
	(envelope-from <guix-patches-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Tue, 19 Nov 2024 08:01:34 +0100
X-Envelope-To: larch@yhetil.org
Authentication-Results: aspmx1.migadu.com;
	dkim=fail ("body hash did not verify") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=KQfPjjzR;
	dkim=fail ("body hash did not verify") header.d=gnu.org header.s=fencepost-gnu-org header.b="psti/Yd5";
	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=1731999694;
	h=from:from:sender:sender:reply-to:subject:subject:date:date:
	 message-id:message-id:to:to:cc:cc:mime-version:mime-version:
	 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=vdwTUITDqdZzruesqeFxCBGFcIuGQGR9cSZSrmmtldo=;
	b=Bix5YKzrUUT8kwcA2VM5Ce/FvCz8xlJZiY/cobIOpCUk+n9Tv6DwPxn6HFlksLocW1O2E+
	14RJFcFoRjUHTnfurbh0+51lRBgM4DitKfAt37Ox5dAwb/LLCF5fn/dzj427o7eJROvKyB
	PCqovArG9wE/EyHA0i28V8NFdLjURJgEHZ3FExNfqCQD2JOdLCBJ8gcXT2S76qEqol47mg
	58SMxBUW0i640zu4XEtmyPe8CeI8Nsr2pb95Gz0GGmp4AS76TWFM3kRujv0c4HUdmEENX/
	cLSxPWJINCGWDjkCuxv0oXMoj05d/1NJrvcuNoBLdaxykvhuGpRsr+/sdC9OrQ==
ARC-Seal: i=1; s=key1; d=yhetil.org; t=1731999694; a=rsa-sha256; cv=none;
	b=LRuDsmG3Ll3bR+It7ZsN7huAKcIFirIyTXAodkOzkVJwEFTVjYzQ8mx2ZMHEL5ovCN4P29
	/S59MAKxuxlhXxR3IwheWc6qETkN12PuEREpJfarKfEEVQypajwP1GnX3eFcDrMW57dvd7
	p0UhnzLX8KuUegO2MmQRFv/HwLXKjqxu932uE3HVBolofI+56B1S+neUZzZminl1uy8eu7
	J7/owUE8RyfRiQlkMY1KX+HlQNxnfb6i52xkDh9iBTo8aig/sKLsosjJIRCuapRD0BOVfu
	2SvwpBBwZNkTacc9xC3UFlnnMfBKYQ3s7HacRiVqD+jOmcrOSa60oGgraqSEwg==
ARC-Authentication-Results: i=1;
	aspmx1.migadu.com;
	dkim=fail ("body hash did not verify") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=KQfPjjzR;
	dkim=fail ("body hash did not verify") header.d=gnu.org header.s=fencepost-gnu-org header.b="psti/Yd5";
	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
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 1F9DC7999C
	for <larch@yhetil.org>; Tue, 19 Nov 2024 08:01:34 +0100 (CET)
Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <guix-patches-bounces@gnu.org>)
	id 1tDIDp-00018h-E3; Tue, 19 Nov 2024 02:00:25 -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 <Debian-debbugs@debbugs.gnu.org>)
 id 1tDIDj-000114-AE
 for guix-patches@gnu.org; Tue, 19 Nov 2024 02:00:20 -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 <Debian-debbugs@debbugs.gnu.org>)
 id 1tDIDd-0004nT-Lz; Tue, 19 Nov 2024 02:00:16 -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=n2zeQ74bZT117koaVVOAAoirQd37l0W78U9EgvDYWH0=; 
 b=KQfPjjzRLeOnrIlSsTXWEnS42Ht/Rz9sA81+LGGWOv14/EQiZdyftuchNpmf9yOSohICQ72sD/cJDfFzoSMcYpJCnGPrds9B3e+gLAaAtV/OSeIpzkH9NsjdHfHdg6s1jQzSGlj3HGZtaJleeeXdbaioQ1Lud3ga2DiHw98uI4kz5Tu/TAF6i3CEZN9OqNm2NwnJc4LySOJQV03v+7TehJRHAz6f+UpvYM5etnYXCnnsfd4EsSJgUzxPzKh4c78/JKnRnN6rFX9E6WQbjvuEfHuCNlqePe0xsQsjpeSJoD8sSZCFUjynn+6HJv4fwQXtFBla8Ys6XvLaJk+JK/A0zw==;
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1tDIDa-0005Q4-Vq; Tue, 19 Nov 2024 02:00:11 -0500
X-Loop: help-debbugs@gnu.org
Subject: [bug#74290] [PATCH v3 51/51] gnu: Use gcc-14,
 gcc-toolchain-14 on the 64bit Hurd.
Resent-From: Janneke Nieuwenhuizen <janneke@gnu.org>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: andreas@enge.fr, guix@cbaines.net, efraim@flashner.co.il,
 ekaitz@elenq.tech, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org,
 zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org
Resent-Date: Tue, 19 Nov 2024 07:00:10 +0000
Resent-Message-ID: <handler.74290.B74290.173199959620652@debbugs.gnu.org>
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 <andreas@enge.fr>, Christopher Baines <guix@cbaines.net>,
 Efraim Flashner <efraim@flashner.co.il>, Ekaitz Zarraga <ekaitz@elenq.tech>,
 Josselin Poiret <dev@jpoiret.xyz>,
 Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@gnu.org>,
 Mathieu Othacehe <othacehe@gnu.org>, Simon Tournier <zimon.toutoune@gmail.com>,
 Tobias Geerinckx-Rice <me@tobias.gr>
X-Debbugs-Original-Xcc: Andreas Enge <andreas@enge.fr>,
 Christopher Baines <guix@cbaines.net>, Efraim Flashner <efraim@flashner.co.il>,
 Ekaitz Zarraga <ekaitz@elenq.tech>, Josselin Poiret <dev@jpoiret.xyz>,
 Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@gnu.org>,
 Mathieu Othacehe <othacehe@gnu.org>, Simon Tournier <zimon.toutoune@gmail.com>,
 Tobias Geerinckx-Rice <me@tobias.gr>
Received: via spool by 74290-submit@debbugs.gnu.org id=B74290.173199959620652
 (code B ref 74290); Tue, 19 Nov 2024 07:00:10 +0000
Received: (at 74290) by debbugs.gnu.org; 19 Nov 2024 06:59:56 +0000
Received: from localhost ([127.0.0.1]:40677 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1tDIDM-0005Mx-2g
 for submit@debbugs.gnu.org; Tue, 19 Nov 2024 01:59:56 -0500
Received: from eggs.gnu.org ([209.51.188.92]:43530)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <janneke@gnu.org>) id 1tDICW-0005Cw-Eq
 for 74290@debbugs.gnu.org; Tue, 19 Nov 2024 01:59:05 -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 <janneke@gnu.org>)
 id 1tDIAK-000489-JB; Tue, 19 Nov 2024 01:56:48 -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=n2zeQ74bZT117koaVVOAAoirQd37l0W78U9EgvDYWH0=; b=psti/Yd5zlzla4hhXRYJ
 6XPZjWDx0uK4GJhzA4p0n18AsTaFHo9gsehASwADRE+5kAw7FiHxQjTS0Ym2arWV9g/l6+s8Q+x+8
 pnHXl0E2x9RkuklgVawpGQFZXLYTGosDORd62B4OydofkG9xPJ+B9UVbnBYrvsGTW1AadGM3zM+FW
 YBGnXPS6jnzXnJSoeFcDjjM6xDgdtx/leKmrq1cYQ9iJ2qJXpd6k3a8ZPBLvGjMbksr1tBAyq1lBW
 Cd33YrBOJhg/UEPNxRGTuZq0AqFdxk5+utbtNLqQWKsCESKrk6IFUsah7tNpqYlPzcV3QVo/xv7AP
 Wa9g6Dft4VBWCw==;
From: Janneke Nieuwenhuizen <janneke@gnu.org>
Date: Tue, 19 Nov 2024 07:55:21 +0100
Message-ID: <97d520ff961ad1712437b48861d6cdee4519c809.1731999203.git.janneke@gnu.org>
X-Mailer: git-send-email 2.46.0
In-Reply-To: <cover.1731999202.git.janneke@gnu.org>
References: <cover.1731999202.git.janneke@gnu.org>
MIME-Version: 1.0
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: <guix-patches.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>,
 <mailto:guix-patches-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/guix-patches>
List-Post: <mailto:guix-patches@gnu.org>
List-Help: <mailto:guix-patches-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>,
 <mailto:guix-patches-request@gnu.org?subject=subscribe>
Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org
Sender: guix-patches-bounces+larch=yhetil.org@gnu.org
X-Migadu-Flow: FLOW_IN
X-Migadu-Country: US
X-Migadu-Spam-Score: -2.83
X-Spam-Score: -2.83
X-Migadu-Queue-Id: 1F9DC7999C
X-Migadu-Scanner: mx13.migadu.com
X-TUID: Vy2Vmms6Y9CV

This enables building packages in a 64bit childhurd.  It will not enable
offloading to a childhurd.

* guix/utils.scm (host-hurd?, host-x86-64, host-hurd64?): New procedures.
* gnu/packages/commencement.scm (gcc-toolchain): Use them to determine if the
host is a 64bit Hurd, and use gcc-toolchain-14.
* gnu/packages/gcc.scm (gcc): Likewise, to use gcc-14.

Change-Id: I55e43fdc61e3ea5fc13065fc7ca854b951c94930
---
 gnu/packages/commencement.scm |  4 +++-
 gnu/packages/gcc.scm          |  5 ++++-
 guix/utils.scm                | 20 ++++++++++++++++++++
 3 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index a14de3002f..3f11bb3384 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -3642,7 +3642,9 @@ (define-public gcc-toolchain-14
 
 ;; The default GCC
 (define-public gcc-toolchain
-  gcc-toolchain-11)
+  (if (host-hurd64?)
+      gcc-toolchain-14
+      gcc-toolchain-11))
 
 (define-public gcc-toolchain-aka-gcc
   ;; It's natural for users to try "guix install gcc".  This package
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 64ba37fd69..070a0965e6 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -857,7 +857,10 @@ (define-public gcc-14
 
 ;; Note: When changing the default gcc version, update
 ;;       the gcc-toolchain-* definitions.
-(define-public gcc gcc-11)
+(define-public gcc
+  (if (host-hurd64?)
+      gcc-14
+      gcc-11))
 
 
 ;;;
diff --git a/guix/utils.scm b/guix/utils.scm
index e100c03365..7a71919f73 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -96,6 +96,9 @@ (define-module (guix utils)
             system-hurd?
             target-hurd64?
             system-hurd64?
+            host-hurd?
+            host-hurd64?
+            host-x86-64?
             target-mingw?
             target-x86-32?
             target-x86-64?
@@ -729,6 +732,23 @@ (define* (system-hurd64?)
   (and (system-hurd?)
        (target-64bit? (%current-system))))
 
+(define (host-hurd?)
+  "Are we running on a Hurd system?  This is almost never the right function,
+use target-hurd? or system-hurd? instead."
+  (equal? (utsname:sysname (uname)) "GNU"))
+
+(define (host-x86-64?)
+  "Are we running on a x86_64bit system?  This is almost never the right
+function, use target-x86-64? or system-x86-64? instead."
+  (and (host-hurd?)
+       (equal? (utsname:machine (uname)) "x86_64")))
+
+(define (host-hurd64?)
+  "Are we running on a 64bit Hurd?  This is almost never the right
+function, use target-hurd64? or system-hurd64? instead."
+  (and (host-hurd?)
+       (host-x86-64?)))
+
 (define* (target-mingw? #:optional (target (%current-target-system)))
   "Is the operating system of TARGET Windows?"
   (and target
-- 
2.46.0