janneke pushed a commit to branch wip-hurd
in repository guix.

commit f7804e0f00741a65e7538fe7f3f0cf9844c2165c
Author: Jan Nieuwenhuizen <[email protected]>
AuthorDate: Wed Feb 26 20:22:18 2020 -0500

    gnu: make: Revert to 4.1 for the Hurd.
    
    * gnu/packages/base.scm (gnu-make-4.1): New variable.
    * gnu/packages/commencement.scm (gnu-make-boot0): Use it for the Hurd.
---
 gnu/packages/base.scm         | 29 ++++++++++++++++++++++++++++-
 gnu/packages/commencement.scm | 14 ++++++++++----
 2 files changed, 38 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 13bcf7f..8852ec4 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -6,7 +6,7 @@
 ;;; Copyright © 2014 Alex Kost <[email protected]>
 ;;; Copyright © 2014, 2015 Manolis Fragkiskos Ragkousis <[email protected]>
 ;;; Copyright © 2016, 2017, 2019, 2020 Efraim Flashner <[email protected]>
-;;; Copyright © 2016 Jan Nieuwenhuizen <[email protected]>
+;;; Copyright © 2016, 2020 Jan (janneke) Nieuwenhuizen <[email protected]>
 ;;; Copyright © 2016, 2018 Alex Vong <[email protected]>
 ;;; Copyright © 2017 Rene Saavedra <[email protected]>
 ;;; Copyright © 2017 Mathieu Othacehe <[email protected]>
@@ -396,6 +396,33 @@ change.  GNU make offers many powerful extensions over the 
standard utility.")
    (license gpl3+)
    (home-page "https://www.gnu.org/software/make/";)))
 
+(define-public gnu-make-4.1
+  (package
+    (inherit gnu-make)
+    (version "4.1")
+    (source (origin
+                 (method url-fetch)
+                 (uri (string-append "mirror://gnu/make/make-" version
+                                     ".tar.gz"))
+                 (sha256
+                  (base32
+                   "0madzk1srlf17i2pfdj3dh8kc9jshx8zhj0km81a0bix7mwakiwz"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments gnu-make)
+       ((#:configure-flags flags (if (hurd-target?) 
''("CFLAGS=-D__alloca=alloca") ''()))
+        flags)
+       ((#:phases phases)
+        `(modify-phases ,phases
+           (replace 'set-default-shell
+                     (lambda* (#:key inputs #:allow-other-keys)
+                       ;; Change the default shell from /bin/sh.
+                       (let ((bash (assoc-ref inputs "bash")))
+                         (substitute* "job.c"
+                           (("default_shell =.*$")
+                            (format #f "default_shell = \"~a/bin/sh\";\n"
+                                    bash)))
+                         #t)))))))))
+
 (define-public binutils
   (package
    (name "binutils")
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index cebb4b5..9524748 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2497,14 +2497,20 @@ exec " gcc "/bin/" program
 (define gnu-make-boot0
   (package
     (inherit gnu-make)
-    (source (bootstrap-origin (package-source gnu-make)))
+    (version (if (hurd-system?) "4.1"
+                 (package-version gnu-make)))
+    (source (if (hurd-system?)
+                (bootstrap-origin (package-source gnu-make-4.1))
+                (bootstrap-origin (package-source gnu-make))))
     (name "make-boot0")
     (arguments
      `(#:guile ,%bootstrap-guile
        #:implicit-inputs? #f
-       #:tests? #f                                ; cannot run "make check"
-       ,@(substitute-keyword-arguments (package-arguments gnu-make)
-           ((#:configure-flags flags ''())
+       #:tests? #f                      ; cannot run "make check"
+       ,@(substitute-keyword-arguments
+             (package-arguments (if (hurd-system?) gnu-make-4.1 gnu-make))
+           ((#:configure-flags flags (if (hurd-system?) 
''("CFLAGS=-D__alloca=alloca")
+                                         ''()))
             ;; The generated config.status has some problems due to the
             ;; bootstrap environment.  Disable dependency tracking to work
             ;; around it.

Reply via email to