@@ -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
@@ -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))
;;;
@@ -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