guix-commits
[Top][All Lists]
Advanced

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

27/54: bootstrap: Add bash-mesboot1.


From: guix-commits
Subject: 27/54: bootstrap: Add bash-mesboot1.
Date: Fri, 22 Nov 2019 18:17:52 -0500 (EST)

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

commit 98531d0721986dadfc01fd48bc8069b273895618
Author: Jan Nieuwenhuizen <address@hidden>
Date:   Sun Oct 6 22:52:08 2019 +0200

    bootstrap: Add bash-mesboot1.
    
    * gnu/packages/commencement.scm (bash-mesboot1): New variable.
---
 gnu/packages/commencement.scm | 88 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 88 insertions(+)

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 6df1a15..c813020 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -1232,6 +1232,94 @@ ac_cv_c_float_format='IEEE (little-endian)'
                (symlink "gawk" (string-append bin "/awk"))
                #t))))))))
 
+(define bash-mesboot1
+  (package
+    (inherit static-bash)
+    (version "4.4")
+    (name "bash-mesboot1")
+    (source (bootstrap-origin
+             (origin
+               (method url-fetch)
+               (uri (string-append "mirror://gnu/bash/bash-"
+                                   version ".tar.gz"))
+               (sha256
+                (base32
+                 "1jyz6snd63xjn6skk7za6psgidsd53k05cr3lksqybi0q6936syq")))))
+    (inputs '())
+    (propagated-inputs '())
+    (native-inputs `(("bash" ,bash-mesboot0)
+                     ("gawk" ,gawk-mesboot0)
+                     ("gzip" ,gzip-mesboot0)
+                     ("make" ,make-mesboot0)
+                     ("sed" ,sed-mesboot0)
+                     ("tcc" ,tcc-boot0)
+
+                     ("gash" , %bootstrap-gash)
+                     ("guile" ,%bootstrap-guile)))
+    (outputs '("out"))
+    (arguments
+     `(#:implicit-inputs? #f
+       #:guile ,%bootstrap-guile
+       #:parallel-build? #f
+       #:strip-binaries? #f             ; no strip yet
+       #:configure-flags '("--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"
+
+                           "CC=tcc"
+                           "AWK=gawk"
+                           "CC=tcc"
+                           "LD=tcc"
+                           "AR=tcc -ar"
+                           "CFLAGS=-D _POSIX_VERSION=1"
+
+                           ;; Pretend 'dlopen' is missing so we don't build
+                           ;; loadable modules and related code.
+                           "ac_cv_func_dlopen=no"
+                           ;; this often hangs; short-circuit
+                           "acl_cv_prog_gnu_ld=no"
+                           "acl_cv_rpath=no")
+       #:make-flags '("bash")
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'subst
+           (lambda _
+             (let ((tcc (assoc-ref %build-inputs "tcc")))
+               (setenv "LIBS_FOR_BUILD" (string-append tcc "/lib/libgetopt.a"))
+               (substitute* "Makefile.in"
+                 (("^LIBS_FOR_BUILD = ") (string-append "LIBS_FOR_BUILD = " 
tcc "/lib/libgetopt.a"))))))
+         (add-after 'configure 'configure-fixups
+           (lambda _
+             (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
+")
+                        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 glibc-mesboot0
   ;; GNU C Library 2.2.5 is the most recent glibc that we managed to build
   ;; using gcc-2.95.3.  Newer versions (2.3.x, 2.6, 2.1x) seem to need a newer



reply via email to

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