[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
21/70: bootstrap: tcc-boot0: Use Gash instead of coretutils&co.
From: |
guix-commits |
Subject: |
21/70: bootstrap: tcc-boot0: Use Gash instead of coretutils&co. |
Date: |
Wed, 11 Dec 2019 13:03:21 -0500 (EST) |
janneke pushed a commit to branch wip-bootstrap
in repository guix.
commit ef8b66e5a9dc659d6a7d3fb781acc3db22c4b1db
Author: Jan Nieuwenhuizen <address@hidden>
Date: Tue Dec 4 23:19:56 2018 +0100
bootstrap: tcc-boot0: Use Gash instead of coretutils&co.
* gnu/packages/commencement.scm (tcc-boot0): Use Gash instead of
coretutils&co.
---
gnu/packages/commencement.scm | 197 +++++++++++++++++++-----------------------
1 file changed, 90 insertions(+), 107 deletions(-)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index a7d8473..a9c6e9e 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -597,114 +597,97 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
;; bootstrappable effort; we will try again later. These patches have been
;; ported to 0.9.27, alas the resulting tcc is buggy. Once MesCC is more
;; mature, this package should use the 0.9.27 sources (or later).
- (let ((version "0.9.26")
- (revision "6")
- (commit "c004e9a34fb026bb44d211ab98bb768e79900eef"))
- (package
- (inherit tcc)
- (name "tcc-boot0")
- (version (string-append version "-" revision "." (string-take commit 7)))
- (source (origin
- (method url-fetch)
- (uri (string-append "https://gitlab.com/janneke/tinycc"
- "/-/archive/" commit
- "/tinycc-" commit ".tar.gz"))
- (sha256
- (base32
- "1hmzn1pq0x22ppd80hyrn5qzqq94mxd0ychzj6vrr2vnj2frjv5b"))))
- (build-system gnu-build-system)
- (supported-systems '("i686-linux" "x86_64-linux"))
- (inputs '())
- (propagated-inputs '())
- (native-inputs
- `(("mes" ,mes-boot)
- ("mescc-tools" ,%bootstrap-mescc-tools)
- ("nyacc-source" ,(bootstrap-origin
- (package-source nyacc-0.86)))
+ (package
+ (inherit tcc)
+ (name "tcc-boot0")
+ (version "0.9.26-1103-g6e62e0e")
+ (source (bootstrap-origin
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "http://lilypond.org/janneke/mes/20191117/"
+ "/tcc-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1qbybw7mxbgkv3sazvz1v7c8byq998vk8f1h25ik8w3d2l63lxng")))))
+ (build-system gnu-build-system)
+ (supported-systems '("i686-linux" "x86_64-linux"))
+ (inputs '())
+ (propagated-inputs '())
+ (native-inputs
+ `(("mes" ,mes-boot)
+ ("nyacc-source" ,(bootstrap-origin
+ (origin (inherit (package-source nyacc))
+ (snippet #f))))
+ ("mescc-tools" ,%bootstrap-mescc-tools)
+ ,@(%boot-gash-inputs)))
+ (arguments
+ `(#:implicit-inputs? #f
+ #:guile ,%bootstrap-guile
+ #:validate-runpath? #f ; no dynamic executables
+ #:strip-binaries? #f ; no strip yet
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'unpack-seeds
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((nyacc-source (assoc-ref %build-inputs "nyacc-source")))
+ (with-directory-excursion ".."
+ (invoke "tar" "-xvf" nyacc-source)))))
+ (replace 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref %outputs "out"))
+ (dir (with-directory-excursion ".." (getcwd)))
+ (interpreter "/lib/mes-loader"))
- ("coreutils" , %bootstrap-coreutils&co)
- ("bootstrap-mes" ,%bootstrap-mes)))
- (arguments
- `(#:implicit-inputs? #f
- #:guile ,%bootstrap-guile
- #:strip-binaries? #f ; binutil's strip b0rkes MesCC/M1/hex2 binaries
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'unpack-seeds
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((coreutils (assoc-ref %build-inputs "coreutils"))
- (nyacc-source (assoc-ref %build-inputs "nyacc-source"))
- (bootstrap-mes (assoc-ref %build-inputs
"bootstrap-mes")))
- (setenv "PATH" (string-append
- coreutils "/bin"))
- (format (current-error-port) "PATH=~s\n" (getenv "PATH"))
- (with-directory-excursion ".."
- (mkdir-p "nyacc-source")
- (invoke "tar" "--strip=1" "-C" "nyacc-source"
- "-xvf" nyacc-source)
- (symlink (string-append bootstrap-mes "/share/mes/lib")
"mes-seed"))
- #t)))
- (replace 'configure
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref %outputs "out"))
- (dir (with-directory-excursion ".." (getcwd)))
- (coreutils (assoc-ref %build-inputs "coreutils"))
- (mes (assoc-ref %build-inputs "mes"))
- (mescc-tools (assoc-ref %build-inputs "mescc-tools"))
- (libc (assoc-ref %build-inputs "libc"))
- (interpreter (if libc
- ;; also for x86_64-linux, we are still
on i686-linux
- (string-append libc
,(glibc-dynamic-linker "i686-linux"))
- (string-append mes "/lib/mes-loader"))))
- (setenv "PATH" (string-append
- coreutils "/bin"
- ":" mes "/bin"
- ":" mescc-tools "/bin"))
- (format (current-error-port) "PATH=~s\n" (getenv "PATH"))
-
- (setenv "PREFIX" out)
- (symlink (string-append mes "/share/mes") "mes")
- (symlink (string-append "../nyacc-source/module") "nyacc")
- (setenv "MES_PREFIX" "mes")
- (setenv "MES_ARENA" "100000000")
- (setenv "MES_MAX_ARENA" "100000000")
- (setenv "MES_STACK" "10000000")
- (setenv "MES" "mes")
- (setenv "GUILE_LOAD_PATH" "nyacc")
- (invoke "sh" "configure"
- "--prefix=$PREFIX"
- (string-append "--elfinterp=" interpreter)
- "--crtprefix=."
- "--tccdir=."))))
- (replace 'build
- (lambda _
- (substitute* "bootstrap.sh"
- (("^ cmp") "# cmp"))
- (invoke "sh" "bootstrap.sh")))
- (replace 'check
- (lambda _
- (setenv "DIFF" "diff.scm")
- (setenv "OBJDUMP" "true")
- ;; fail fast tests
- ;; (invoke "sh" "test.sh" "mes/scaffold/tests/30-strlen")
- ;; (invoke "sh" "-x" "test.sh"
"mes/scaffold/tinycc/00_assignment")
- (setenv "TCC" "./tcc")
- (invoke "sh" "check.sh")))
- (replace 'install
- (lambda _
- (invoke "sh" "install.sh"))))))
- (native-search-paths
- ;; Use the language-specific variables rather than 'CPATH' because they
- ;; are equivalent to '-isystem' whereas 'CPATH' is equivalent to '-I'.
- ;; The intent is to allow headers that are in the search path to be
- ;; treated as "system headers" (headers exempt from warnings) just like
- ;; the typical /usr/include headers on an FHS system.
- (list (search-path-specification
- (variable "C_INCLUDE_PATH")
- (files '("include")))
- (search-path-specification
- (variable "LIBRARY_PATH")
- (files '("lib"))))))))
+ (setenv "prefix" out)
+ (setenv "GUILE_LOAD_PATH"
+ (string-append dir "/nyacc-0.99.0/module"))
+
+ (substitute* "conftest.c"
+ (("volatile") ""))
+
+ (invoke "sh" "configure"
+ "--cc=mescc"
+ (string-append "--prefix=" out)
+ (string-append "--elfinterp=" interpreter)
+ "--crtprefix=."
+ "--tccdir=."))))
+ (replace 'build
+ (lambda _
+ (substitute* "bootstrap.sh" ; Show some progress
+ (("^( *)((cp|ls|mkdir|rm|[.]/tcc|[.]/[$][{PROGRAM_PREFIX[}]tcc)
[^\"]*[^\\])\n" all space cmd)
+ (string-append space "echo \"" cmd "\"\n"
+ space cmd "\n")))
+ (invoke "sh" "bootstrap.sh")))
+ (replace 'check
+ (lambda _
+ ;; fail fast tests
+ (system* "./tcc" "--help") ; --help exits 1
+ ;; (invoke "sh" "test.sh" "mes/scaffold/tests/30-strlen")
+ ;; (invoke "sh" "-x" "test.sh"
"mes/scaffold/tinycc/00_assignment")
+ ;; TODO: add sensible check target (without depending on make)
+ ;; (invoke "sh" "check.sh")
+ #t))
+ (replace 'install
+ (lambda _
+ (substitute* "install.sh" ; Show some progress
+ (("^( *)((cp|ls|mkdir|rm|tar|./[$][{PROGRAM_PREFIX[}]tcc)
[^\"]*[^\\])\n" all space cmd)
+ (string-append space "echo \"" cmd "\"\n"
+ space cmd "\n")))
+
+ (invoke "sh" "install.sh"))))))
+ (native-search-paths
+ ;; Use the language-specific variables rather than 'CPATH' because they
+ ;; are equivalent to '-isystem' whereas 'CPATH' is equivalent to '-I'.
+ ;; The intent is to allow headers that are in the search path to be
+ ;; treated as "system headers" (headers exempt from warnings) just like
+ ;; the typical /usr/include headers on an FHS system.
+ (list (search-path-specification
+ (variable "C_INCLUDE_PATH")
+ (files '("include")))
+ (search-path-specification
+ (variable "LIBRARY_PATH")
+ (files '("lib")))))))
(define tcc-boot
(package
- 10/70: Revert "bootstrap: bootstrap-mes: Update to mes-0.21.", (continued)
- 10/70: Revert "bootstrap: bootstrap-mes: Update to mes-0.21.", guix-commits, 2019/12/11
- 11/70: Revert "bootstrap: bootstrap-mescc-tools: Update to mescc-tools-0.6.1.", guix-commits, 2019/12/11
- 15/70: bootstrap: Add %bootstrap-guile+guild., guix-commits, 2019/12/11
- 12/70: Revert "gnu: Remove mescc-tools-0.5.2.", guix-commits, 2019/12/11
- 06/70: bootstrap: mes-minimal: Update to mes-0.21., guix-commits, 2019/12/11
- 13/70: Revert "bootstrap: mescc-tools-static: Update to 0.6.1.", guix-commits, 2019/12/11
- 14/70: Revert "bootstrap: mes-minimal: Update to mes-0.21.", guix-commits, 2019/12/11
- 18/70: bootstrap: Add %bootstrap-mes-rewired., guix-commits, 2019/12/11
- 17/70: bootstrap: Add gash-core-utils-boot., guix-commits, 2019/12/11
- 23/70: bootstrap: make-mesboot0: Use Gash instead of coreutils&co., guix-commits, 2019/12/11
- 21/70: bootstrap: tcc-boot0: Use Gash instead of coretutils&co.,
guix-commits <=
- 28/70: bootstrap: Add patch-mesboot., guix-commits, 2019/12/11
- 16/70: bootstrap: Add gash-boot., guix-commits, 2019/12/11
- 22/70: bootstrap: Add gzip-mesboot., guix-commits, 2019/12/11
- 20/70: bootstrap: mes-boot: Install intermediate ASCII cache., guix-commits, 2019/12/11
- 24/70: bootstrap: Add bzip2-mesboot., guix-commits, 2019/12/11
- 27/70: bootstrap: diffuils-mesboot: Use Gash instead of coretutils&co., guix-commits, 2019/12/11
- 26/70: bootstrap: tcc-boot: Use Gash instead of coretutils&co., guix-commits, 2019/12/11
- 31/70: bootstrap: gcc-core-mesboot0: Use Gash instead of coretutils&co., guix-commits, 2019/12/11
- 29/70: bootstrap: Add sed-mesboot0., guix-commits, 2019/12/11
- 19/70: bootstrap: mes-boot: Use Gash instead of coretutils&co., guix-commits, 2019/12/11