Toggle diff (443 lines)
diff --git a/gnu/packages/avr.scm b/gnu/packages/avr.scm
index 6042c1bd55..00dc124aa9 100644
--- a/gnu/packages/avr.scm
+++ b/gnu/packages/avr.scm
@@ -5,6 +5,7 @@
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2020 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -53,7 +54,7 @@ (define make-avr-binutils
(inherit (cross-binutils "avr"))
(name "avr-binutils"))))
-(define* (make-avr-gcc/implementation #:key (xgcc gcc))
+(define* (make-avr-gcc/implementation #:key (xgcc (current-gcc)))
"Return a XGCC-base cross-compiler for the AVR target."
(let ((xgcc (cross-gcc "avr" #:xgcc xgcc #:xbinutils (make-avr-binutils))))
(package
@@ -96,7 +97,7 @@ (define* (make-avr-gcc/implementation #:key (xgcc gcc))
(variable "CROSS_LIBRARY_PATH")
(files '("avr/lib")))))
(native-inputs
- `(("gcc" ,gcc)
+ `(("gcc" ,(current-gcc))
,@(package-native-inputs xgcc))))))
(define make-avr-gcc
@@ -136,7 +137,7 @@ (define* (make-avr-libc/implementation #:key
(define make-avr-libc
(memoize make-avr-libc/implementation))
-(define* (make-avr-toolchain/implementation #:key (xgcc gcc))
+(define* (make-avr-toolchain/implementation #:key (xgcc (current-gcc)))
(let ((avr-binutils (make-avr-binutils))
(avr-libc (make-avr-libc #:xgcc (cross-gcc "avr" #:xgcc xgcc)))
(avr-gcc (make-avr-gcc #:xgcc xgcc)))
diff --git a/gnu/packages/benchmark.scm b/gnu/packages/benchmark.scm
index 326bbc99b4..c802e105ed 100644
--- a/gnu/packages/benchmark.scm
+++ b/gnu/packages/benchmark.scm
@@ -13,6 +13,7 @@
;;; Copyright © 2021 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2022 Tomasz Jeneralczyk <tj@schwi.pl>
;;; Copyright © 2024 Nicolas Graves <ngraves@ngraves.fr>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -75,8 +76,8 @@ (define-module (gnu packages benchmark)
;; Lazily resolve the gcc-toolchain to avoid a circular dependency.
(define gcc-toolchain*
- (delay (module-ref (resolve-interface '(gnu packages commencement))
- 'gcc-toolchain)))
+ (delay ((module-ref (resolve-interface '(gnu packages commencement))
+ 'current-gcc-toolchain))))
(define-public fio
(package
@@ -379,6 +380,7 @@ (define-public phoronix-test-suite
(list bash
coreutils
(force gcc-toolchain*)
+ gcc-toolchain*
gnu-make
gzip
php
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index fcc1088fd6..8ae9621e5b 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -1707,7 +1707,7 @@ (define u-boot-ts-mx6
(add-before 'build 'adjust-for-current-gcc
(lambda _
(let ((gcc-major-version #$(version-major
- (package-version gcc))))
+ (package-version (current-gcc)))))
(copy-file "include/linux/compiler-gcc6.h"
(string-append "include/linux/compiler-gcc"
gcc-major-version ".h")))
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index 3743abf9fe..c4640b62e1 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -2,7 +2,7 @@
;;; Copyright © 2012-2020, 2024 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015, 2018, 2019 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2017, 2020, 2024 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2018, 2020, 2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2018, 2020, 2022, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2019 Carl Dong <contact@carldong.me>
;;; Copyright © 2019 Léo Le Bouter <lle-bout@zaclys.net>
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
@@ -311,7 +311,7 @@ (define* (glibc-dynamic-linker
gnu-triplet->nix-system)
(%current-system))))
"Return the name of Glibc's dynamic linker for SYSTEM."
- ;; See the 'SYSDEP_KNOWN_INTERPRETER_NAMES' cpp macro in libc.
+ ;; See the appropriate 'shlib-versions' file in libc.
(let ((platform (false-if-platform-not-found
(lookup-platform-by-system system))))
(cond
diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
index 13fdb99424..f52a7c603e 100644
--- a/gnu/packages/c.scm
+++ b/gnu/packages/c.scm
@@ -6,7 +6,7 @@
;;; Copyright © 2019, 2020, 2022-2024 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2019, 2021 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2019 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2020, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2020, 2021 Marius Bakke <marius@gnu.org>
;;; Copyright © 2020 Katherine Cox-Buday <cox.katherine.e@gmail.com>
;;; Copyright © 2020, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
@@ -178,7 +178,7 @@ (define-public cproc
(string-append "--with-ld=" #$(ld-for-target))
(string-append "--with-gcc-libdir=" gcc-lib))))))))
(inputs `(("qbe" ,qbe)
- ("gcc:lib" ,gcc "lib")))
+ ("gcc:lib" ,(current-gcc) "lib")))
(supported-systems (list "x86_64-linux" "aarch64-linux"))
(synopsis "Simple C11 compiler backed by QBE")
(description "@code{cproc} is a C compiler using QBE as a backend,
diff --git a/gnu/packages/chicken.scm b/gnu/packages/chicken.scm
index 3743ae3e2a..64fd3cb86b 100644
--- a/gnu/packages/chicken.scm
+++ b/gnu/packages/chicken.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2020 Ekaitz Zarraga <ekaitz@elenq.tech>
;;; Copyright © 2020 Evan Hanson <evhan@foldling.org>
;;; Copyright © 2020 raingloom <raingloom@riseup.net>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -69,9 +70,9 @@ (define-public chicken
(files (list "var/lib/chicken/11")))))
;; Reference gcc-toolchain lazily to avoid circular module dependency
;; problems.
- (propagated-inputs (list (module-ref (resolve-interface
- '(gnu packages commencement))
- 'gcc-toolchain)))
+ (propagated-inputs (list ((module-ref (resolve-interface
+ '(gnu packages commencement))
+ 'current-gcc-toolchain))))
(home-page "https://www.call-cc.org/")
(synopsis "R5RS Scheme implementation that compiles native code via C")
(description
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index ce40f0cea6..2b43759dac 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -73,7 +73,8 @@ (define-module (gnu packages commencement)
#:use-module (guix utils)
#:use-module (srfi srfi-1)
#:use-module (ice-9 vlist)
- #:use-module (ice-9 match))
+ #:use-module (ice-9 match)
+ #:export (current-gcc-toolchain))
;;; Commentary:
;;;
@@ -908,7 +909,7 @@ (define gcc-core-mesboot0
;; with gcc-2.95.3, binutils (2.14.0, 2.20.1a) and glibc-2.2.5 we found a
;; GNU toolchain triplet "that works".
(package
- (inherit gcc)
+ (inherit (current-gcc))
(name "gcc-core-mesboot0")
(version "2.95.3")
(source (origin
@@ -2319,19 +2320,19 @@ (define libstdc++-boot0-gcc7
(define gcc-boot0
(package
- (inherit gcc)
+ (inherit (current-gcc))
(name "gcc-cross-boot0")
- (outputs (delete "debug" (package-outputs gcc)))
+ (outputs (delete "debug" (package-outputs (current-gcc))))
(source
(bootstrap-origin
(origin
- (inherit (package-source gcc))
+ (inherit (package-source (current-gcc)))
(snippet
#~(begin
;; XXX: The GCC test suite contains files with non-ASCII file
;; names, which cannot be repacked by BOOTSTRAP-ORIGIN. Nor
;; can it be deleted from Guile, so resort to this evil hack.
- #$(origin-snippet (package-source gcc))
+ #$(origin-snippet (package-source (current-gcc)))
(system* #$(file-append (let-system system
;; 'coreutils-boot0' is Linux-only.
(if (target-hurd? system)
@@ -2348,7 +2349,7 @@ (define gcc-boot0
(ice-9 regex)
(srfi srfi-1)
(srfi srfi-26))
- (substitute-keyword-arguments (package-arguments gcc)
+ (substitute-keyword-arguments (package-arguments (current-gcc))
((#:configure-flags flags)
#~(append (list #$(string-append "--target=" (boot-triplet))
@@ -2436,7 +2437,7 @@ (define gcc-boot0
(with-directory-excursion
(string-append out "/lib/gcc/"
#$(boot-triplet)
- "/" #$(package-version gcc))
+ "/" #$(package-version (current-gcc)))
(symlink "libgcc.a" "libgcc_eh.a"))))))))))
(inputs `(("gmp-source" ,(bootstrap-origin (package-source gmp-6.0)))
@@ -2951,7 +2952,7 @@ (define/system-dependent glibc-final-with-bootstrap-bash
(define (cross-gcc-wrapper gcc binutils glibc bash)
"Return a wrapper for the pseudo-cross toolchain GCC/BINUTILS/GLIBC
that makes it available under the native tool names."
- (package (inherit gcc)
+ (package (inherit (current-gcc))
(name (string-append (package-name gcc) "-wrapped"))
(source #f)
(build-system trivial-build-system)
@@ -3218,7 +3219,7 @@ (define gcc-final
(srfi srfi-26)
,@%default-gnu-modules)
- (substitute-keyword-arguments (package-arguments gcc)
+ (substitute-keyword-arguments (package-arguments (current-gcc))
((#:make-flags flags)
;; Since $LIBRARY_PATH is not honored, add the relevant flags.
#~(let ((zlib (assoc-ref %build-inputs "zlib")))
@@ -3541,8 +3542,8 @@ (define* (make-gcc-toolchain gcc
(let ((gcc (if libc (make-gcc-libc gcc libc) gcc))
(libc (if libc libc glibc-final)))
(package
- (name (string-append (package-name gcc) "-toolchain"))
- (version (package-version gcc))
+ (name (string-append (package-name (current-gcc)) "-toolchain"))
+ (version (package-version (current-gcc)))
(source #f)
(build-system trivial-build-system)
(arguments
@@ -3639,13 +3640,17 @@ (define-public gcc-toolchain-14
(make-gcc-toolchain gcc-14))
;; The default GCC
-(define-public gcc-toolchain
+(define (current-gcc-toolchain)
+ "The current default gcc-toolchain version."
gcc-toolchain-11)
+(define-public gcc-toolchain
+ (deprecated-package "gcc-toolchain" gcc-toolchain-11))
+
(define-public gcc-toolchain-aka-gcc
;; It's natural for users to try "guix install gcc". This package
;; automatically "redirects" them to 'gcc-toolchain'.
- (deprecated-package "gcc" gcc-toolchain))
+ (deprecated-package "gcc" (current-gcc-toolchain)))
(define-public gdc-toolchain-10
diff --git a/gnu/packages/containers.scm b/gnu/packages/containers.scm
index d32bc2704a..78304cebbc 100644
--- a/gnu/packages/containers.scm
+++ b/gnu/packages/containers.scm
@@ -8,6 +8,7 @@
;;; Copyright © 2024 Tomas Volf <~@wolfsden.cz>
;;; Copyright © 2024 Foundation Devices, Inc. <hello@foundation.xyz>
;;; Copyright © 2024 Jean-Pierre De Jesus DIAZ <jean@foundation.xyz>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -533,7 +534,7 @@ (define-public podman
(,(string-append #$catatonit "/bin")
,(string-append #$conmon "/bin")
,(string-append #$crun "/bin")
- ,(string-append #$gcc "/bin") ; cpp
+ ,(string-append #$(current-gcc) "/bin") ; cpp
,(string-append #$iptables "/sbin")
,(string-append #$passt "/bin")
,(string-append #$procps "/bin") ; ps
@@ -667,7 +668,7 @@ (define-public buildah
(,(string-append #$output "/_guix")))
`("PATH" suffix
(,(string-append #$crun "/bin")
- ,(string-append #$gcc "/bin") ; cpp
+ ,(string-append #$(current-gcc) "/bin") ; cpp
,(string-append #$passt "/bin")
"/run/privileged/bin")))))
(add-after 'install 'install-completions
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index cecc21083e..9c701efae8 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -1,7 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013-2018, 2020, 2023-2024 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2016, 2019, 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2016, 2019, 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2016 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
@@ -61,7 +61,7 @@ (define-syntax %xgcc
;;
;; Note: This is a macro so that we do not refer to 'gcc' from the top
;; level, which would lead to circular-dependency issues.
- (identifier-syntax gcc))
+ (identifier-syntax (current-gcc)))
(define %gcc-include-paths
;; Environment variables for header search paths.
diff --git a/gnu/packages/dlang.scm b/gnu/packages/dlang.scm
index 8bf0ee685e..654d5b2281 100644
--- a/gnu/packages/dlang.scm
+++ b/gnu/packages/dlang.scm
@@ -9,6 +9,7 @@
;;; Copyright © 2021, 2024 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2022 ( <paren@disroot.org>
;;; Copyright © 2022 Esther Flashner <esther@flashner.co.il>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -426,7 +427,7 @@ (define dmd-bootstrap
(build-system gnu-build-system)
(arguments
(list
- #:disallowed-references (list (gexp-input (canonical-package gcc)
+ #:disallowed-references (list (gexp-input (canonical-package (current-gcc))
"lib"))
;; Disable tests, as gdmd cannot cope with some arguments used such as
;; '-conf'.
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 6f449f0c39..07f3edd4dd 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -2336,8 +2336,8 @@ (define-public freehdl
coreutils
;; Lazily resolve the gcc-toolchain to avoid a circular dependency.
- (module-ref (resolve-interface '(gnu packages commencement))
- 'gcc-toolchain)
+ ((module-ref (resolve-interface '(gnu packages commencement))
+ 'current-gcc-toolchain))
guile-2.2
perl
diff --git a/gnu/packages/gawk.scm b/gnu/packages/gawk.scm
index 6a77a692f5..a8b8369d7b 100644
--- a/gnu/packages/gawk.scm
+++ b/gnu/packages/gawk.scm
@@ -4,6 +4,7 @@
;;; Copyright © 2018, 2022-2024 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2021, 2022 Marius Bakke <marius@gnu.org>
;;; Copyright © 2022 Paul A. Patience <paul@apatience.com>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -227,7 +228,7 @@ (define-public cppawk
(inputs
(list coreutils ; For dirname, mktemp, printf, rm
gawk-mpfr ; Default variant, but supports others
- gcc ; For cpp
+ (current-gcc) ; For cpp
sed))
(home-page "https://www.kylheku.com/cgit/cppawk/")
(synopsis "Wrapper script that adds C preprocessing to Awk")
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index c9e475b676..3b5d05b9a9 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -17,6 +17,7 @@
;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu>
;;; Copyright © 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2024 Nguyễn Gia Phong <mcsinyx@disroot.org>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -57,7 +58,8 @@ (define-module (gnu packages gcc)
#:use-module (guix utils)
#:use-module (srfi srfi-1)
#:use-module (ice-9 match)
- #:use-module (ice-9 regex))
+ #:use-module (ice-9 regex)
+ #:export (current-gcc))
(define %gcc-infrastructure
;; Base URL for GCC's infrastructure.
@@ -857,7 +859,12 @@ (define-public gcc-14
;; Note: When changing the default gcc version, update
;; the gcc-toolchain-* definitions.
-(define-public gcc gcc-11)
+(define (current-gcc)
+ "The current default gcc version."
+ gcc-11)
+
+(define-public gcc
+ (deprecated-package "gcc" gcc-11))
;;;
@@ -868,7 +875,7 @@ (define-public gcc-2.95
;; Note: 'gcc-core-mesboot0' in commencement.scm provides 2.95 as well, but
;; with additional tricks to support compilation with TinyCC and Mes-libc.
(package
- (inherit gcc)
+ (inherit (current-gcc))
(version "2.95.3")
(source (origin
(method url-fetch)
@@ -1045,7 +1052,7 @@ (define-public (make-libstdc++ gcc)
(define libstdc++
;; Libstdc++ matching the default GCC.
- (make-libstdc++ gcc))
+ (make-libstdc++ (current-gcc)))
(define libstdc++-headers
;; XXX: This package is for internal use to work around
@@ -1100,7 +1107,7 @@ (define (make-libiberty gcc)
(synopsis "Collection of subroutines used by various GNU programs")))
(define-public libiberty
- (make-libiberty gcc))
+ (make-libiberty (current-gcc)))
(define* (custom-gcc gcc name languages
#:optional
@@ -1157,7 +1164,7 @@ (define-public gfortran-13
(define-public gfortran
(hidden-package
-