[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/08: gnu: Allow building gcc with non-default libc.
From: |
guix-commits |
Subject: |
02/08: gnu: Allow building gcc with non-default libc. |
Date: |
Mon, 13 May 2019 04:59:17 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 3ed497d42a5af8756bd95c64f9f9bed4de5f6d3c
Author: Carl Dong <address@hidden>
Date: Mon May 6 22:34:15 2019 +0000
gnu: Allow building gcc with non-default libc.
* 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.
Signed-off-by: Ludovic Courtès <address@hidden>
---
gnu/packages/base.scm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index e33e3c5..5c0cd36 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)
- branch master updated (d815728 -> 8548cf6), guix-commits, 2019/05/13
- 01/08: gnu: cross-base: Allow using non-default glibc., guix-commits, 2019/05/13
- 03/08: gnu: gdb: Add version 8.3., guix-commits, 2019/05/13
- 02/08: gnu: Allow building gcc with non-default libc.,
guix-commits <=
- 06/08: install: Add node name in Russian., guix-commits, 2019/05/13
- 05/08: doc: Mention the Russian translation., guix-commits, 2019/05/13
- 07/08: nls: Update de translation., guix-commits, 2019/05/13
- 08/08: nls: Update es translation., guix-commits, 2019/05/13
- 04/08: doc: Add Russian translation., guix-commits, 2019/05/13