guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] gnu: base: Add Glibc-Hurd.


From: Ludovic Courtès
Subject: Re: [PATCH] gnu: base: Add Glibc-Hurd.
Date: Mon, 02 Jun 2014 23:38:22 +0200
User-agent: Gnus/5.130009 (Ma Gnus v0.9) Emacs/24.3 (gnu/linux)

Manolis Ragkousis <address@hidden> skribis:

> From f3a0685b57d8ff7135d2d04ef0c3cb3a78f0fc90 Mon Sep 17 00:00:00 2001
> From: Manolis Ragkousis <address@hidden>
> Date: Tue, 3 Jun 2014 00:00:01 +0000
> Subject: [PATCH] gnu: base: Add Glibc-Hurd.
>
> * gnu/packages/base.scm (glibc/hurd): New variable.
> * gnu/packages/patches/glibc-make-4.0.patch: New patch.
> * gnu/packages/patches/glibc-manual-fix.patch: New patch.
> * gnu-system.am (dist_patch_DATA): Add it.

[...]

> +    (source
> +     (origin
> +       (method git-fetch)
> +       (uri (git-reference
> +             (url "git://git.sv.gnu.org/hurd/glibc")
> +             (commit "a9d8d3808f18de4da9b587e9bdfb6cca4704344b")))
> +       (sha256
> +        (base32
> +         "0jmczzdyps5syhrqyf7lgl3h77br8s74qw0417jp8b4f29ks7pbz"))
> +       (file-name (string-append name "-" version))
> +       (modules '((guix build utils)))

I believe the ‘modules’ field can be omitted.

> +    (propagated-inputs `(("gnumach-headers" ,gnumach-headers)
> +                         ("hurd-headers" ,hurd-headers)
> +                         ("hurd-minimal" ,hurd-minimal)))

Add a one-line comment saying why they’re propagated.

> +    (arguments
> +     `(#:out-of-source? #t
> +       #:configure-flags
> +       (list "--enable-add-ons"
> +             "--host=i686-pc-gnu"
> +             "--disable-profile"
> +             "--disable-multi-arch"
> +
> +             ;; Library functions can not contact the nscd daemon
> +             ;; so we disable it.
> +             "--disable-nscd"
> +             
> +             ;; Installs NIS and RPC related headers that 
> +             ;; are not installed by default
> +             "--enable-obsolete-rpc"
> +
> +             ;; Install the rpc data base file under `$out/etc/rpc'.
> +             (string-append "--sysconfdir="
> +                            (assoc-ref %outputs "out")
> +                            "/etc")
> +
> +             (string-append "--localedir=" (assoc-ref %outputs "locales")
> +                            "/share/locale")
> +             (string-append "libc_cv_localedir="
> +                            (assoc-ref %outputs "locales")
> +                            "/share/locale")
> +             
> +             ;; Use our Bash instead of /bin/sh.
> +             (string-append "BASH_SHELL="
> +                            (assoc-ref %build-inputs "bash")
> +                            "/bin/bash"))

Is --host the only thing that differs from ‘glibc’?  If so, we need to
factorize things.

> +       #:tests? #f
> +       #:phases  (alist-cons-after 
> +                  'unpack 'bootstrap 
> +                  (lambda* (#:key inputs #:allow-other-keys)
> +                    (copy-recursively (assoc-ref inputs "libpthread") 
> "libpthread")
> +                    (copy-file "libpthread/sysdeps/generic/bits/pthread.h" 
> +                               "bits/pthread.h")
> +                    (copy-file 
> "libpthread/sysdeps/generic/bits/thread-attr.h" 
> +                               "bits/thread-attr.h")
> +                    (copy-file 
> "libpthread/sysdeps/generic/bits/mutex-attr.h" 
> +                               "bits/mutex-attr.h")

Seems to me that ‘copy-recursively’ will come in handy here.  :-)

However, why do the headers need to be copied in the first place?  I
believe the sysdeps headers of add-ons are automatically picked up the
libc’s build system normally.  Could you check what’s going on?

> +                    (zero? (system* "patch" "-p1" "-i" 
> +                                    (assoc-ref %build-inputs 
> +                                               "patch/libpthread-patch")))
> +                    #t)

Remove #t, otherwise the result of ‘zero?’ is ignored.

> --- /dev/null
> +++ b/gnu/packages/patches/glibc-make-4.0.patch
> @@ -0,0 +1,12 @@
> +Allow libc to be compiled with GNU Make 4.0.
> +
> +--- glibc-2.18/configure     2013-08-11 00:52:55.000000000 +0200
> ++++ glibc-2.18/configure     2013-10-16 16:53:09.000000000 +0200
> +@@ -4772,7 +4772,7 @@ $as_echo_n "checking version of $MAKE...
> +   ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU 
> Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'`
> +   case $ac_prog_version in
> +     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
> +-    3.79* | 3.[89]*)
> ++    3.79* | 3.[89]* | 4.*)
> +        ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
> +     *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;

(This is a sign that hurd/glibc.git is still at 2.18, which sucks.)

> --- /dev/null
> +++ b/gnu/packages/patches/glibc-manual-fix.patch
> @@ -0,0 +1,12 @@
> +diff --git a/manual/contrib.texi b/manual/contrib.texi
> +index 3b9d23c..376b40d 100644
> +--- a/manual/contrib.texi
> ++++ b/manual/contrib.texi
> +@@ -1,3 +1,4 @@
> address@hidden deftypefun
> + @node Contributors, Free Manuals, Platform, Top
> + @c %MENU% Who wrote what parts of the GNU C Library
> + @appendix Contributors to @theglibc{}

What’s this?  (Missing explanation.)

Thanks!

Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]