guix-commits
[Top][All Lists]
Advanced

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

192/210: gnu: glibc-mesboot: Cleanup.


From: Jan Nieuwenhuizen
Subject: 192/210: gnu: glibc-mesboot: Cleanup.
Date: Sat, 8 Sep 2018 10:36:34 -0400 (EDT)

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

commit 866ff8473da33fc044f7baea113f4e3040b23fed
Author: Jan Nieuwenhuizen <address@hidden>
Date:   Mon Sep 3 19:11:45 2018 +0200

    gnu: glibc-mesboot: Cleanup.
    
    * gnu/packages/commencement.scm (glibc-mesboot): Cleanup.
---
 gnu/packages/commencement.scm | 104 +++---------------------------------------
 1 file changed, 6 insertions(+), 98 deletions(-)

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 6613887..d72b24e 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -1412,109 +1412,17 @@ exec " gcc "/bin/" program
                       ("headers" ,glibc-headers-mesboot)
                       ("gcc" ,gcc-mesboot)
 
+                      ("bash" ,%bootstrap-coreutils&co)
                       ("coreutils" ,%bootstrap-coreutils&co)
                       ("diffutils" ,diffutils-mesboot)
                       ("kernel-headers" ,%bootstrap-linux-libre-headers)
                       ("make" ,make-mesboot)))
-     (arguments
-      `(#:implicit-inputs? #f
-        #:guile ,%bootstrap-guile
-        #:tests? #f
-        #:strip-binaries? #f
-        #:validate-runpath? #f
-        #:parallel-build? #f    ; gcc-2.95.3 ICEs on massively parallel builds
-        #:make-flags (list (string-append
-                            "SHELL="
-                            (assoc-ref %build-inputs "coreutils")
-                            "/bin/sh"))
-        #:configure-flags
-        (let ((out (assoc-ref %outputs "out"))
-              (libc (assoc-ref %build-inputs "libc"))
-              (headers (assoc-ref %build-inputs "headers")))
-          (list
-           "--disable-obsolete-rpc"
-           "--disable-sanity-checks"
-           "--build=i686-unknown-linux-gnu"
-           "--host=i686-unknown-linux-gnu"
-           (string-append "--with-headers=" headers "/include")
-           "--enable-static-nss"
-           "--without-cvs"
-           "--without-gd"
-           "--enable-add-ons=nptl"
-           (string-append "--prefix=" out)))
-        #:phases
-        (modify-phases %standard-phases
-          (add-before 'configure 'setenv
-            (lambda* (#:key outputs #:allow-other-keys)
-              (let* ((out (assoc-ref outputs "out"))
-                     (headers (assoc-ref %build-inputs "headers"))
-                     (kernel-headers (assoc-ref %build-inputs 
"kernel-headers"))
-                     (coreutils (assoc-ref %build-inputs "coreutils"))
-                     (libc (assoc-ref %build-inputs "libc"))
-                     (gcc (assoc-ref %build-inputs "gcc"))
-                     (cppflags (string-append
-                                " -I " (getcwd) "/nptl/sysdeps/pthread/bits"
-                                " -D BOOTSTRAP_GLIBC=1"))
-                     (cflags (string-append " -L " (getcwd)
-                                            " -L " libc "/lib")))
-                (setenv "CONFIG_SHELL" (string-append
-                                        (assoc-ref %build-inputs "coreutils")
-                                        "/bin/sh"))
-                (setenv "SHELL" (getenv "CONFIG_SHELL"))
-                (format (current-error-port) "CONFIG_SHELL=~s\n" (getenv 
"CONFIG_SHELL"))
-
-                (setenv "PATH"
-                        (string-append
-                         (assoc-ref %build-inputs "coreutils") "/bin"
-                         ":" (assoc-ref %build-inputs "binutils") "/bin"
-                         ":" (assoc-ref %build-inputs "gcc") "/bin"
-                         ":" (assoc-ref %build-inputs "diffutils") "/bin"
-                         ":" (assoc-ref %build-inputs "make") "/bin"))
 
-                (setenv "CPP" (string-append gcc "/bin/gcc -E " cppflags))
-                (setenv "CC" (string-append gcc "/bin/gcc " cppflags cflags))
-
-                ;; avoid -fstack-protector
-                (setenv "libc_cv_ssp" "false")
-                (substitute* "configure"
-                  (("/bin/pwd") (string-append coreutils "/bin/pwd")))
-                (setenv "C_INCLUDE_PATH" (string-append libc "/include"
-                                                        headers "/include"))
-                (setenv "LIBRARY_PATH" (string-append libc "/lib"))
-                #t)))
-          (replace 'configure
-            (lambda* (#:key configure-flags #:allow-other-keys)
-              (format (current-error-port) "running ../configure ~a\n" 
(string-join configure-flags))
-              (mkdir-p "build")
-              (chdir "build")
-              (apply invoke "../configure" configure-flags)))
-          (add-after 'configure 'fixup-/bin/sh
-            (lambda _
-              (invoke "make" (string-append (getcwd) "/sysd-sorted" )
-                      (string-append "SHELL=" (getenv "CONFIG_SHELL")))
-              (substitute* "sysd-sorted"
-                ((" sunrpc ") " ")
-                ((" nis ") " "))
-              ;; 'rpcgen' needs native libc headers to be built.
-              (let ((libc (assoc-ref %build-inputs "libc")))
-                (substitute* "../sunrpc/Makefile"
-                  (("sunrpc-CPPFLAGS =.*")
-                   (string-append "sunrpc-CPPFLAGS ="
-                                  " -I" libc "/include\n"))))
-              (substitute* "../Makefile"
-                (("^SHELL := /bin/sh") (string-append "SHELL := " (getenv 
"CONFIG_SHELL"))))
-              (substitute* "../Makeconfig"
-                (("^SHELL := /bin/sh") (string-append "SHELL := " (getenv 
"CONFIG_SHELL"))))
-              (substitute* "../elf/Makefile"
-                (("^SHELL := /bin/sh") (string-append "SHELL := " (getenv 
"CONFIG_SHELL"))))
-              #t))
-          (replace 'install
-            (lambda* (#:key outputs make-flags #:allow-other-keys)
-              (let ((kernel-headers (assoc-ref %build-inputs "kernel-headers"))
-                    (out (assoc-ref outputs "out")))
-                (and (apply invoke "make" make-flags)
-                     (copy-recursively kernel-headers out)
-                     #t))))))))))
+     (arguments
+      `(,@(substitute-keyword-arguments (package-arguments 
glibc-headers-mesboot)
+            ((#:make-flags make-flags)
+             `(let ((bash (assoc-ref %build-inputs "bash")))
+                (list (string-append "SHELL=" bash "/bin/sh"))))))))))
 
 (define-public m4-mesboot
   (package-with-bootstrap-guile



reply via email to

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