guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

47/94: Add oksh-muslboot0.


From: guix-commits
Subject: 47/94: Add oksh-muslboot0.
Date: Mon, 21 Oct 2024 08:40:47 -0400 (EDT)

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

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

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

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 37b418707a..c13b93c339 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -1070,6 +1070,37 @@ 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
+     (substitute-keyword-arguments (package-arguments oksh)
+       ((#:implicit-inputs? _ #t) #f)
+       ((#:guile _ %bootstrap-guile) %bootstrap-guile)
+       ((#:tests? _ #t) #f)             ; No tests.
+       ((#:strip-binaries? _ #t) #f)
+       ((#:parallel-build? _ #t) #f)    ; Race conditions.
+       ((#:configure-flags cf #~'())
+        #~(cons* "--cc=tcc"
+                 "--enable-static"
+                 #$cf))
+       ((#:phases phases #~%standard-phases)
+        #~(modify-phases #$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

[Prev in Thread] Current Thread [Next in Thread]