I am working on the cross-base patch so we can merge it with wip-hurd as well, but some problems need to be discussed.
First, in glibc/hurd headers we need to redeclare #:configure-flags with less flags. We shouldn't but because we use the same configure flags as in glibc and glibc/hurd, we get an error at (string-append "--localedir=" (assoc-ref %outputs "locales") "/share/locale") when it tries to find the locales output. >In unknown file: > ?: 0 [string-append "--localedir=" #f "/share/locale"] I attached the log. Second, in glibc/hurd headers again, because we Don't use the same phases as in glibc and glibc/hurd, and as a result we don't have the pre-configure phase of glibc, /bin/pwd is not substituted with pwd and we get a "no such file" error. >checking for i686-pc-gnu-readelf... i686-pc-gnu-readelf >../glibc-hurd-2.18/configure: line 3312: /bin/pwd: No such file or directory >../glibc-hurd-2.18/configure: line 3312: /bin/pwd: No such file or directory >configure: error: you must configure in a separate build directory >phase `configure' failed after 1 seconds In order to solve this I just need to add a pre-configure phase with just (lambda _ (substitute* "configure" (("/bin/pwd") "pwd"))) attached log. Third, in glibc/hurd the permissions in chmod "bits/pthreadtypes.h" should be 666 not 555. With this changes glibc/hurd can be built using the i686-pc-gnu cross toolchain. I attached the patch and I made sure that there will be no regressions with the cross-base patch. I wrote a simple commit message because it needs to be merged with the current glibc/hurd patch in wip-hurd. Thank you, Manolis
7rc2bifwca5rn62irz5q9hhhjwi30z-glibc-hurd-headers-cross-i686-pc-gnu-2.18.drv.bz2
Description: BZip2 compressed data
k5ghfib3n6campjhi3y3ji634qv960-glibc-hurd-headers-cross-i686-pc-gnu-2.18.drv.bz2
Description: BZip2 compressed data
From 88f065c3818e2e6665ae490557415594528f2d6a Mon Sep 17 00:00:00 2001 From: Manolis Ragkousis <manolis...@gmail.com> Date: Sat, 27 Sep 2014 20:07:19 +0300 Subject: [PATCH] gnu: base: Edits on glibc-hurd and glibc-hurd-headers. * gnu/packages/base.scm (glibc/hurd): Fix file permissions in bits/pthreadtypes.h (glibc/hurd-headers): Add configure flags : Add preconfigure phase --- gnu/packages/base.scm | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 2acb51b..53858d4 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -561,7 +561,7 @@ with the Linux kernel.") (assoc-ref %build-inputs "patch/libpthread-patch")) ;; Make the file writable. - (chmod "bits/pthreadtypes.h" #o555) + (chmod "bits/pthreadtypes.h" #o666) (copy-recursively "libpthread/sysdeps/generic/bits" "bits")) ,phases)))))) @@ -571,6 +571,11 @@ with the Linux kernel.") (outputs '("out")) (arguments (substitute-keyword-arguments (package-arguments glibc/hurd) + ;; We just pass the flags really needed to build the headers. + ((#:configure-flags _) + `(list "--enable-add-ons" + "--host=i686-pc-gnu" + "--enable-obsolete-rpc")) ((#:phases _) '(alist-replace 'install @@ -586,7 +591,16 @@ with the Linux kernel.") (string-append out "/include/gnu/stubs.h")))))) ;; Nothing to build. - (alist-delete 'build %standard-phases))))))) + (alist-delete + 'build + + ;; We need this to use `pwd', not `/bin/pwd'. + (alist-cons-before + 'configure 'pre-configure + (lambda _ + (substitute* "configure" + (("/bin/pwd") "pwd"))) + %standard-phases)))))))) (define-public tzdata (package -- 2.1.1