summary refs log tree commit diff
path: root/gnu/packages/cross-base.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-11-18 23:12:36 +0100
committerLudovic Courtès <ludo@gnu.org>2018-11-18 23:12:36 +0100
commit2d546858b139e5fcf2cbdf9958a17fd98803ac4c (patch)
treed4949e03ad6e44bbd49220fa02f25645ed700454 /gnu/packages/cross-base.scm
parent8504d1922240b29815fd3e1e231e27da391338cd (diff)
downloadguix-2d546858b139e5fcf2cbdf9958a17fd98803ac4c.tar.gz
gnu: hurd: Build against glibc 2.28.
Version 2.28 of glibc is the first in a long time that fully supports
GNU/Hurd.  This change updates the Hurd and Mach to provide the features
glibc 2.28 expects and adjusts the cross-compilation tool chain for
"i586-pc-gnu".

* gnu/packages/base.scm (glibc/linux): Rename to...
(glibc): ... this.
[propagated-inputs]: Add 'hurd-target?' case.
[arguments]: Use '--disable-werror' when 'hurd-target?'.  Add
'augment-libc.so' phase when 'hurd-target?'.
[native-inputs]: Add MIG and PERL when 'hurd-target?'.
(glibc/hurd, glibc-for-target): Remove
(glibc/hurd-headers): Inherit from GLIBC, not GLIBC/HURD.
[arguments]: Remove "--enable-obsolete-rpc" configure flag and
'patch-configure-script' phase.
* gnu/packages/cross-base.scm (cross-kernel-headers)[xglibc/hurd-headers]:
Move 'set-cross-headers-path' after 'unpack'.
* gnu/packages/cross-base.scm (cross-libc)[cross-libc-for-target]:
Remove.
Pass "--disable-werror" when TARGET matches 'hurd-triplet?'.
* gnu/packages/hurd.scm (hurd-target?, patch-url): New procedures.
(gnumach-headers)[source](patches, modules, snippet): New fields.
(hurd-headers): Use Git commit 98b3390.
[native-inputs]: Add AUTOCONF and AUTOMAKE.
[arguments]: Add "ac_cv_func_*" configure flags.
(hurd-minimal)[native-inputs]: Remove.
[arguments]: In 'build' phase, build "include/assert-backtrace.h"
first.
Diffstat (limited to 'gnu/packages/cross-base.scm')
-rw-r--r--gnu/packages/cross-base.scm18
1 files changed, 6 insertions, 12 deletions
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index bbd779ae4e..2fcb7fb36b 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2016 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
@@ -356,7 +356,7 @@ target that libc."
              ,@(package-arguments glibc/hurd-headers))
          ((#:phases phases)
           `(modify-phases ,phases
-             (add-before 'pre-configure 'set-cross-headers-path
+             (add-after 'unpack 'set-cross-headers-path
                (lambda* (#:key inputs #:allow-other-keys)
                  (let* ((mach (assoc-ref inputs "gnumach-headers"))
                         (hurd (assoc-ref inputs "hurd-headers"))
@@ -426,17 +426,9 @@ target that libc."
                      (xheaders (cross-kernel-headers target)))
   "Return a libc cross-built for TARGET, a GNU triplet.  Use XGCC and
 XBINUTILS and the cross tool chain."
-  (define (cross-libc-for-target target)
-    "Return libc depending on TARGET."
-    (match target
-      ((or "i586-pc-gnu" "i586-gnu") glibc/hurd)
-      (_ glibc/linux)))
-
-  ;; Use (cross-libc-for-target ...) to determine the correct libc to use.
-
   (if (cross-newlib? target)
       (native-libc target)
-      (let ((libc (cross-libc-for-target target)))
+      (let ((libc glibc))
         (package (inherit libc)
           (name (string-append "glibc-cross-" target))
           (arguments
@@ -457,7 +449,9 @@ XBINUTILS and the cross tool chain."
                  ,@(package-arguments libc))
              ((#:configure-flags flags)
               `(cons ,(string-append "--host=" target)
-                   ,flags))
+                     ,(if (hurd-triplet? target)
+                          `(cons "--disable-werror" ,flags)
+                          flags)))
              ((#:phases phases)
               `(modify-phases ,phases
                  (add-before 'configure 'set-cross-kernel-headers-path