[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
26/35: bootstrap: Add bash-mesboot0.
From: |
guix-commits |
Subject: |
26/35: bootstrap: Add bash-mesboot0. |
Date: |
Wed, 20 Nov 2019 15:19:40 -0500 (EST) |
janneke pushed a commit to branch wip-bootstrap
in repository guix.
commit 8d8bdb94390b70a182775d5da06295db5b72fba4
Author: Jan Nieuwenhuizen <address@hidden>
Date: Sun Sep 22 00:53:54 2019 +0200
bootstrap: Add bash-mesboot0.
* gnu/packages/commencement.scm (bash-mesboot0): New variable.
---
gnu/packages/commencement.scm | 107 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 107 insertions(+)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 9eb2ad8..ab91582 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -635,6 +635,113 @@
(copy-file "libtcc1.a" (string-append out
"/lib/tcc/libtcc1.a"))
#t)))))))))
+(define bash-mesboot0
+ ;; The initial Bash
+ (package-with-bootstrap-guile
+ (package
+ (inherit static-bash)
+ (name "bash-mesboot0")
+ (version "2.05b")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/bash/bash-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1r1z2qdw3rz668nxrzwa14vk2zcn00hw7mpjn384picck49d80xs"))))
+ (inputs '())
+ (propagated-inputs '())
+ (native-inputs
+ `(("bash" , %bootstrap-gash)
+ ("guile" ,%bootstrap-guile)
+ ("gzip" ,gzip-mesboot0)
+ ("make" ,make-mesboot0)
+ ("tcc" ,tcc-boot0)))
+ (outputs '("out"))
+ (arguments
+ `(#:implicit-inputs? #f
+ #:guile ,%bootstrap-guile
+ #:parallel-build? #f
+ #:strip-binaries? #f ; no strip yet
+ #:configure-flags (list "--build=i686-unknown-linux-gnu"
+ "--host=i686-unknown-linux-gnu"
+
+ "--without-bash-malloc"
+ "--disable-readline"
+ "--disable-history"
+ "--disable-help-builtin"
+ "--disable-progcomp"
+ "--disable-net-redirections"
+ "--disable-nls"
+
+ ;; Pretend 'dlopen' is missing so we don't
build loadable
+ ;; modules and related code.
+ "ac_cv_func_dlopen=no")
+ #:make-flags '("bash")
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'setenv
+ (lambda _
+ (let* ((gash (assoc-ref %build-inputs "bash"))
+ (shell (string-append gash "/bin/gash")))
+ (setenv "CONFIG_SHELL" shell)
+ (setenv "SHELL" shell)
+ (setenv "CC" "tcc")
+ (setenv "LD" "tcc")
+ (setenv "AR" "tcc -ar")
+ (setenv "CFLAGS" "-D _POSIX_VERSION=1")
+ #t)))
+ (add-after 'unpack 'scripted-patch
+ (lambda _
+ (substitute* "Makefile.in"
+ (("mksyntax\\.c\n") "mksyntax.c -lgetopt\n")
+ (("buildversion[.]o\n") "buildversion.o -lgetopt\n")
+ ;; No size in Gash
+ (("\tsize ") "#\tsize"))
+ (substitute* "lib/sh/oslib.c"
+ (("int name, namelen;") "char *name; int namelen;"))
+ (substitute* "lib/sh/snprintf.c"
+ (("^#if (defined [(]HAVE_LOCALE_H[)])" all define)
(string-append "#if 0 //" define)))
+ (substitute* "configure"
+ ((" egrep") " grep"))
+ #t))
+ (replace 'configure
+ (lambda* (#:key configure-flags #:allow-other-keys)
+ (let ((configure-flags (filter (lambda (x)
+ (and (not (string-prefix?
"CONFIG_SHELL=" x))
+ (not (string-prefix?
"SHELL=" x))))
+ configure-flags)))
+ (format (current-error-port)
+ "running ./configure ~a\n" (string-join
configure-flags)))
+ (apply invoke (cons "./configure" configure-flags))))
+ (add-after 'configure 'configure-fixups
+ (lambda _
+ (substitute* "config.h"
+ (("#define GETCWD_BROKEN 1") "#undef GETCWD_BROKEN"))
+ (let ((config.h (open-file "config.h" "a")))
+ (display (string-append "
+// tcc: error: undefined symbol 'enable_hostname_completion'
+#define enable_hostname_completion(on_or_off) 0
+
+//
/gnu/store/cq0cmv35s9dhilx14zaghlc08gpc0hwr-tcc-boot0-0.9.26-6.c004e9a/lib/libc.a:
error: 'sigprocmask' defined twice
+#define HAVE_POSIX_SIGNALS 1
+#define endpwent(x) 0
+")
+ config.h)
+ (close config.h))
+ #t))
+ (replace 'check
+ (lambda _
+ (invoke "./bash" "--version")))
+ (replace 'install
+ (lambda _
+ (let* ((out (assoc-ref %outputs "out"))
+ (bin (string-append out "/bin")))
+ (mkdir-p bin)
+ (copy-file "bash" (string-append bin "/bash"))
+ (copy-file "bash" (string-append bin "/sh"))
+ #t)))))))))
+
(define diffutils-mesboot
(package-with-bootstrap-guile
(package
- 19/35: bootstrap: nyacc-boot. WIP, (continued)
- 19/35: bootstrap: nyacc-boot. WIP, guix-commits, 2019/11/20
- 08/35: gnu: mescc-tools: Update to 0.6.1., guix-commits, 2019/11/20
- 10/35: gnu: mes: Update to 0.21 WIP, guix-commits, 2019/11/20
- 14/35: bootstrap: bootstrap-mescc-tools: Update for mescc-tools-0.6.1., guix-commits, 2019/11/20
- 17/35: bootstrap-mes, guix-commits, 2019/11/20
- 18/35: gnu: mes: Update to 0.20 WIP, guix-commits, 2019/11/20
- 20/35: bootstrap: mes-boot: Scheme-only bootstrap. WIP, guix-commits, 2019/11/20
- 22/35: bootstrap-gash-rewire? WIP, guix-commits, 2019/11/20
- 24/35: bootstrap: make-mesboot0: Scheme-only bootstrap., guix-commits, 2019/11/20
- 25/35: bootstrap: Add bzip2-mesboot0., guix-commits, 2019/11/20
- 26/35: bootstrap: Add bash-mesboot0.,
guix-commits <=
- 27/35: bootstrap: tcc-boot: Scheme-only bootstrap., guix-commits, 2019/11/20
- 30/35: bootstrap: Add sed-mesboot0., guix-commits, 2019/11/20
- 23/35: bootstrap: Add gzip-mesboot0., guix-commits, 2019/11/20
- 21/35: bootstrap: tcc-boot0: Scheme-only bootstrap. WIP, guix-commits, 2019/11/20
- 28/35: bootstrap: diffuils-mesboot: Scheme-only bootstrap., guix-commits, 2019/11/20
- 32/35: bootstrap: gcc-core-mesboot0: Scheme-only bootstrap., guix-commits, 2019/11/20
- 31/35: bootstrap: binutils-mesboot0: Scheme-only bootstrap., guix-commits, 2019/11/20
- 29/35: bootstrap: Add patch-mesboot0., guix-commits, 2019/11/20
- 33/35: bootstrap: Add gawk-mesboot0., guix-commits, 2019/11/20
- 34/35: bootstrap: Add bash-mesboot1., guix-commits, 2019/11/20