From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] gnu: base: Add Glibc-Hurd. Date: Mon, 02 Jun 2014 23:38:22 +0200 Message-ID: <874n03gfg1.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46907) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WrZw6-0002go-0I for Guix-devel@gnu.org; Mon, 02 Jun 2014 17:38:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WrZw0-0001F6-U5 for Guix-devel@gnu.org; Mon, 02 Jun 2014 17:38:29 -0400 Received: from hera.aquilenet.fr ([2a01:474::1]:55092) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WrZw0-0001Ew-Jh for Guix-devel@gnu.org; Mon, 02 Jun 2014 17:38:24 -0400 In-Reply-To: (Manolis Ragkousis's message of "Mon, 2 Jun 2014 21:09:18 +0000") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Manolis Ragkousis Cc: Guix-devel@gnu.org Manolis Ragkousis skribis: > From f3a0685b57d8ff7135d2d04ef0c3cb3a78f0fc90 Mon Sep 17 00:00:00 2001 > From: Manolis Ragkousis > 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 =E2=80=98modules=E2=80=99 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=E2=80=99re propagated. > + (arguments > + `(#:out-of-source? #t > + #:configure-flags > + (list "--enable-add-ons" > + "--host=3Di686-pc-gnu" > + "--disable-profile" > + "--disable-multi-arch" > + > + ;; Library functions can not contact the nscd daemon > + ;; so we disable it. > + "--disable-nscd" > +=20=20=20=20=20=20=20=20=20=20=20=20=20 > + ;; Installs NIS and RPC related headers that=20 > + ;; are not installed by default > + "--enable-obsolete-rpc" > + > + ;; Install the rpc data base file under `$out/etc/rpc'. > + (string-append "--sysconfdir=3D" > + (assoc-ref %outputs "out") > + "/etc") > + > + (string-append "--localedir=3D" (assoc-ref %outputs "locale= s") > + "/share/locale") > + (string-append "libc_cv_localedir=3D" > + (assoc-ref %outputs "locales") > + "/share/locale") > +=20=20=20=20=20=20=20=20=20=20=20=20=20 > + ;; Use our Bash instead of /bin/sh. > + (string-append "BASH_SHELL=3D" > + (assoc-ref %build-inputs "bash") > + "/bin/bash")) Is --host the only thing that differs from =E2=80=98glibc=E2=80=99? If so,= we need to factorize things. > + #:tests? #f > + #:phases (alist-cons-after=20 > + 'unpack 'bootstrap=20 > + (lambda* (#:key inputs #:allow-other-keys) > + (copy-recursively (assoc-ref inputs "libpthread") "l= ibpthread") > + (copy-file "libpthread/sysdeps/generic/bits/pthread.= h"=20 > + "bits/pthread.h") > + (copy-file "libpthread/sysdeps/generic/bits/thread-a= ttr.h"=20 > + "bits/thread-attr.h") > + (copy-file "libpthread/sysdeps/generic/bits/mutex-at= tr.h"=20 > + "bits/mutex-attr.h") Seems to me that =E2=80=98copy-recursively=E2=80=99 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=E2=80=99s build system normally. Could you check what=E2=80=99s going= on? > + (zero? (system* "patch" "-p1" "-i"=20 > + (assoc-ref %build-inputs=20 > + "patch/libpthread-patch")= )) > + #t) Remove #t, otherwise the result of =E2=80=98zero?=E2=80=99 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=3D`$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=3D"v. ?.??, bad"; ac_verc_fail=3Dyes;; > +- 3.79* | 3.[89]*) > ++ 3.79* | 3.[89]* | 4.*) > + ac_prog_version=3D"$ac_prog_version, ok"; ac_verc_fail=3Dno;; > + *) ac_prog_version=3D"$ac_prog_version, bad"; ac_verc_fail=3Dyes;; (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 @@ > ++@end deftypefun > + @node Contributors, Free Manuals, Platform, Top > + @c %MENU% Who wrote what parts of the GNU C Library > + @appendix Contributors to @theglibc{} What=E2=80=99s this? (Missing explanation.) Thanks! Ludo=E2=80=99.