Skip to content

Commit

Permalink
guix: Build MinGW with --with-default-msvcrt=ucrt
Browse files Browse the repository at this point in the history
  • Loading branch information
hebasto committed Jan 21, 2025
1 parent d7f56cc commit 3b71e49
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions contrib/guix/manifest.scm
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,22 @@ desirable for building Bitcoin Core release binaries."
(package-with-extra-patches mingw-w64-x86_64-winpthreads
(search-our-patches "winpthreads-remap-guix-store.patch")))

(define (make-mingw-w64-ucrt target)
(let* ((machine (substring target 0 (string-index target #\-)))
(base-mingw-w64 (make-mingw-w64 machine
#:xgcc (cross-gcc target #:xgcc (gcc-mingw-patches base-gcc))
#:with-winpthreads? #t)))
(package
(inherit base-mingw-w64)
(arguments
(substitute-keyword-arguments (package-arguments base-mingw-w64)
((#:configure-flags flags)
`(append ,flags '("--with-default-msvcrt=ucrt"))))))))

(define (make-mingw-pthreads-cross-toolchain target)
"Create a cross-compilation toolchain package for TARGET"
(let* ((xbinutils (binutils-mingw-patches (cross-binutils target)))
(machine (substring target 0 (string-index target #\-)))
(pthreads-xlibc (winpthreads-patches (make-mingw-w64 machine
#:xgcc (cross-gcc target #:xgcc (gcc-mingw-patches base-gcc))
#:with-winpthreads? #t)))
(pthreads-xlibc (winpthreads-patches (make-mingw-w64-ucrt target)))
(pthreads-xgcc (cross-gcc target
#:xgcc (gcc-mingw-patches mingw-w64-base-gcc)
#:xbinutils xbinutils
Expand Down

0 comments on commit 3b71e49

Please sign in to comment.