GNU bug report logs -
#35611
[PATCH 1/2] gnu: cross-base: Allow using non-default glibc.
Previous Next
Reported by: Carl Dong <accounts <at> carldong.me>
Date: Mon, 6 May 2019 22:23:01 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Mon, 13 May 2019 09:45:56 +0200
with message-id <87lfzavlu3.fsf <at> gnu.org>
and subject line Re: [bug#35611] [PATCH 1/2] gnu: cross-base: Allow using non-default glibc.
has caused the debbugs.gnu.org bug report #35611,
regarding [PATCH 1/2] gnu: cross-base: Allow using non-default glibc.
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
35611: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=35611
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
* 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)))
;;; Concrete cross tool chains are instantiated like this:
--
2.21.0
[Message part 3 (message/rfc822, inline)]
Hi Carl,
Carl Dong <accounts <at> carldong.me> skribis:
>> Really a detail, but for clarity I would change “xlibc” to “libc”, because
>> this argument denotes a C library, not a cross-compiled C library.
>>
>> Ditto in other places.
>>
>> You can send an updated patch or I can make this change on your behalf if you
>> prefer, let me know!
>
> Ah yes! That does make it more clear. Could you make this change for me? Thanks!
Done!
>> This procedure is starting to look weird. :-) I wonder if we should inline it
>> at the call sites, but we can look into it later.
>
> Haha that's what I thought too... Inlining would probably make the most sense.
> I'll submit another patch to this effect at some point!
Awesome. :-)
Thank you!
Ludo’.
This bug report was last modified 6 years and 5 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.