[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
50/70: bootstrap: glibc-headers-mesboot: Use Gash instead of coreutils&c
From: |
guix-commits |
Subject: |
50/70: bootstrap: glibc-headers-mesboot: Use Gash instead of coreutils&co. |
Date: |
Wed, 11 Dec 2019 13:03:25 -0500 (EST) |
janneke pushed a commit to branch wip-bootstrap
in repository guix.
commit 1a5e8dcd5c11378faa36327731e21b8180d8a12c
Author: Jan Nieuwenhuizen <address@hidden>
Date: Fri Nov 22 22:10:16 2019 +0100
bootstrap: glibc-headers-mesboot: Use Gash instead of coreutils&co.
* gnu/packages/commencement.scm (glibc-headers-mesboot): Use Gash instead of
coreutils&co.
---
gnu/packages/commencement.scm | 81 +++++++++++++++++++++++--------------------
1 file changed, 44 insertions(+), 37 deletions(-)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 5b2251d..b217a82 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2466,17 +2466,8 @@ exec " gcc "/bin/" program
(sha256
(base32
"0vlz4x6cgz7h54qq4528q526qlhnsjzbsvgc4iizn76cb0bfanx7")))))
- (native-inputs `(("binutils" ,binutils-mesboot)
- ("libc" ,glibc-mesboot0)
- ("gcc" ,gcc-mesboot1)
- ("headers" ,mesboot-headers)
-
- ("bash" ,%bootstrap-coreutils&co)
- ("coreutils" ,%bootstrap-coreutils&co)
- ("diffutils" ,diffutils-mesboot)
- ("kernel-headers" ,%bootstrap-linux-libre-headers)
- ("make" ,make-mesboot)))
-
+ (native-inputs `(("headers" ,mesboot-headers)
+ ,@(%boot-mesboot3-inputs)))
(arguments
(substitute-keyword-arguments (package-arguments glibc-mesboot0)
((#:configure-flags configure-flags)
@@ -2491,18 +2482,27 @@ exec " gcc "/bin/" program
"--with-pthread"
"--without-cvs"
"--without-gd"
- "--enable-add-ons=nptl")))
+ "--enable-add-ons=nptl"
+ ;; avoid: configure: error: confusing output from nm -u
+ "libc_cv_predef_stack_protector=no")))
((#:make-flags make-flags)
- `(let ((bash (assoc-ref %build-inputs "bash")))
- (list (string-append "SHELL=" bash "/bin/sh")
- "install-bootstrap-headers=yes" "install-headers")))
+ '(list "install-bootstrap-headers=yes" "install-headers"))
((#:phases phases)
`(modify-phases ,phases
+ (delete 'apply-boot-patch)
+ (delete 'fixup-configure)
+ (delete 'set-path)
+ (replace 'unpack
+ (lambda* (#:key source #:allow-other-keys)
+ (invoke "tar" "xvf" source)
+ (chdir (string-append "glibc-" ,version))
+ #t))
(replace 'setenv
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(headers (assoc-ref %build-inputs "headers"))
(bash (assoc-ref %build-inputs "bash"))
+ (shell (string-append bash "/bin/bash"))
(coreutils (assoc-ref %build-inputs "coreutils"))
(libc (assoc-ref %build-inputs "libc"))
(gcc (assoc-ref %build-inputs "gcc"))
@@ -2512,28 +2512,25 @@ exec " gcc "/bin/" program
(cflags (string-append " -L " (getcwd)
" -L " libc "/lib")))
(setenv "libc_cv_friendly_stddef" "yes")
- (setenv "CONFIG_SHELL" (string-append bash "/bin/sh"))
- (setenv "SHELL" (getenv "CONFIG_SHELL"))
- (format (current-error-port) "CONFIG_SHELL=~s\n" (getenv
"CONFIG_SHELL"))
-
+ (setenv "CONFIG_SHELL" shell)
+ (setenv "SHELL" shell)
(setenv "CPP" (string-append gcc "/bin/gcc -E " cppflags))
(setenv "CC" (string-append gcc "/bin/gcc " cppflags cflags))
-
+ (setenv "LD" "gcc")
;; 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)))
+ (setenv "LIBRARY_PATH" (string-append libc "/lib")))))
(replace 'install
(lambda* (#:key outputs make-flags #:allow-other-keys)
(let ((kernel-headers (assoc-ref %build-inputs
"kernel-headers"))
(out (assoc-ref outputs "out")))
- (apply invoke "make" make-flags)
- (copy-recursively kernel-headers out)
- #t)))
+ (and (apply invoke "make" make-flags)
+ (copy-recursively kernel-headers out)
+ #t))))
(replace 'configure
(lambda* (#:key configure-flags #:allow-other-keys)
(format (current-error-port) "running ../configure ~a\n"
(string-join configure-flags))
@@ -2542,18 +2539,28 @@ exec " gcc "/bin/" program
(apply invoke "../configure" configure-flags)))
(add-after 'configure 'remove-sunrpc
(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.
- (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"))))))))))))
+ (let* ((out (assoc-ref %outputs "out"))
+ (bash (assoc-ref %build-inputs "bash"))
+ (shell (string-append bash "/bin/bash")))
+
+ (let ((Makefile (open-file "Makefile" "a")))
+ (display (string-append "
+
+SHELL := " shell "
+")
+ Makefile)
+ (close Makefile))
+ (substitute* "../Makefile"
+ (("^SHELL := /bin/sh") (string-append "SHELL := " shell)))
+ (substitute* "../Makeconfig"
+ (("^SHELL := /bin/sh") (string-append "SHELL := " shell)))
+ (substitute* "../elf/Makefile"
+ (("^SHELL := /bin/sh") (string-append "SHELL := " shell)))
+ (invoke "make" (string-append (getcwd) "/sysd-sorted" ))
+ (substitute* "sysd-sorted"
+ ((" sunrpc") " ")
+ ((" nis") " "))
+ #t)))))))))
(define glibc-mesboot
(package
- 33/70: bootstrap: mesboot-headers: Use Gash instead of coretutils&co., (continued)
- 33/70: bootstrap: mesboot-headers: Use Gash instead of coretutils&co., guix-commits, 2019/12/11
- 36/70: bootstrap: Add tar-mesboot., guix-commits, 2019/12/11
- 38/70: bootstrap: Add binutils-mesboot1., guix-commits, 2019/12/11
- 40/70: bootstrap: Add make-mesboot., guix-commits, 2019/12/11
- 47/70: bootstrap: Add xz-mesboot., guix-commits, 2019/12/11
- 42/70: bootstrap: Add sed-mesboot., guix-commits, 2019/12/11
- 45/70: bootstrap: Add gcc-mesboot1: Scheme-only bootstrap., guix-commits, 2019/12/11
- 44/70: bootstrap: Add bash-mesboot., guix-commits, 2019/12/11
- 48/70: bootstrap: Add hello-mesboot., guix-commits, 2019/12/11
- 53/70: bootstrap: gcc-mesboot1-wrapper: Use Gash instead of coreutils&co., guix-commits, 2019/12/11
- 50/70: bootstrap: glibc-headers-mesboot: Use Gash instead of coreutils&co.,
guix-commits <=
- 65/70: bootstrap: Add bzip2-boot0., guix-commits, 2019/12/11
- 57/70: bootstrap: Remove m4-mesboot., guix-commits, 2019/12/11
- 58/70: bootstrap: %bootstrap-inputs+toolchain: Use Gash instead of coreutils&co., guix-commits, 2019/12/11
- 55/70: bootstrap: gcc-mesboot-wrapper: Use Gash instead of coreutils&co., guix-commits, 2019/12/11
- 54/70: bootstrap: gcc-mesboot: Use Gash instead of coreutils&co., guix-commits, 2019/12/11
- 61/70: bootstrap: Remove %bootstrap-coreutils&co, %bootstrap-bash., guix-commits, 2019/12/11
- 51/70: bootstrap: glibc-mesboot: Scheme-only bootstrap., guix-commits, 2019/12/11
- 59/70: bootstrap: Add gawk-boot0., guix-commits, 2019/12/11
- 66/70: bootstrap: Add tar-boot0., guix-commits, 2019/12/11
- 69/70: bootstrap: coreutils-final: Inherit from coreutils-minimal., guix-commits, 2019/12/11