unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#35611] [PATCH 1/2] gnu: cross-base: Allow using non-default glibc.
@ 2019-05-06 22:21 Carl Dong
  2019-05-06 22:34 ` [bug#35611] [PATCH 2/2] gnu: Allow building gcc with non-default libc Carl Dong
  2019-05-12 21:40 ` [bug#35611] [PATCH 1/2] gnu: cross-base: Allow using non-default glibc Ludovic Courtès
  0 siblings, 2 replies; 7+ messages in thread
From: Carl Dong @ 2019-05-06 22:21 UTC (permalink / raw)
  To: 35611; +Cc: Carl Dong

* gnu/packages/cross-base.scm (cross-libc, native-libc, cross-newlib?):
  Add xlibc optional argument to specify using a non-default glibc
  package.
---
 gnu/packages/cross-base.scm | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 25caacb723..51e9e2962a 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -422,14 +422,15 @@ target that libc."
 
 (define* (cross-libc target
                      #:optional
+                     (xlibc 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 XLIBC cross-built for TARGET, a GNU triplet. Use XGCC and XBINUTILS
+and the cross tool chain."
+  (if (cross-newlib? target xlibc)
+      (native-libc target xlibc)
+      (let ((libc xlibc))
         (package (inherit libc)
           (name (string-append "glibc-cross-" target))
           (arguments
@@ -502,13 +503,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
+                     (xlibc glibc))
   (if (target-mingw? target)
       mingw-w64
-      glibc))
+      xlibc))
 
-(define (cross-newlib? target)
-  (not (eq? (native-libc target) glibc)))
+(define* (cross-newlib? target
+                       #:optional
+                       (xlibc glibc))
+  (not (eq? (native-libc target xlibc) xlibc)))
 
 \f
 ;;; Concrete cross tool chains are instantiated like this:
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-05-13 10:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-06 22:21 [bug#35611] [PATCH 1/2] gnu: cross-base: Allow using non-default glibc Carl Dong
2019-05-06 22:34 ` [bug#35611] [PATCH 2/2] gnu: Allow building gcc with non-default libc Carl Dong
2019-05-12 21:41   ` Ludovic Courtès
2019-05-12 21:40 ` [bug#35611] [PATCH 1/2] gnu: cross-base: Allow using non-default glibc Ludovic Courtès
2019-05-13  2:46   ` Carl Dong
2019-05-13  7:45     ` bug#35611: " Ludovic Courtès
2019-05-13 10:09     ` [bug#35611] " Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).