guix_mirror_bot pushed a commit to branch wip-riscv-bootstrap
in repository guix.

commit ae3b592f8214a457a7e2a52acd79c3c31ebd3321
Author: Efraim Flashner <efr...@flashner.co.il>
AuthorDate: Wed Oct 9 14:03:41 2024 +0300

    gnu: Add oksh-muslboot0.
    
    * gnu/packages/commencement.scm (oksh-muslboot0): New variable.
    
    Change-Id: I37bf7ac4c3cac842c217c297f257e8143fb2eaf8
---
 gnu/packages/commencement.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index fda79ac9e3..9785c09113 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -1095,6 +1095,36 @@ MesCC-Tools), and finally M2-Planet.")
                     "-o" "tcc"
                     "tcc.c"))))))))))
 
+;; Gash served us well, but there are known issues on riscv64.
+;; OpenBSD's ksh will do just fine as a replacement until we get to bash.
+(define oksh-muslboot0
+  (package
+    (inherit oksh)
+    (source (bootstrap-origin (package-source oksh)))
+    (arguments
+     (list
+       #:implicit-inputs? #f
+       #:guile %bootstrap-guile
+       #:tests? #f                  ; No tests.
+       #:strip-binaries? #f         ; No strip yet.
+       #:parallel-build? #f         ; Race conditions.
+       #:configure-flags
+       #~(list "--cc=tcc"
+               "--enable-static")
+       #:phases
+       #~(modify-phases %standard-phases
+           ;; make: install: Command not found
+           (replace 'install
+             (lambda _
+               (install-file "oksh" (string-append %output "/bin"))
+               (install-file "oksh.1" (string-append %output 
"/share/man/man1"))
+               ;; For compatibility and ease of use in later builds.
+               (symlink "oksh" (string-append %output "/bin/sh"))
+               (symlink "oksh" (string-append %output "/bin/bash"))))
+           (delete 'compress-documentation))))
+    (native-inputs (modify-inputs (package-native-inputs tcc-musl)
+                                  (replace "tcc" tcc-musl)))))
+
 (define binutils-mesboot0
   ;; The initial Binutils
   (package

Reply via email to