aboutsummaryrefslogtreecommitdiff
path: root/distro
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-08-28 23:15:13 +0200
committerLudovic Courtès <ludo@gnu.org>2012-08-28 23:15:13 +0200
commit7cdeac023d40a69a62b2d96fdb0cda4c4746b33f (patch)
treecd0a137c11d0f3a7b967fc09e4d9250d9696fad6 /distro
parent3db3913ebb8edf12aa7d84ffdb05194f66f32d21 (diff)
downloadguix-7cdeac023d40a69a62b2d96fdb0cda4c4746b33f.tar.gz
guix-7cdeac023d40a69a62b2d96fdb0cda4c4746b33f.zip
distro: Add the GNU C Library.
* distro/base.scm (glibc): New variable.
Diffstat (limited to 'distro')
-rw-r--r--distro/base.scm62
1 files changed, 62 insertions, 0 deletions
diff --git a/distro/base.scm b/distro/base.scm
index 38ea64d09c..06f6dbbb7a 100644
--- a/distro/base.scm
+++ b/distro/base.scm
@@ -1085,6 +1085,68 @@ call interface, and powerful string processing.")
(license "GPLv2")
(home-page "http://kernel.org/"))))
+(define-public glibc
+ (package
+ (name "glibc")
+ (version "2.16.0")
+ (source (origin
+ (method http-fetch)
+ (uri (string-append "http://ftp.gnu.org/gnu/glibc/glibc-"
+ version ".tar.xz"))
+ (sha256
+ (base32
+ "092rdm49zh6l1pqkxbcpcaawgsgzxhpf1s7wf5wi5dvc5am3dp0y"))))
+ (build-system gnu-build-system)
+ (native-inputs `(("linux-headers" ,linux-headers)))
+ (arguments
+ `(#:modules ((guix build utils)
+ (guix build gnu-build-system)
+ (ice-9 regex))
+ #:out-of-source? #t
+ #:configure-flags
+ (list "--enable-add-ons"
+ "--sysconfdir=/etc"
+ "--localedir=/var/run/current-system/sw/lib/locale" ; XXX
+ (string-append "--with-headers="
+ (assoc-ref %build-inputs "linux-headers")
+ "/include")
+ ;; To avoid linking with -lgcc_s (dynamic link) so the libc does
+ ;; not depend on its compiler store path.
+ "libc_cv_as_needed=no"
+
+ ;; XXX: Work around "undefined reference to `__stack_chk_guard'".
+ "libc_cv_ssp=no")
+ #:tests? #f ; XXX
+ #:phases (alist-cons-before
+ 'configure 'pre-configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ ;; Use `pwd', not `/bin/pwd'.
+ (substitute* "configure"
+ (("^.*/bin/pwd.*$" line)
+ (regexp-substitute/global #f
+ "/bin/pwd"
+ (string-append line "\n")
+ 'pre "pwd" 'post)))
+
+ ;; Install the rpc data base file under `$out/etc/rpc'.
+ (substitute* "sunrpc/Makefile"
+ (("^\\$\\(inst_sysconfdir\\)/rpc(.*)$" _ suffix)
+ (string-append out "/etc/rpc" suffix "\n"))
+ (("^install-others =.*$")
+ (string-append "install-others = " out "/etc/rpc\n")))))
+ %standard-phases)))
+ (description "The GNU C Library")
+ (long-description
+ "Any Unix-like operating system needs a C library: the library which
+defines the \"system calls\" and other basic facilities such as open, malloc,
+printf, exit...
+
+The GNU C library is used as the C library in the GNU system and most systems
+with the Linux kernel.")
+ (license "LGPLv2+")
+ (home-page "http://www.gnu.org/software/libc/")))
+
(define (guile-reader guile)
"Build Guile-Reader against GUILE, a package of some version of Guile 1.8
or 2.0."