diff options
author | Carl Dong <contact@carldong.me> | 2019-10-11 19:56:03 -0400 |
---|---|---|
committer | Carl Dong <contact@carldong.me> | 2019-10-21 17:39:08 -0400 |
commit | f5d6c88d0f5e1556295c1a19c46ddfcb7a23107f (patch) | |
tree | 8b48edff004fa261bbd6828c8caf95406d3d298a /gnu/packages/cross-base.scm | |
parent | 8b438f85cf85c1a22273eb6164c7f67f41f29bf4 (diff) | |
download | patches-f5d6c88d0f5e1556295c1a19c46ddfcb7a23107f.tar patches-f5d6c88d0f5e1556295c1a19c46ddfcb7a23107f.tar.gz |
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.
Diffstat (limited to 'gnu/packages/cross-base.scm')
-rw-r--r-- | gnu/packages/cross-base.scm | 13 |
1 files changed, 10 insertions, 3 deletions
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 |