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

commit 02f640046fac80a4877c9326f17019fc8ebdbf49
Author: Efraim Flashner <[email protected]>
AuthorDate: Mon Dec 16 09:33:15 2024 +0200

    gnu: m4-boot0: Downgrade to 1.4.18.
    
    * gnu/packages/commencement.scm (m4-boot0): Downgrade to 1.4.18.
    [arguments]: Don't inherit from m4.  Add a phase to patch shell
    invocations in the tests.  Add a phase when building for riscv64-linux
    to skip a few tests.
    
    Change-Id: Ide87b1dceec6a6a95a750e4cd561d7be166ffee2
---
 gnu/packages/commencement.scm | 27 +++++++++++++++++++++++++--
 1 file changed, 25 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 408a413807..18ab430c87 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -3401,12 +3401,35 @@ exec " gcc "/bin/" program
   (package
     (inherit m4)
     (name "m4-boot0")
-    (source (bootstrap-origin (package-source m4)))
+    (version "1.4.18")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://gnu/m4/m4-" version ".tar.gz"))
+              (sha256
+               (base32 
"1arz972zxmwhnyik9007g6ww9gars8d55xbvg548xlsw3a9369mb"))))
     (inputs (%boot0-inputs))
     (arguments
      `(#:guile ,%bootstrap-guile
        #:implicit-inputs? #f
-       ,@(package-arguments m4)
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'pre-check
+           (lambda* (#:key inputs #:allow-other-keys)
+             (for-each patch-shebang (find-files "tests" "\\.sh$"))
+             (substitute* (find-files "tests" "posix_spawn")
+               (("/bin/sh")
+                (search-input-file inputs "/bin/sh")))))
+         ;; Better to skip some tests instead of all the tests.
+         ,@(if (target-riscv64?)
+               `((add-after 'unpack 'skip-some-tests
+                   (lambda _
+                     (substitute* "tests/Makefile.in"
+                       (("test-canonicalize-lgpl\\$\\(EXEEXT\\) ") "")
+                       (("test-localename\\$\\(EXEEXT\\) ") "")
+                       (("test-mbrtowc5.sh ") "")
+                       (("test-sigprocmask\\$\\(EXEEXT\\) ") "")
+                       ))))
+               `()))
        ;; Ignore test failure in gnulib for armhf/aarch64 and Hurd
        #:tests? ,(and (not (target-arm?))
                       (not (target-hurd?)))))))

Reply via email to