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 4JpFMG2NMGduhAEAe85BDQ:P1 (envelope-from <guix-patches-bounces+larch=yhetil.org@gnu.org>) for <larch@yhetil.org>; Sun, 10 Nov 2024 10:39:42 +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 4JpFMG2NMGduhAEAe85BDQ (envelope-from <guix-patches-bounces+larch=yhetil.org@gnu.org>) for <larch@yhetil.org>; Sun, 10 Nov 2024 11:39:41 +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=Z+9hRozQ; dkim=fail ("body hash did not verify") header.d=gnu.org header.s=fencepost-gnu-org header.b=Dd5zI04S; 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=58AP932Yi2X3drTg7IW5zqTcHzufU9krrvCR0gOvUCA=; b=fF7RimTmQt3vagKP+el1kuQggyGVJM2Pv5fqycNKlDNQ5uOGoi3XJ8qobzTd1eEv0IlvKr HptdEumBNh87Oou2xdakfkHZHpXArBylvHMrBt2Nk8P4Ek4DPUUBt8+f9mmHKJaRsDo/yb nQBBPY1wwwFIfbVPDOGZlpzXeFdKI+emCPDxUVtFZNxqXXFUQRy/XWnZbw8H0/2ZmW/Gu8 XtsTmPkiGqxusyHqdQRwzAUXl1tM5xten9Ave4i0KDwW9oPK5k1pIqCwxur1WzBW7BnnYz Zn7NvWdnCTD1RskxazIwsTUZrzTR+/hXuE8wW3U7xvenj7j8FkhCHHlCJAEzhA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1731235181; a=rsa-sha256; cv=none; b=mM/WACq6fSdAAwaK64R2TbazbVXGDIrymLRuQJ5gDGGrgYeVnWKj4sc+XucItxDKxdL2Oz WhrY++Cb/N26S7oYAR3A6JE+KHtUHqx/tcu6f10I9vDzOLdC5B/Ari31kIeFUtpsq90YoN dl5U4fc2RmLcPZgBR6FSMOQLMHS6iOOi8QxyOEpG5xcK3CvXgU0wTffufORReHTgZvesKB PuFJHwQeJtHfHMmr29SVHHloL6NXfY+gURBClJU0v/Yi4p+zIj/beZhdoYLWk1Pseh5S1C 6y5lrtw03bLWEv1S2kKL1HyBIzU34SzS3CCYXm+qN3E6YdTU0aNL/eZZsbH+XQ== 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=Z+9hRozQ; dkim=fail ("body hash did not verify") header.d=gnu.org header.s=fencepost-gnu-org header.b=Dd5zI04S; 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 4B5EE48EA for <larch@yhetil.org>; 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 <guix-patches-bounces@gnu.org>) id 1tA5Li-0000Ca-If; Sun, 10 Nov 2024 05:39:18 -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 1tA5Lb-00009S-Ff for guix-patches@gnu.org; Sun, 10 Nov 2024 05:39:12 -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 1tA5La-0007u0-VX; Sun, 10 Nov 2024 05:39:11 -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=JSdEcX3sZCU76Ep2Xqc0XkFMC0VxBU5XH+XwIzFMQV8=; b=Z+9hRozQVm6H/KCEt+zohSRB5hC+1dxozDa7AYqT6hVioSJOwBKI0df+7NYGwQjaWO9a7LMk8NAVIPp6NmaBdc2PfHnuqHW6I2M3RpgmYt0E85haUnFwX5rhabQSQBKJZCuBzf4X4WLDvyulEEJqNz8M1M7rknCP8sgm4Pd/kKLemoxE/osJc0SJy5sI9VkRmDzfoihcLqxbI8CWtpctGvIfZ9ZV95CM1DssBjzfeG1icC9+niP0oSmYDuK0bv/0MfAP4islbl9YeEhznhVy0TUT337JvmbxXOvOEN3JYNzFS+fHG3raNFXxDOqtKLOrJg4gGkt6bbyI1Z8YMT2t4g==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1tA5LW-0002am-7L; Sun, 10 Nov 2024 05:39:06 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74290] [PATCH 05/31] gnu: Add basic support for x86_64-pc-gnu target, aka 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, 10 Nov 2024 10:39:06 +0000 Resent-Message-ID: <handler.74290.B74290.17312351409872@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.17312351409872 (code B ref 74290); Sun, 10 Nov 2024 10:39:06 +0000 Received: (at 74290) by debbugs.gnu.org; 10 Nov 2024 10:39:00 +0000 Received: from localhost ([127.0.0.1]:55689 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1tA5LO-0002Yi-PR for submit@debbugs.gnu.org; Sun, 10 Nov 2024 05:39:00 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54614) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <janneke@gnu.org>) id 1tA5LH-0002Wz-Kr for 74290@debbugs.gnu.org; Sun, 10 Nov 2024 05:38:54 -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 1tA5LC-0007mW-Es; Sun, 10 Nov 2024 05:38:46 -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=JSdEcX3sZCU76Ep2Xqc0XkFMC0VxBU5XH+XwIzFMQV8=; b=Dd5zI04S4ScisUo6mISQ tfsr7Vdz8G/BP9eR2mSo1i2gJrLHVfywVB242Ah7Q+35oz8bInvDS/VnBYuw15HfrSGf6872ejLXx TocMkAwH8A/kA7rcDBOfZQdr+zRDUUIdvd9RJszMzz/moiF7hMBFu1N0JdXaxz09B05By9s2d5PZu kcfnJ7OlQ+KlXZPF4IrXnM9DlrrD0AJibsjyEgk5rse9Ybo2Cn9Z15t2Rzb0Am1Um51Oaq8b5V3nD 0VXI3tQeFmBhWVnrNI1SGZTmCC5ZY8V/qv7DHPnwu2qHC5J6ylD60pGnCDwKeEnw8KvLKSA22zll3 1ybxgQRVvZYL5A==; From: Janneke Nieuwenhuizen <janneke@gnu.org> Date: Sun, 10 Nov 2024 11:38:01 +0100 Message-ID: <41db48275160489ce01568c14a301d2724e5f4f4.1731232753.git.janneke@gnu.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <cover.1731232753.git.janneke@gnu.org> References: <cover.1731232753.git.janneke@gnu.org> 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: <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: -0.64 X-Spam-Score: -0.64 X-Migadu-Queue-Id: 4B5EE48EA X-Migadu-Scanner: mx13.migadu.com X-TUID: R4QBZcTAhdxC * gnu/packages/bootstrap.scm (glibc-dynamic-linker): Update comment on where to find shared linker name. * guix/platforms/x86.scm (x86_64-gnu): New exported variable. * guix/utils.scm (target-hurd64? system-hurd64?): New procedures. * gnu/packages/gcc.scm: (current-gcc): Use target-hurd64? in new procedure to select gcc-14 on 64bit Hurd. (libstdc++): Change to procedure. (libstdc++-headers): Update accordingly. * gnu/packages/commencement.scm (current-gcc-toolchain): Likewise, to select gcc-toolchain-14 on 64bit Hurd. * gnu/packages/cross-base.scm (%xgcc): Use current-gcc. (cross-kernel-headers*): Use target-hurd? instead of custom "i586..." matching to also use xhurd-core-headers for target-hurd64. * gnu/packages/make-bootstrap.scm (package-with-relocatable-glibc): Capture (current-gcc) before resetting %current-target-system. [native-inputs]: Move final-inputs before cross-packages. (%glibc-stripped): Likewise. (%gcc-static): Change to procedure. (%gcc-stripped): Likewise, update accordingly. (%gcc-bootstrap-tarball): Likewise, update accordingly. * gnu/ci.scm (%core-packages): Update accordingly. * gnu/packages/patches/gcc-14-cross-without-bootstrap.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/cross-base.scm (cross-gcc)[origin]: Use it when cross-building gcc >= 14. Change-Id: I4ae189e7e5188ced91744b89fe9d753b6a1fca78 --- gnu/ci.scm | 4 ++-- gnu/packages/commencement.scm | 6 +++-- gnu/packages/cross-base.scm | 6 ++--- gnu/packages/gcc.scm | 32 +++++++++++++------------- gnu/packages/make-bootstrap.scm | 40 +++++++++++++++++++++------------ guix/platforms/x86.scm | 11 ++++++++- guix/utils.scm | 15 ++++++++++++- 7 files changed, 76 insertions(+), 38 deletions(-) diff --git a/gnu/ci.scm b/gnu/ci.scm index 4e282d197f..e7e839d968 100644 --- a/gnu/ci.scm +++ b/gnu/ci.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012-2024 Ludovic Courtès <ludo@gnu.org> -;;; Copyright © 2017, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> +;;; Copyright © 2017, 2020, 2024 Janneke Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org> ;;; Copyright © 2020 Julien Lepiller <julien@lepiller.eu> ;;; Copyright © 2020, 2021 Mathieu Othacehe <othacehe@gnu.org> @@ -146,7 +146,7 @@ (define %core-packages %bootstrap-binaries-tarball %binutils-bootstrap-tarball (%glibc-bootstrap-tarball) - %gcc-bootstrap-tarball + (%gcc-bootstrap-tarball) %guile-bootstrap-tarball %bootstrap-tarballs)) diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 2b43759dac..682deb89cf 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -3642,10 +3642,12 @@ (define-public gcc-toolchain-14 ;; The default GCC (define (current-gcc-toolchain) "The current default gcc-toolchain version." - gcc-toolchain-11) + (if (target-hurd64?) + gcc-toolchain-14 + gcc-toolchain-11)) (define-public gcc-toolchain - (deprecated-package "gcc-toolchain" gcc-toolchain-11)) + (deprecated-package "gcc-toolchain" (current-gcc-toolchain))) (define-public gcc-toolchain-aka-gcc ;; It's natural for users to try "guix install gcc". This package diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index 9c701efae8..7b32a6b64e 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -641,9 +641,9 @@ (define* (cross-kernel-headers* target ("hurd-headers" ,xhurd-headers) ("hurd-minimal" ,xhurd-minimal))))) - (match target - ((or "i586-pc-gnu" "i586-gnu") xhurd-core-headers) - (_ xlinux-headers))) + (if (target-hurd? target) + xhurd-core-headers + xlinux-headers)) (define* (cross-libc . args) (if (or (= (length args) 1) (contains-keyword? args)) diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 3b5d05b9a9..fc3746fb05 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -861,10 +861,12 @@ (define-public gcc-14 ;; the gcc-toolchain-* definitions. (define (current-gcc) "The current default gcc version." - gcc-11) + (if (target-hurd64?) + gcc-14 + gcc-11)) (define-public gcc - (deprecated-package "gcc" gcc-11)) + (deprecated-package "gcc" (current-gcc))) ;;; @@ -903,15 +905,15 @@ (define-public gcc-2.95 (outputs '("out")) (arguments (let ((matching-system - (match (%current-system) - ;; This package predates our 64-bit architectures. - ;; Force a 32-bit build targeting a similar architecture. - ("aarch64-linux" - "armhf-linux") - ("x86_64-linux" - "i686-linux") - (_ - (%current-system))))) + (match (%current-system) + ;; This package predates our 64-bit architectures. + ;; Force a 32-bit build targeting a similar architecture. + ("aarch64-linux" + "armhf-linux") + ("x86_64-linux" + "i686-linux") + (_ + (%current-system))))) (list #:system matching-system #:configure-flags #~'("--disable-werror") @@ -1050,8 +1052,8 @@ (define-public (make-libstdc++ gcc) (propagated-inputs '()) (synopsis "GNU C++ standard library"))) -(define libstdc++ - ;; Libstdc++ matching the default GCC. +(define (current-libstdc++) + ;; Libstdc++ matching the CURRENT-GCC. (make-libstdc++ (current-gcc))) (define libstdc++-headers @@ -1061,7 +1063,7 @@ (define libstdc++-headers ;; is right under include/c++ and not under ;; include/c++/x86_64-unknown-linux-gnu (aka. GPLUSPLUS_TOOL_INCLUDE_DIR). (package - (inherit libstdc++) + (inherit (current-libstdc++)) (name "libstdc++-headers") (outputs '("out")) (build-system trivial-build-system) @@ -1072,7 +1074,7 @@ (define libstdc++-headers (mkdir (string-append out "/include")) (symlink (string-append libstdc++ "/include") (string-append out "/include/c++"))))) - (inputs `(("libstdc++" ,libstdc++))) + (inputs `(("libstdc++" ,(current-libstdc++)))) (synopsis "Headers of GNU libstdc++"))) (define-public libstdc++-4.9 diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm index c6293b9a38..18281198ba 100644 --- a/gnu/packages/make-bootstrap.scm +++ b/gnu/packages/make-bootstrap.scm @@ -124,8 +124,11 @@ (define (package-with-relocatable-glibc p) (glibc-for-bootstrap ;; `cross-libc' already returns a cross libc, so clear ;; %CURRENT-TARGET-SYSTEM. - (parameterize ((%current-target-system #f)) - (cross-libc target)))) + (let ((xgcc (cross-gcc target #:xgcc (current-gcc)))) + (parameterize ((%current-target-system #f)) + (cross-libc target #:xgcc xgcc + #:xheaders (cross-kernel-headers + target #:xgcc xgcc)))))) ;; Standard inputs with the above libc and corresponding GCC. @@ -145,7 +148,10 @@ (define (package-with-relocatable-glibc p) target #:xbinutils (cross-binutils target) #:libc (cross-bootstrap-libc target)))) - `(("cross-gcc" ,(package + `(,@(%final-inputs) + ;; As versions for gcc and cross-gcc can differ, make sure to have + ;; cross-gcc behind gcc in CPLUS_INCLUDE_PATH. + ("cross-gcc" ,(package (inherit xgcc) (search-paths ;; Ensure the cross libc headers appears on the @@ -154,8 +160,7 @@ (define (package-with-relocatable-glibc p) (variable "CROSS_CPLUS_INCLUDE_PATH") (files '("include"))) (package-search-paths (current-gcc)))))) - ("cross-binutils" ,(cross-binutils target)) - ,@(%final-inputs))) + ("cross-binutils" ,(cross-binutils target)))) `(("libc" ,(glibc-for-bootstrap glibc)) ("libc:static" ,(glibc-for-bootstrap glibc) "static") ("gcc" ,(gcc-for-bootstrap glibc)) @@ -446,7 +451,8 @@ (define (%glibc-stripped) ;; GNU libc's essential shared libraries, dynamic linker, and headers, ;; with all references to store directories stripped. As a result, ;; libc.so is unusable and need to be patched for proper relocation. - (let ((glibc (glibc-for-bootstrap glibc))) + (let ((glibc (glibc-for-bootstrap glibc)) + (gcc (current-gcc))) (package (inherit glibc) (name "glibc-stripped") (build-system trivial-build-system) @@ -463,8 +469,13 @@ (define (%glibc-stripped) `(("libc" ,(let ((target (%current-target-system))) (if target (glibc-for-bootstrap - (parameterize ((%current-target-system #f)) - (cross-libc target))) + (let* ((xgcc (cross-gcc target #:xgcc gcc)) + (xheaders (cross-kernel-headers target + #:xgcc xgcc))) + (parameterize ((%current-target-system #f)) + (cross-libc target + #:xgcc xgcc + #:xheaders xheaders)))) glibc))))) (inputs `(("kernel-headers" @@ -478,11 +489,12 @@ (define (%glibc-stripped) ;; Only one output. (outputs '("out"))))) -(define %gcc-static +(define (%gcc-static) ;; A statically-linked GCC, with stripped-down functionality. (package-with-relocatable-glibc (package (inherit (current-gcc)) (name "gcc-static") + (source (package-source (current-gcc))) (outputs '("out")) ; all in one (arguments (substitute-keyword-arguments (package-arguments (current-gcc)) @@ -552,7 +564,7 @@ (define %gcc-static ,@(package-native-inputs (current-gcc))) (package-native-inputs (current-gcc))))))) -(define %gcc-stripped +(define (%gcc-stripped) ;; The subset of GCC files needed for bootstrap. (package (inherit (current-gcc)) @@ -575,7 +587,7 @@ (define %gcc-stripped (libdir (string-append out "/lib")) (includedir (string-append out "/include")) (libexecdir (string-append out "/libexec")) - (gcc #$%gcc-static)) + (gcc #$(%gcc-static))) (copy-recursively (string-append gcc "/bin") bindir) (for-each remove-store-references (find-files bindir ".*")) @@ -813,9 +825,9 @@ (define (%glibc-bootstrap-tarball) ;; A tarball with GNU libc's shared libraries, dynamic linker, and headers. (tarball-package (%glibc-stripped))) -(define %gcc-bootstrap-tarball +(define (%gcc-bootstrap-tarball) ;; A tarball with a dynamic-linked GCC and its headers. - (tarball-package %gcc-stripped)) + (tarball-package (%gcc-stripped))) (define %guile-bootstrap-tarball ;; A tarball with the statically-linked, relocatable Guile. @@ -856,7 +868,7 @@ (define %bootstrap-tarballs ((or "i686-linux" "x86_64-linux") (list %linux-libre-headers-bootstrap-tarball)) (_ - (list %gcc-bootstrap-tarball + (list (%gcc-bootstrap-tarball) %binutils-bootstrap-tarball (%glibc-bootstrap-tarball) %bootstrap-binaries-tarball))))) diff --git a/guix/platforms/x86.scm b/guix/platforms/x86.scm index 0c8fc7296c..5617e6dd68 100644 --- a/guix/platforms/x86.scm +++ b/guix/platforms/x86.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2022 Mathieu Othacehe <othacehe@gnu.org> ;;; Copyright © 2023, 2024 Efraim Flashner <efraim@flashner.co.il> +;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -25,7 +26,8 @@ (define-module (guix platforms x86) x86_64-linux-x32 i686-mingw x86_64-mingw - i586-gnu)) + i586-gnu + x86_64-gnu)) (define i686-linux (platform @@ -71,3 +73,10 @@ (define i586-gnu (system "i586-gnu") (rust-target "i686-unknown-hurd-gnu") (glibc-dynamic-linker "/lib/ld.so.1"))) + +(define x86_64-gnu + (platform + (target "x86_64-pc-gnu") + (system "x86_64-gnu") + (rust-target "x86_64-unknown-hurd-gnu") + (glibc-dynamic-linker "/lib/ld-x86-64.so.1"))) diff --git a/guix/utils.scm b/guix/utils.scm index f161cb4ef3..e100c03365 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -17,7 +17,7 @@ ;;; Copyright © 2022 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> ;;; Copyright © 2022 Antero Mejr <antero@mailbox.org> ;;; Copyright © 2023 Philip McGrath <philip@philipmcgrath.com> -;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@gnu.org> +;;; Copyright © 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2023 Zheng Junjie <873216071@qq.com> ;;; Copyright © 2023 Foundation Devices, Inc. <hello@foundationdevices.com> ;;; Copyright © 2024 Herman Rimm <herman@rimm.ee> @@ -94,6 +94,8 @@ (define-module (guix utils) target-linux? target-hurd? system-hurd? + target-hurd64? + system-hurd64? target-mingw? target-x86-32? target-x86-64? @@ -716,6 +718,17 @@ (define* (system-hurd?) "Is the current system the GNU(/Hurd) system?" (and=> (%current-system) target-hurd?)) +(define* (target-hurd64? #:optional (target (or (%current-target-system) + (%current-system)))) + "Does TARGET represent the 64bit GNU(/Hurd) system?" + (and (target-hurd?) + (target-64bit? target))) + +(define* (system-hurd64?) + "Is the current system the 64bit GNU(/Hurd) system?" + (and (system-hurd?) + (target-64bit? (%current-system)))) + (define* (target-mingw? #:optional (target (%current-target-system))) "Is the operating system of TARGET Windows?" (and target -- Janneke Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond https://LilyPond.org Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com