diff options
author | Ludovic Courtès <ludo@gnu.org> | 2012-10-24 00:07:12 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2012-10-24 00:07:12 +0200 |
commit | 827a3087da2181a6570ab2c2d97c97124207a0e9 (patch) | |
tree | e8dd422e77ff72556c9d94af899749bf60c5a757 /distro | |
parent | 3f8de86dec63164157e5c4f7508b0bd1e4ed36ef (diff) | |
download | patches-827a3087da2181a6570ab2c2d97c97124207a0e9.tar patches-827a3087da2181a6570ab2c2d97c97124207a0e9.tar.gz |
distro: Add required Linux-Libre headers to the glibc tarball.
* distro/packages/base.scm (%glibc-stripped): Include required headers
from Linux-Libre.
Diffstat (limited to 'distro')
-rw-r--r-- | distro/packages/base.scm | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/distro/packages/base.scm b/distro/packages/base.scm index e0dcbdb57a..6506553558 100644 --- a/distro/packages/base.scm +++ b/distro/packages/base.scm @@ -2274,7 +2274,8 @@ store.") (let* ((out (assoc-ref %outputs "out")) (libdir (string-append out "/lib")) (incdir (string-append out "/include")) - (libc (assoc-ref %build-inputs "libc"))) + (libc (assoc-ref %build-inputs "libc")) + (linux (assoc-ref %build-inputs "linux-headers"))) (mkdir-p libdir) (for-each (lambda (file) (let ((target (string-append libdir "/" @@ -2285,8 +2286,30 @@ store.") "^(crt.*|ld.*|lib(c|m|dl|rt|pthread|nsl|util).*\\.so(\\..*)?|libc_nonshared\\.a)$")) (copy-recursively (string-append libc "/include") incdir) + + ;; Copy some of the Linux-Libre headers that glibc headers + ;; refer to. + (mkdir (string-append incdir "/linux")) + (for-each (lambda (file) + (copy-file (string-append linux "/include/linux/" file) + (string-append incdir "/linux/" + (basename file)))) + '("limits.h" "errno.h" "socket.h" "kernel.h" + "sysctl.h" "param.h")) + + (mkdir (string-append incdir "/asm")) + (for-each (lambda (file) + (copy-file (string-append linux "/include/asm/" file) + (string-append incdir "/asm/" + (basename file)))) + '("types.h" "unistd.h" "ioctls.h" "socket.h" + "param.h" "errno.h")) + + (copy-recursively (string-append linux "/include/asm-generic") + (string-append incdir "/asm-generic")) #t)))) - (inputs `(("libc" ,glibc-final))))) + (inputs `(("libc" ,glibc-final) + ("linux-headers" ,linux-libre-headers))))) (define %gcc-static ;; A statically-linked GCC, with stripped-down functionality. |