summaryrefslogtreecommitdiff
path: root/gnu/packages/cross-base.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2019-05-25 00:25:15 +0200
committerMarius Bakke <mbakke@fastmail.com>2019-05-25 00:25:15 +0200
commit57df83e07d4b5e78d9a54c1a88d05b4a9ed65714 (patch)
tree76684e63965e9ad6e37d9d45bc3159e6c9782cd0 /gnu/packages/cross-base.scm
parent43d9ed7792808638eabb43aa6133f1d6186c520b (diff)
parent136b7d81f0eb713783e9ea7cf7f260a2b6252dfd (diff)
Merge branch 'staging' into core-updates
Diffstat (limited to 'gnu/packages/cross-base.scm')
-rw-r--r--gnu/packages/cross-base.scm30
1 files changed, 18 insertions, 12 deletions
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 6a092727c1..9fcf3bd780 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -215,9 +215,10 @@ target that libc."
(patches
(append
(origin-patches (package-source xgcc))
- (cons (if (version>=? (package-version xgcc) "6.0")
- (search-patch "gcc-6-cross-environment-variables.patch")
- (search-patch "gcc-cross-environment-variables.patch"))
+ (cons (cond
+ ((version>=? (package-version xgcc) "8.0") (search-patch "gcc-8-cross-environment-variables.patch"))
+ ((version>=? (package-version xgcc) "6.0") (search-patch "gcc-6-cross-environment-variables.patch"))
+ (else (search-patch "gcc-cross-environment-variables.patch")))
(cross-gcc-patches target))))
(modules '((guix build utils)))
(snippet
@@ -431,14 +432,15 @@ target that libc."
(define* (cross-libc target
#:optional
+ (libc glibc)
(xgcc (cross-gcc target))
(xbinutils (cross-binutils target))
(xheaders (cross-kernel-headers target)))
- "Return a libc cross-built for TARGET, a GNU triplet. Use XGCC and
-XBINUTILS and the cross tool chain."
- (if (cross-newlib? target)
- (native-libc target)
- (let ((libc glibc))
+ "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)
+ (let ((libc libc))
(package (inherit libc)
(name (string-append "glibc-cross-" target))
(arguments
@@ -492,13 +494,17 @@ XBINUTILS and the cross tool chain."
,@(package-inputs libc) ;FIXME: static-bash
,@(package-native-inputs libc)))))))
-(define (native-libc target)
+(define* (native-libc target
+ #:optional
+ (libc glibc))
(if (target-mingw? target)
mingw-w64
- glibc))
+ libc))
-(define (cross-newlib? target)
- (not (eq? (native-libc target) glibc)))
+(define* (cross-newlib? target
+ #:optional
+ (libc glibc))
+ (not (eq? (native-libc target libc) libc)))
;;; Concrete cross tool chains are instantiated like this: