summary refs log tree commit diff
path: root/gnu/packages/cross-base.scm
diff options
context:
space:
mode:
authorJanneke Nieuwenhuizen <janneke@gnu.org>2023-05-23 15:31:53 +0200
committerJosselin Poiret <dev@jpoiret.xyz>2023-07-13 18:58:43 +0200
commitc8799fafa484214f42ff9779a3ed57da7f62481d (patch)
tree1602aeb4278519c84e380ff7ae71c22f4edb0d5b /gnu/packages/cross-base.scm
parentf86de02dde89aff2f0ddddeec3a398a649764dff (diff)
downloadguix-c8799fafa484214f42ff9779a3ed57da7f62481d.tar.gz
gnu: hurd-minimal: Include libshouldbeinlibc and libstore.
* gnu/packages/hurd.scm (hurd-minimal)[inputs]: Add gnumach-headers.
[arguments]: Rewrite to include libshouldbeinlibc and libstore.
* gnu/packages/cross-base.scm (cross-kernel-headers*): Update xhurd-minimal
accordingly: Add xgnumach-headers, add them to cpath, use gexps for
modify-phases, add delete-shared-target phase.

Signed-off-by: Josselin Poiret <dev@jpoiret.xyz>
Diffstat (limited to 'gnu/packages/cross-base.scm')
-rw-r--r--gnu/packages/cross-base.scm26
1 files changed, 20 insertions, 6 deletions
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 21d7277e22..14cb365099 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -1,7 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013-2018, 2020, 2023 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2016, 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2016, 2019, 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2016 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
@@ -541,21 +541,35 @@ the base compiler.  Use XBINUTILS as the associated cross-Binutils."
                   ,(string-append "--host=" target)
                   ,flags))
          ((#:phases phases)
-          `(modify-phases ,phases
+          #~(modify-phases #$phases
+              (add-after 'unpack 'delete-shared-target
+                ;; Cannot create shared libraries due to missing crt1.o
+                (lambda _
+                  (substitute* "Makeconf"
+                    (("(targets := \\$\\(libname\\)\\.a) \\$\\(libname\\)\\.so" all static)
+                     static)
+                    (("\\$\\(DESTDIR\\)\\$\\(libdir\\)/\\$\\(libname\\)\\.so\\.\\$\\(hurd-version\\)")
+                     "")
+                    (("^libs: .*\\.so\\..*" all)
+                     (string-append "# " all)))))
              (add-before 'configure 'set-cross-headers-path
                (lambda* (#:key inputs #:allow-other-keys)
                  (let* ((glibc-headers (assoc-ref inputs "cross-glibc-hurd-headers"))
-                        (cpath (string-append glibc-headers "/include")))
+                        (mach-headers (assoc-ref inputs "cross-gnumach-headers"))
+                        (cpath (string-append glibc-headers "/include"
+                                              ":" mach-headers "/include")))
                    (for-each (cut setenv <> cpath)
-                             ',%gcc-cross-include-paths)
+                             '#$%gcc-cross-include-paths)
                    #t)))))))
 
-      (inputs `(("cross-glibc-hurd-headers" ,xglibc/hurd-headers)))
+      (inputs `(("cross-glibc-hurd-headers" ,xglibc/hurd-headers)
+                ("cross-gnumach-headers" ,xgnumach-headers)))
 
       (native-inputs `(("cross-gcc" ,xgcc)
                        ("cross-binutils" ,xbinutils)
                        ("cross-mig" ,xmig)
-                       ,@(alist-delete "mig"(package-native-inputs hurd-minimal))))))
+                       ,@(alist-delete "mig"
+                                       (package-native-inputs hurd-minimal))))))
 
   (define xhurd-core-headers
     (package