From patchwork Tue Nov 19 06:55:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janneke Nieuwenhuizen X-Patchwork-Id: 70548 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 8443827BBEA; Tue, 19 Nov 2024 07:01:33 +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=unavailable 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 11F2727BBE2 for ; Tue, 19 Nov 2024 07:01:33 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) 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 ) 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 ) 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 ) 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 Original-Sender: "Debbugs-submit" 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: 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 , Christopher Baines , Efraim Flashner , Ekaitz Zarraga , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Andreas Enge , Christopher Baines , Efraim Flashner , Ekaitz Zarraga , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice 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 ) 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 ) 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 ) 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 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: 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 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