aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/cross-base.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/cross-base.scm')
-rw-r--r--gnu/packages/cross-base.scm22
1 files changed, 11 insertions, 11 deletions
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 6c971d0eb1..58e3f774df 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -74,12 +74,6 @@
`(cons ,(string-append "--target=" target)
,flags))))))
-(define (package-with-patch original patch)
- "Return package ORIGINAL with PATCH applied."
- (package (inherit original)
- (source (origin (inherit (package-source original))
- (patches (list patch))))))
-
(define* (cross-binutils target #:optional (binutils binutils))
"Return a cross-Binutils for TARGET using BINUTILS."
(let ((binutils (package (inherit binutils)
@@ -101,11 +95,17 @@
`(cons "--with-sysroot=/" ,flags)))))))
;; For Xtensa, apply Qualcomm's patch.
- (cross (if (string-prefix? "xtensa-" target)
- (package-with-patch binutils
- (search-patch
- "ath9k-htc-firmware-binutils.patch"))
- binutils)
+ (cross (cond ((string-prefix? "xtensa-" target)
+ (package-with-patches binutils
+ (search-patches
+ "ath9k-htc-firmware-binutils.patch")))
+ ((target-mingw? target)
+ (package-with-extra-patches
+ binutils
+ (search-patches
+ "binutils-mingw-w64-specify-timestamp.patch"
+ "binutils-mingw-w64-reproducible-import-libraries.patch")))
+ (else binutils))
target)))
(define (cross-gcc-arguments target xgcc libc)