[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
191/211: gnu: glibc-headers-mesboot: Cleanup.
From: |
Jan Nieuwenhuizen |
Subject: |
191/211: gnu: glibc-headers-mesboot: Cleanup. |
Date: |
Sat, 8 Sep 2018 11:09:55 -0400 (EDT) |
janneke pushed a commit to branch wip-bootstrap
in repository guix.
commit 6d65337cb9eccd8edb65fc144d9f6e89ef86b34a
Author: Jan Nieuwenhuizen <address@hidden>
Date: Mon Sep 3 17:44:18 2018 +0200
gnu: glibc-headers-mesboot: Cleanup.
* gnu/packages/commencement.scm (glibc-headers-mesboot): Cleanup.
---
gnu/packages/commencement.scm | 186 +++++++++++++++++++-----------------------
1 file changed, 85 insertions(+), 101 deletions(-)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 5cfdcf1..6613887 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -1294,7 +1294,7 @@ exec " gcc "/bin/" program
(define-public glibc-headers-mesboot
(package-with-bootstrap-guile
(package
- (inherit glibc)
+ (inherit glibc-mesboot0)
(name "glibc-headers-mesboot")
(version "2.16.0")
(source (origin
@@ -1307,116 +1307,100 @@ exec " gcc "/bin/" program
(sha256
(base32
"0vlz4x6cgz7h54qq4528q526qlhnsjzbsvgc4iizn76cb0bfanx7"))))
- (supported-systems '("i686-linux"))
- (inputs '())
- (propagated-inputs '())
(native-inputs `(("binutils" ,binutils-mesboot)
("libc" ,glibc-mesboot0)
("gcc" ,gcc-mesboot)
("headers" ,mesboot-headers)
+ ("bash" ,%bootstrap-coreutils&co)
("coreutils" ,%bootstrap-coreutils&co)
("diffutils" ,diffutils-mesboot)
("kernel-headers" ,%bootstrap-linux-libre-headers)
("make" ,make-mesboot)))
- (outputs '("out"))
- (arguments
- `(#:implicit-inputs? #f
- #:guile ,%bootstrap-guile
- #:tests? #f
- #:strip-binaries? #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")
- "install-bootstrap-headers=yes" "install-headers")
- #:configure-flags
- (let ((out (assoc-ref %outputs "out"))
- (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"
- "--with-pthread"
- "--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"))
- (coreutils (assoc-ref %build-inputs "coreutils"))
- (libc (assoc-ref %build-inputs "libc"))
- (gcc (assoc-ref %build-inputs "gcc"))
- (cppflags (string-append
- " -I " libc "/include"
- " -I " headers "/include"
- " -D BOOTSTRAP_GLIBC=1"
- " -Dsize_t=int -Dwchar_t=int"
- ))
- (cflags (string-append " -L " (getcwd)
- " -L " libc "/lib")))
- (setenv "libc_cv_friendly_stddef" "yes")
- (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")))))
- (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))))
- ;; glibc-2.2.5 needs a slightly more classical invocation of
configure
- ;; configure: warning:
CONFIG_SHELL=/gnu/store/kpxi8h3669afr9r1bgvaf9ij3y4wdyyn-bash-minimal-4.4.12/bin/bash:
invalid host type
- (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")
- (zero?
- (apply system* "../configure" configure-flags))))
- (add-after 'configure 'remove-sunrpc
- (lambda _
- (invoke "make" (string-append (getcwd) "/sysd-sorted" )
- (string-append "SHELL=" (getenv "CONFIG_SHELL")))
- (system* "ls" "-ltrF" "." "build")
- (substitute* "sysd-sorted"
- ((" sunrpc ") " "))
- (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"))))))))))))
+ (arguments
+ `(,@(substitute-keyword-arguments (package-arguments glibc-mesboot0)
+ ((#:configure-flags configure-flags)
+ `(let ((out (assoc-ref %outputs "out"))
+ (headers (assoc-ref %build-inputs "headers")))
+ (list
+ (string-append "--prefix=" out)
+ "--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"
+ "--with-pthread"
+ "--without-cvs"
+ "--without-gd"
+ "--enable-add-ons=nptl")))
+ ((#:make-flags make-flags)
+ `(let ((bash (assoc-ref %build-inputs "bash")))
+ (list (string-append "SHELL=" bash "/bin/sh")
+ "install-bootstrap-headers=yes" "install-headers")))
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (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"))
+ (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 "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 "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")))))
+ (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))))
+ (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 '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.
+ ;; (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"))))))))))))))
(define-public glibc-mesboot
(package-with-bootstrap-guile
- 181/211: gnu: diffutils-mesboot: Cleanup., (continued)
- 181/211: gnu: diffutils-mesboot: Cleanup., Jan Nieuwenhuizen, 2018/09/08
- 162/211: gnu: Add glibc-mesboot 2.3.6. WIP, Jan Nieuwenhuizen, 2018/09/08
- 185/211: gnu: glibc-mesboot0: Cleanup., Jan Nieuwenhuizen, 2018/09/08
- 207/211: gnu: bison-boot0: Remove bootstrap leaks., Jan Nieuwenhuizen, 2018/09/08
- 193/211: gnu: glibc-mesboot: Oops, install everything., Jan Nieuwenhuizen, 2018/09/08
- 189/211: gnu: make-mesboot: Cleanup., Jan Nieuwenhuizen, 2018/09/08
- 172/211: copy-linux-headers: Update for glibc-2.16.0., Jan Nieuwenhuizen, 2018/09/08
- 198/211: gnu: Add gcc-mesboot-4.9.4., Jan Nieuwenhuizen, 2018/09/08
- 202/211: gnu: libstdc++-boot0: Copy libstdc++.so.6.0.20 to pass install., Jan Nieuwenhuizen, 2018/09/08
- 145/211: bootstrap: Integrate mes bootstrap for i686-linux., Jan Nieuwenhuizen, 2018/09/08
- 191/211: gnu: glibc-headers-mesboot: Cleanup.,
Jan Nieuwenhuizen <=
- 192/211: gnu: glibc-mesboot: Cleanup., Jan Nieuwenhuizen, 2018/09/08
- 194/211: oops: fixup glibc-bootstrap-system-2.16.0.patch name., Jan Nieuwenhuizen, 2018/09/08
- 179/211: gnu: tcc-boot: Cleanup., Jan Nieuwenhuizen, 2018/09/08
- 171/211: %bootstrap-linux-libre-headers: Update, Jan Nieuwenhuizen, 2018/09/08
- 195/211: glibc-mesboot: do not validate runpath, Jan Nieuwenhuizen, 2018/09/08
- 170/211: gnu: make-mesboot: Update to 3.82., Jan Nieuwenhuizen, 2018/09/08
- 160/211: gnu: Add mpc-boot 1.0.3., Jan Nieuwenhuizen, 2018/09/08
- 163/211: Add new cheat: use %bootstrap-glibc for x86 for now., Jan Nieuwenhuizen, 2018/09/08
- 174/211: gnu: glibc-mesboot: Update to 2.16.0., Jan Nieuwenhuizen, 2018/09/08
- 95/211: gnu: binutils-boot: Update to 2.20.1a., Jan Nieuwenhuizen, 2018/09/08