diff options
author | Janneke Nieuwenhuizen <janneke@gnu.org> | 2025-05-14 08:04:16 +0200 |
---|---|---|
committer | Janneke Nieuwenhuizen <janneke@gnu.org> | 2025-05-23 09:34:17 +0200 |
commit | 99ba2814d13331231f2b79603c91987d5976de3e (patch) | |
tree | 866dc08463caba079f0ee48b21e4456b98a2e875 /gnu/packages/cross-base.scm | |
parent | 1e4220d59b12a82eda13ce11e261d0a69a4dfcff (diff) |
gnu: cross-base: mingw: Use winpthreads by default.
Using a version of mingw-64 with winpthreads, packages that support posix
threads, such as Guile, can be (cross-)built for MinGW with thread support.
Also, since gcc-13, a MinGW (cross-)compiler provides g++ with std::mutex when
built with a version of mingw-w64 that has winpthreads enabled.
* gnu/packages/cross-base.scm (cross-gcc-toolchain/implementation):
Add #:with-winpthreads? parameter, defaulting to #t. Pass it...
(cross-libc*): ...to new #:with-winpthreads? parameter here, defaulting to #t.
Pass it to make-mingw-w64 for winpthread support.
Change-Id: Iaf34d9cc812543762cfd626693ea715880341c13
Diffstat (limited to 'gnu/packages/cross-base.scm')
-rw-r--r-- | gnu/packages/cross-base.scm | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index 5df06418e3..7f29549144 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, 2024 Janneke Nieuwenhuizen <janneke@gnu.org> +;;; Copyright © 2016, 2019, 2023-2025 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> @@ -673,7 +673,8 @@ the base compiler. Use XBINUTILS as the associated cross-Binutils." (libc (libc-for-target target)) (xgcc (cross-gcc target)) (xbinutils (cross-binutils target)) - (xheaders (cross-kernel-headers target))) + (xheaders (cross-kernel-headers target)) + (with-winpthreads? #t)) "Return LIBC cross-built for TARGET, a GNU triplet. Use XGCC and XBINUTILS and the cross tool chain. If TARGET doesn't have a standard C library #f is returned." @@ -682,7 +683,8 @@ returned." (let ((machine (substring target 0 (string-index target #\-)))) (make-mingw-w64 machine #:xgcc xgcc - #:xbinutils xbinutils))) + #:xbinutils xbinutils + #:with-winpthreads? #t))) ((or (? target-linux?) (? target-hurd?)) (package (inherit libc) @@ -787,10 +789,12 @@ returned." #:key (base-gcc %xgcc) (xbinutils (cross-binutils target)) + (with-winpthreads? #t) (libc (cross-libc target #:xgcc (cross-gcc target #:xgcc base-gcc) - #:xbinutils xbinutils)) + #:xbinutils xbinutils + #:with-winpthreads? with-winpthreads?)) (xgcc (cross-gcc target #:xgcc base-gcc #:libc libc |