diff options
author | Marius Bakke <mbakke@fastmail.com> | 2019-05-25 00:25:15 +0200 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2019-05-25 00:25:15 +0200 |
commit | 57df83e07d4b5e78d9a54c1a88d05b4a9ed65714 (patch) | |
tree | 76684e63965e9ad6e37d9d45bc3159e6c9782cd0 /gnu/packages/base.scm | |
parent | 43d9ed7792808638eabb43aa6133f1d6186c520b (diff) | |
parent | 136b7d81f0eb713783e9ea7cf7f260a2b6252dfd (diff) | |
download | patches-57df83e07d4b5e78d9a54c1a88d05b4a9ed65714.tar patches-57df83e07d4b5e78d9a54c1a88d05b4a9ed65714.tar.gz |
Merge branch 'staging' into core-updates
Diffstat (limited to 'gnu/packages/base.scm')
-rw-r--r-- | gnu/packages/base.scm | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 8fe8f3d9a5..9df0dc98d6 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -951,6 +951,29 @@ 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 (make-glibc-locales glibc) (package (inherit glibc) |