[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/01: WIP: use {bash, gawk, grep, sed}-seed instead of %bootstrap-coreu
From: |
guix-commits |
Subject: |
01/01: WIP: use {bash, gawk, grep, sed}-seed instead of %bootstrap-coreutils&co. |
Date: |
Fri, 11 Jan 2019 08:27:24 -0500 (EST) |
janneke pushed a commit to branch wip-bootstrap
in repository guix.
commit 59516205284b90d119c307cda1db35d2c047e5bf
Author: Jan Nieuwenhuizen <address@hidden>
Date: Fri Jan 11 14:25:22 2019 +0100
WIP: use {bash,gawk,grep,sed}-seed instead of %bootstrap-coreutils&co.
---
gnu/packages/commencement.scm | 115 ++++++++++++++++++++++++++----
gnu/packages/patches/gcc-boot-4.6.4.patch | 8 +--
2 files changed, 105 insertions(+), 18 deletions(-)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 0dca0c0..b1250bd 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -3109,13 +3109,16 @@ ac_cv_c_float_format='IEEE (little-endian)'
(base32
"1hzci2zrrd7v3g1jk35qindq05hbl0bhjcyyisq9z209xb3fqzb1"))))))
-(define bash-seed
+(define-public bash-seed
(package-with-bootstrap-guile
(package
(inherit bash)
- (name "bash-cheat")
+ (name "bash-seed")
(source #f)
(native-inputs `(("coreutils" ,%bootstrap-coreutils&co)))
+ (inputs '())
+ (propagated-inputs '())
+ (outputs '("out"))
(build-system trivial-build-system)
(arguments
`(#:guile ,%bootstrap-guile
@@ -3126,15 +3129,91 @@ ac_cv_c_float_format='IEEE (little-endian)'
(let* ((coreutils (assoc-ref %build-inputs "coreutils"))
(out (assoc-ref %outputs "out"))
(bin (string-append out "/bin")))
- (mkdir-p bindir)
- (install (string-append coreutils "/bin/bash" bin))
+ (mkdir-p bin)
+ (install-file (string-append coreutils "/bin/bash") bin)
+ (symlink "bash" (string-append bin "/sh"))
+ #t)))))))
+
+(define-public gawk-seed
+ (package-with-bootstrap-guile
+ (package
+ (inherit gawk)
+ (name "gawk-seed")
+ (source #f)
+ (native-inputs `(("coreutils" ,%bootstrap-coreutils&co)))
+ (inputs '())
+ (propagated-inputs '())
+ (outputs '("out"))
+ (build-system trivial-build-system)
+ (arguments
+ `(#:guile ,%bootstrap-guile
+ #:modules ((guix build utils))
+ #:builder (begin
+ (use-modules (guix build utils))
+
+ (let* ((coreutils (assoc-ref %build-inputs "coreutils"))
+ (out (assoc-ref %outputs "out"))
+ (bin (string-append out "/bin")))
+ (mkdir-p bin)
+ (install-file (string-append coreutils "/bin/gawk") bin)
+ (symlink "gawk" (string-append bin "/awk"))
+ #t)))))))
+
+(define-public grep-seed
+ (package-with-bootstrap-guile
+ (package
+ (inherit grep)
+ (name "grep-seed")
+ (source #f)
+ (native-inputs `(("coreutils" ,%bootstrap-coreutils&co)))
+ (inputs '())
+ (propagated-inputs '())
+ (outputs '("out"))
+ (build-system trivial-build-system)
+ (arguments
+ `(#:guile ,%bootstrap-guile
+ #:modules ((guix build utils))
+ #:builder (begin
+ (use-modules (guix build utils))
+
+ (let* ((coreutils (assoc-ref %build-inputs "coreutils"))
+ (out (assoc-ref %outputs "out"))
+ (bin (string-append out "/bin")))
+ (mkdir-p bin)
+ (install-file (string-append coreutils "/bin/grep") bin)
+ (install-file (string-append coreutils "/bin/egrep") bin)
+ (install-file (string-append coreutils "/bin/fgrep") bin)
+ #t)))))))
+
+(define-public sed-seed
+ (package-with-bootstrap-guile
+ (package
+ (inherit sed)
+ (name "sed-seed")
+ (source #f)
+ (native-inputs `(("coreutils" ,%bootstrap-coreutils&co)))
+ (inputs '())
+ (propagated-inputs '())
+ (outputs '("out"))
+ (build-system trivial-build-system)
+ (arguments
+ `(#:guile ,%bootstrap-guile
+ #:modules ((guix build utils))
+ #:builder (begin
+ (use-modules (guix build utils))
+
+ (let* ((coreutils (assoc-ref %build-inputs "coreutils"))
+ (out (assoc-ref %outputs "out"))
+ (bin (string-append out "/bin")))
+ (mkdir-p bin)
+ (install-file (string-append coreutils "/bin/sed") bin)
#t)))))))
-(define gcc-mesboot1
+(define-public gcc-core-mesboot1
(package-with-bootstrap-guile
(package
(inherit gcc-mesboot0)
- (name "gcc-mesboot1")
+ (name "gcc-core-mesboot1")
(version "4.6.4")
(source (origin ;;(inherit (package-source gcc-4.7))
(method url-fetch)
@@ -3157,8 +3236,11 @@ ac_cv_c_float_format='IEEE (little-endian)'
("boot-patch" ,(search-patch "gcc-boot-4.6.4.patch"))
;; hack -- which tool is broken?
- ;;("bash" ,bash-seed)
- ("coreutils" ,%bootstrap-coreutils&co)
+ ;;("coreutils" ,%bootstrap-coreutils&co)
+ ("bash" ,bash-seed)
+ ("gawk" ,gawk-seed)
+ ("grep" ,grep-seed)
+ ("sed" ,sed-seed)
;;./libtool: line 1: tr: command not found
;; ("bash" ,bash-mesboot)
@@ -3166,7 +3248,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
;;("binutils" ,binutils-mesboot1)
("binutils" ,binutils-mesboot0)
- ;;("coreutils" ,coreutils-mesboot)
+ ("coreutils" ,coreutils-mesboot)
("diffutils" ,diffutils-mesboot0)
("gawk" ,gawk-mesboot1)
("gawk" ,gawk-mesboot0)
@@ -3174,6 +3256,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
("gzip" ,gzip-mesboot0)
("libc" ,glibc-mesboot0)
("make" ,make-mesboot)
+ ("patch" ,patch-mesboot0)
("sed" ,sed-mesboot1)
("sed" ,sed-mesboot0)
("tar" ,tar-mesboot2)
@@ -3188,7 +3271,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
#:modules ((guix build gnu-build-system)
(guix build utils)
(srfi srfi-1))
- #:parallel-build? #f ;; added
+ #:parallel-build? #f ; for debugging
#:make-flags
(let* ((libc (assoc-ref %build-inputs "libc"))
(ldflags (string-append
@@ -3248,11 +3331,8 @@ ac_cv_c_float_format='IEEE (little-endian)'
(add-after 'unpack 'patch
(lambda* (#:key inputs #:allow-other-keys)
(let ((patch-file (assoc-ref inputs "boot-patch")))
+ (format (current-error-port) "patch file=~s\n" patch-file)
(system* "patch" "--force" "-p1" "-i" patch-file))
- ;; For 4.6.4
- ;; (substitute* "gcc/Makefile.in"
- ;; (("^NATIVE_SYSTEM_HEADER_DIR = /usr/include" all)
- ;; (string-append "# " all)))
#t))
;; c&p from commencement.scm:gcc-boot0
(add-after 'unpack 'unpack-gmp&co
@@ -3299,6 +3379,13 @@ ac_cv_c_float_format='IEEE (little-endian)'
(format (current-error-port) "LIBRARY_PATH=~a\n" (getenv
"LIBRARY_PATH"))
#t)))))))))
+(define-public gcc-mesboot1 ;; TODO
+ (package-with-bootstrap-guile
+ (package
+ (inherit gcc-core-mesboot1)
+ (name "gcc-mesboot1")
+ (version "4.6.4"))))
+
(define gcc-mesboot12
(package-with-bootstrap-guile
(package
diff --git a/gnu/packages/patches/gcc-boot-4.6.4.patch
b/gnu/packages/patches/gcc-boot-4.6.4.patch
index cb9d06a..4ab0bf8 100644
--- a/gnu/packages/patches/gcc-boot-4.6.4.patch
+++ b/gnu/packages/patches/gcc-boot-4.6.4.patch
@@ -1,4 +1,4 @@
-This patch enables building gcc-4.7.4 using gcc-2.95.3 and glibc-2.2.5
+This patch enables building gcc-4.6.4 using gcc-2.95.3 and glibc-2.2.5
* Tweak Makefile to allow overriding NATIVE_SYSTEM_HEADER_DIR using
#:makeflags
* Add missing limits.h include.
@@ -14,12 +14,12 @@ diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index f3cc49fdb18..bc5718fc9a6 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
-@@ -458,7 +458,7 @@ LINKER_PLUGIN_API_H = $(srcdir)/../include/plugin-api.h
+@@ -440,7 +440,7 @@ LINKER_PLUGIN_API_H = $(srcdir)/../include/plugin-api.h
LTO_SYMTAB_H = $(srcdir)/../include/lto-symtab.h
# Default native SYSTEM_HEADER_DIR, to be overridden by targets.
-NATIVE_SYSTEM_HEADER_DIR = /usr/include
-+# NATIVE_SYSTEM_HEADER_DIR = @NATIVE_SYSTEM_HEADER_DIR@
++# NATIVE_SYSTEM_HEADER_DIR = /usr/include
# Default cross SYSTEM_HEADER_DIR, to be overridden by targets.
CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
@@ -44,7 +44,7 @@ diff --git a/libgcc/generic-morestack-thread.c
b/libgcc/generic-morestack-thread
index bbe6dd12b5a..1d1d48223d7 100644
--- a/libgcc/generic-morestack-thread.c
+++ b/libgcc/generic-morestack-thread.c
-@@ -35,7 +35,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If
not, see
+@@ -34,7 +34,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If
not, see
will want to define inhibit_libc while building a compiler which
can build glibc. */