From f5d6c88d0f5e1556295c1a19c46ddfcb7a23107f Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Fri, 11 Oct 2019 19:56:03 -0400 Subject: gnu: mingw-w64: Add -winpthreads variants. This recursive package definition really demonstrates how magical Guix can be :-) Try invoking: ./pre-inst-env guix build mingw-w64-{x86_64,i686}{,-winpthreads} * gnu/packages/mingw.scm (make-mingw-w64): Add XGCC, XBINUTILS optional arguments to specify using a non-default cross-compiler/binutils. Add WITH-WINPTHREADS? optional argument to allow building with winpthreads support. Adjust accordingly for the new arguments. (mingw-w64-i686-winpthreads, mingw-w64-x86_64-winpthreads): Add variables. * gnu/packages/cross-base.scm (native-libc): Add XGCC, XBINUTILS key arugments and pass to MAKE-MINGW-W64. (cross-libc): Pass XGCC and XBINUTILS to NATIVE-LIBC. --- gnu/packages/cross-base.scm | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'gnu/packages/cross-base.scm') diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index 76d15f4c59..13237fb8a8 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -454,7 +454,9 @@ target that libc." "Return LIBC cross-built for TARGET, a GNU triplet. Use XGCC and XBINUTILS and the cross tool chain." (if (cross-newlib? target libc) - (native-libc target libc) + (native-libc target libc + #:xgcc xgcc + #:xbinutils xbinutils) (let ((libc libc)) (package (inherit libc) (name (string-append "glibc-cross-" target)) @@ -511,10 +513,15 @@ and the cross tool chain." (define* (native-libc target #:optional - (libc glibc)) + (libc glibc) + #:key + xgcc + xbinutils) (if (target-mingw? target) (let ((machine (substring target 0 (string-index target #\-)))) - (make-mingw-w64 machine)) + (make-mingw-w64 machine + #:xgcc xgcc + #:xbinutils xbinutils)) libc)) (define* (cross-newlib? target -- cgit v1.2.3