[PATCH 2/2] gnu: Allow building gcc with non-default libc.

DoneSubmitted by Carl Dong.
Details
2 participants
  • Carl Dong
  • Ludovic Courtès
Owner
unassigned
Severity
normal
C
C
Carl Dong wrote on 7 May 2019 00:21
(address . guix-patches@gnu.org)(name . Carl Dong)(address . accounts@carldong.me)
cTcPTTb-7-v1qXIhLCzMk2KMRTY0LEfsFeZFfVS2e-AYvrajeJw8zjlVhCmaeSOFfaUFwwma7PKTOtfHqGhnM0fwF_lpjE4e_47q6Vq47qM=@carldong.me
* gnu/packages/base.scm (make-gcc-libc): New procedure, returns a gcc that targets a specified libc. (gcc-glibc-2.26, gcc-glibc-2.27): New public variables.--- gnu/packages/base.scm | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+)
Toggle diff (42 lines)diff --git a/gnu/packages/base.scm b/gnu/packages/base.scmindex e33e3c52c8..5c0cd36c14 100644--- a/gnu/packages/base.scm+++ b/gnu/packages/base.scm@@ -1009,6 +1009,35 @@ with the Linux kernel.") (("/bin/pwd") "pwd")) #t)))))))) +(define (make-gcc-libc base-gcc libc)+ "Return a GCC that targets LIBC."+ (package (inherit base-gcc)+ (name (string-append (package-name base-gcc) "-"+ (package-name libc) "-"+ (package-version libc)))+ (arguments+ (substitute-keyword-arguments+ (ensure-keyword-arguments (package-arguments base-gcc)+ '(#:implicit-inputs? #f))+ ((#:make-flags flags)+ `(let ((libc (assoc-ref %build-inputs "libc")))+ ;; FLAGS_FOR_TARGET are needed for the target libraries to receive+ ;; the -Bxxx for the startfiles.+ (cons (string-append "FLAGS_FOR_TARGET=-B" libc "/lib")+ ,flags)))))+ (native-inputs+ `(("libc" ,libc)+ ("libc:static" ,libc "static")+ ,@(append (package-inputs base-gcc)+ (fold alist-delete (%final-inputs) '("libc" "libc:static")))))+ (inputs '())))++(define-public gcc-glibc-2.27+ (make-gcc-libc gcc glibc-2.27))++(define-public gcc-glibc-2.26+ (make-gcc-libc gcc glibc-2.26))+ (define-public (make-glibc-locales glibc) (package (inherit glibc)-- 2.21.0
L
L
Ludovic Courtès wrote on 13 May 2019 09:46
control message for bug #35612
(address . control@debbugs.gnu.org)
87k1euvltv.fsf@gnu.org
tags 35612 fixedclose 35612
?
Your comment

This issue is archived.

To comment on this conversation send email to 35612@debbugs.gnu.org