me
/
guix
Archived
1
0
Fork 0

gnu: commencement: glibc-headers-mesboot: Use Gash instead of coreutils&co.

* gnu/packages/commencement.scm (glibc-headers-mesboot): Use Gash instead of
coreutils&co.
master
Jan Nieuwenhuizen 2019-11-22 22:10:16 +01:00
parent 8bf7b70307
commit c8a2128a1f
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
1 changed files with 40 additions and 30 deletions

View File

@ -2394,17 +2394,8 @@ exec " gcc "/bin/" program
(sha256 (sha256
(base32 (base32
"0vlz4x6cgz7h54qq4528q526qlhnsjzbsvgc4iizn76cb0bfanx7"))))) "0vlz4x6cgz7h54qq4528q526qlhnsjzbsvgc4iizn76cb0bfanx7")))))
(native-inputs `(("binutils" ,binutils-mesboot) (native-inputs `(("headers" ,mesboot-headers)
("libc" ,glibc-mesboot0) ,@(%boot-mesboot3-inputs)))
("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)))
(arguments (arguments
(substitute-keyword-arguments (package-arguments glibc-mesboot0) (substitute-keyword-arguments (package-arguments glibc-mesboot0)
((#:configure-flags configure-flags) ((#:configure-flags configure-flags)
@ -2419,13 +2410,21 @@ exec " gcc "/bin/" program
"--with-pthread" "--with-pthread"
"--without-cvs" "--without-cvs"
"--without-gd" "--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) ((#:make-flags make-flags)
`(let ((bash (assoc-ref %build-inputs "bash"))) '(list "install-bootstrap-headers=yes" "install-headers"))
(list (string-append "SHELL=" bash "/bin/sh")
"install-bootstrap-headers=yes" "install-headers")))
((#:phases phases) ((#:phases phases)
`(modify-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 (replace 'setenv
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(let* ((headers (assoc-ref inputs "headers")) (let* ((headers (assoc-ref inputs "headers"))
@ -2442,6 +2441,7 @@ exec " gcc "/bin/" program
(setenv "CPP" (string-append gcc "/bin/gcc -E " cppflags)) (setenv "CPP" (string-append gcc "/bin/gcc -E " cppflags))
(setenv "CC" (string-append gcc "/bin/gcc " cppflags cflags)) (setenv "CC" (string-append gcc "/bin/gcc " cppflags cflags))
(setenv "LD" "gcc")
;; avoid -fstack-protector ;; avoid -fstack-protector
(setenv "libc_cv_ssp" "false") (setenv "libc_cv_ssp" "false")
@ -2452,9 +2452,9 @@ exec " gcc "/bin/" program
(lambda* (#:key outputs make-flags #:allow-other-keys) (lambda* (#:key outputs make-flags #:allow-other-keys)
(let ((kernel-headers (assoc-ref %build-inputs "kernel-headers")) (let ((kernel-headers (assoc-ref %build-inputs "kernel-headers"))
(out (assoc-ref outputs "out"))) (out (assoc-ref outputs "out")))
(apply invoke "make" make-flags) (and (apply invoke "make" make-flags)
(copy-recursively kernel-headers out) (copy-recursively kernel-headers out)
#t))) #t))))
(replace 'configure (replace 'configure
(lambda* (#:key configure-flags #:allow-other-keys) (lambda* (#:key configure-flags #:allow-other-keys)
(format (current-error-port) "running ../configure ~a\n" (string-join configure-flags)) (format (current-error-port) "running ../configure ~a\n" (string-join configure-flags))
@ -2463,18 +2463,28 @@ exec " gcc "/bin/" program
(apply invoke "../configure" configure-flags))) (apply invoke "../configure" configure-flags)))
(add-after 'configure 'remove-sunrpc (add-after 'configure 'remove-sunrpc
(lambda _ (lambda _
(invoke "make" (string-append (getcwd) "/sysd-sorted" ) (let* ((out (assoc-ref %outputs "out"))
(string-append "SHELL=" (getenv "CONFIG_SHELL"))) (bash (assoc-ref %build-inputs "bash"))
(substitute* "sysd-sorted" (shell (string-append bash "/bin/bash")))
((" sunrpc") " ")
((" nis") " ")) (let ((Makefile (open-file "Makefile" "a")))
;; 'rpcgen' needs native libc headers to be built. (display (string-append "
(substitute* "../Makefile"
(("^SHELL := /bin/sh") (string-append "SHELL := " (getenv "CONFIG_SHELL")))) SHELL := " shell "
(substitute* "../Makeconfig" ")
(("^SHELL := /bin/sh") (string-append "SHELL := " (getenv "CONFIG_SHELL")))) Makefile)
(substitute* "../elf/Makefile" (close Makefile))
(("^SHELL := /bin/sh") (string-append "SHELL := " (getenv "CONFIG_SHELL")))))))))))) (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 (define glibc-mesboot
(package (package