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:403:4876::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by ms13.migadu.com with LMTPS
	id WKsFEGPfQmfXbwEAe85BDQ:P1
	(envelope-from <guix-patches-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Sun, 24 Nov 2024 08:10:11 +0000
Received: from aspmx1.migadu.com ([2001:41d0:403:4876::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by mp2.migadu.com with LMTPS
	id WKsFEGPfQmfXbwEAe85BDQ
	(envelope-from <guix-patches-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Sun, 24 Nov 2024 09:10:11 +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=XEOL9jTA;
	dkim=fail ("body hash did not verify") header.d=gnu.org header.s=fencepost-gnu-org header.b=KigKCP2E;
	dmarc=pass (policy=none) header.from=gnu.org;
	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"
ARC-Seal: i=1; s=key1; d=yhetil.org; t=1732435811; a=rsa-sha256; cv=none;
	b=I/WUncqDcl9cklkIJERCDnqldYoE8aj0KHYonnjJ2FXfn0diVRRFnGd5HCSznPclsMWG9Q
	PG7o87e+mHxmMRGixs+nfb44A6oWtDcw6aiWYUYl2CCLjhLKupsZlhRrnYrU9e6TEPd35L
	vrzpPbLjbxtlq2f+3MjyLR7mSkzgQ58LN8PBARkRG8oOlvZx6v21WvM7T/EhUo+isIsQqL
	XgSr6nR7QxmurN5Os1U3UIM4SeYEfiIy4VhxA4u5MJzNmHCTjckMd0dvGBhcRcA5QPv/Am
	PeJbbPO75hqeZj2B9xx5vP8o3j+Nh6+9iUkyoh8CF0NYYGmRw82ez1dr+l0c+Q==
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=XEOL9jTA;
	dkim=fail ("body hash did not verify") header.d=gnu.org header.s=fencepost-gnu-org header.b=KigKCP2E;
	dmarc=pass (policy=none) header.from=gnu.org;
	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"
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org;
	s=key1; t=1732435811;
	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=onBlxI+7eZ/AUbwwwPf2ueLBD/cnq0gyJkA2SuvSIzw=;
	b=dOL+IELflI8jfTU5sL5XmFdBSF7tZwFrLnjFo1694mulvYo7GmiRYs3HvoVI8soxOtVmIv
	gocTqHbdFPHqc2k4FpgiU4g5ejr5aeZ1veCHxkB+lb7w+uuRV0AxdPh7Dzsg/GcbIiObPQ
	BvOxYf/8gYhVnqUuKp9iM8zKDDHg9xEM6UiweiBgQqjdJqYxaWTLN3vlLy3+LPtJ47b+QX
	jcX77YUZEBO48nM0VHcYp74tCfFjv/Eu9EEVGR4ps+Rd9sxMD0nq2Yf2RXlTsrjsbC3ioH
	wq8huzPgMD6F8+Ih8Dctu2Vgj9/TLksYZfsv6Td/A3wvBpd8iSWp54EIapm0dA==
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 11DBD8BFF4
	for <larch@yhetil.org>; Sun, 24 Nov 2024 09:10:11 +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 1tF7WV-0002LL-5M; Sun, 24 Nov 2024 02: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 <Debian-debbugs@debbugs.gnu.org>)
 id 1tF7V3-0000Yu-Nf
 for guix-patches@gnu.org; Sun, 24 Nov 2024 02:57:47 -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 1tF7Uv-0002Sw-4h; Sun, 24 Nov 2024 02:57:42 -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=nIPQ9KKvElj9RO8ubX0wnllGEGxd+ijB69ou0YJogJw=; 
 b=XEOL9jTAii3TFaSmOqGYbV+MniWv4CHOJAfdyBfwNAhSmi7AdWbhKydZni3KEhIU0jOGknyyGKXCyH9j+QIhtAlRXeaONKtuSZ8tn3epinqif8xa5xLxovN5ozYdwUBSPZqrWjv4ulChk0jurcBrbyIoIdnEcB/BzF0BMBvuW0CIYxKFAdhgsU99vl+1jNcFmH8OpIo10DraOwPusTKnL3gSc3hAEZ6pCN4vO9EmtlqjOYxYt2suJfUMMduN7RgkJQLDpWQupwKSVhaJ154uq2Zs/r7Q6C1gBUFIt9eM3Uk7EJ+jRtIJyyEX/7bj7xsUjjqZ0b5z1IFLQscGB1AqWw==;
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1tF7Ur-0004ok-E3; Sun, 24 Nov 2024 02:57:33 -0500
X-Loop: help-debbugs@gnu.org
Subject: [bug#74290] [PATCH v4 52/58] 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: Sun, 24 Nov 2024 07:57:33 +0000
Resent-Message-ID: <handler.74290.B74290.173243504518367@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.173243504518367
 (code B ref 74290); Sun, 24 Nov 2024 07:57:33 +0000
Received: (at 74290) by debbugs.gnu.org; 24 Nov 2024 07:57:25 +0000
Received: from localhost ([127.0.0.1]:60897 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1tF7Uj-0004ly-6m
 for submit@debbugs.gnu.org; Sun, 24 Nov 2024 02:57:25 -0500
Received: from eggs.gnu.org ([209.51.188.92]:39142)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <janneke@gnu.org>) id 1tF7UF-0004dK-9K
 for 74290@debbugs.gnu.org; Sun, 24 Nov 2024 02:56:55 -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 1tF7UA-0002Ij-3D; Sun, 24 Nov 2024 02:56:50 -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=nIPQ9KKvElj9RO8ubX0wnllGEGxd+ijB69ou0YJogJw=; b=KigKCP2EUub+87YfejfD
 6+qYYpYx8+ob1zJ42BMNzWA9ZVRyqFxQ/hVp/8TKttRD8+FmA7HF07kedo/YfyCMTrWG6acHWcYKy
 QtTHIdNw9ZzTFP3NWeuKCk2L4MRdogNMwx5PqffdYIqrAjwbwsaXuQqd++YtG+0lq1g3XjbWJG3wU
 ZC86M8x86FATqnI2k8mjvEg9RLn1NmJGTsCaZYBKYaahGSvpbJ5zndz504/6Ji1zDfjDvREJsTE5W
 O64hBe/cupVqM841F0E7b3lI4kGOzi7PQq4xJW2emLriDu4iZ6U3sO40TsU4TXR6yZ+LkFw3mMhTe
 6o3IuSjSyiRPFg==;
From: Janneke Nieuwenhuizen <janneke@gnu.org>
Date: Sun, 24 Nov 2024 08:55:15 +0100
Message-ID: <55654c05fe45127e85fead81e90c0516c760d93a.1732434271.git.janneke@gnu.org>
X-Mailer: git-send-email 2.46.0
In-Reply-To: <cover.1732434270.git.janneke@gnu.org>
References: <cover.1732434270.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-Country: US
X-Migadu-Flow: FLOW_IN
X-Migadu-Spam-Score: -0.78
X-Spam-Score: -0.78
X-Migadu-Queue-Id: 11DBD8BFF4
X-Migadu-Scanner: mx10.migadu.com
X-TUID: 8lZduWrscEcs

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                | 19 +++++++++++++++++++
 3 files changed, 26 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 e437bf5826..6247919fec 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -858,7 +858,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..537d0490e0 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,22 @@ (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_64 system?  This is almost never the right
+function, use target-x86-64? or system-x86-64? instead."
+  (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