[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
15/176: gnu: tcc-boot: Use bootstrap Guile and simplify.
From: |
Jan Nieuwenhuizen |
Subject: |
15/176: gnu: tcc-boot: Use bootstrap Guile and simplify. |
Date: |
Fri, 31 Aug 2018 11:20:02 -0400 (EDT) |
janneke pushed a commit to branch wip-bootstrap
in repository guix.
commit 586692f3ef4c959b9a25e645136d1aed5325b394
Author: Ricardo Wurmus <address@hidden>
Date: Sun Nov 26 13:19:28 2017 +0100
gnu: tcc-boot: Use bootstrap Guile and simplify.
* gnu/packages/mes.scm (tcc-boot): Simplify; use %bootstrap-guile and
package-with-bootstrap-guile.
---
gnu/packages/mes.scm | 209 +++++++++++++++++++++++++--------------------------
1 file changed, 102 insertions(+), 107 deletions(-)
diff --git a/gnu/packages/mes.scm b/gnu/packages/mes.scm
index 5bb3c34..3c1b96f 100644
--- a/gnu/packages/mes.scm
+++ b/gnu/packages/mes.scm
@@ -332,119 +332,114 @@ extensive examples, including parsers for the
Javascript and C99 languages.")
(let ((version "0.9.26")
(revision "0")
(commit "8f495f27423acbf569459f517466a07ed2c96c45"))
- (package
- (name "tcc-boot")
- (version (string-append version "-" revision "." (string-take commit 7)))
- (synopsis "Tiny and fast C compiler")
- (source (origin
- (method url-fetch)
- (uri (string-append "https://gitlab.com/janneke/tinycc"
-
- "/repository/archive.tar.gz?ref="
- commit))
- (file-name (string-append name "-" version ".tar.xz"))
- (sha256
- (base32
- "15kh9qpc12pph0yz1rz8v646kx9x62a1cqgy0g0y4vbj3sampdsy"))))
- (build-system trivial-build-system)
- (supported-systems '("i686-linux" "x86_64-linux"))
- (native-inputs
- `(("static-bash" ,@(assoc-ref %bootstrap-inputs "bash"))
- ("bash" ,(search-bootstrap-binary "bash" (%current-system)))
- ("guile" ,(origin (method url-fetch)
- (uri ((@@ (gnu packages package-management)
boot-guile-uri) "x86_64"))
- (sha256
- (base32
-
"1w2p5zyrglzzniqgvyn1b55vprfzhgk8vzbzkkbdgl5248si0yq3"))))
- ;; guile-2.0.9 does not have srfi-43; cherry-pick
- ("srfi-43" ,(origin
- (method url-fetch)
- (uri
"http://git.savannah.gnu.org/cgit/guile.git/plain/module/srfi/srfi-43.scm?h=stable-2.0")
- (file-name "srfi-43.scm")
- (sha256
- (base32
-
"0rnkppwdkxbzkgp9s9ccmby9f7p3ijxjlmvj0pzqxwmrmpy7jwmb"))))
- ("tar" ,(search-bootstrap-binary "tar" (%current-system)))
- ("xz" ,(search-bootstrap-binary "xz" (%current-system)))
- ("mes" ,mes-boot)
- ("mescc-tools" ,mescc-tools-boot)
- ("nyacc-source" ,(package-source nyacc-boot))
- ("tinycc-seed"
- ,(origin
- (method url-fetch)
- (uri (string-append "https://gitlab.com/janneke/tinycc-seed"
- "/repository/archive.tar.gz?ref="
- "393a3117a91ec057494986bd75215e1a1786d69d"))
- (file-name (string-append name "-seed" "-" version ".tar.xz"))
- (sha256
- (base32
- "0ipb59my9hxkaybvj8bss5chqs2ypga3k765l93z374p57cqmllm"))))))
- (arguments
- `(#:modules ((guix build utils))
- #:builder
- (begin
- (use-modules (guix build utils))
- (let* ((bash (assoc-ref %build-inputs "static-bash"))
- (mes (assoc-ref %build-inputs "mes"))
- (guile (assoc-ref %build-inputs "guile"))
- (srfi-43 (assoc-ref %build-inputs "srfi-43"))
- (mescc-tools (assoc-ref %build-inputs "mescc-tools"))
- (tar (assoc-ref %build-inputs "tar"))
- (xz (assoc-ref %build-inputs "xz"))
- (source (assoc-ref %build-inputs "source"))
- (nyacc-source (assoc-ref %build-inputs "nyacc-source"))
- (tinycc-seed (assoc-ref %build-inputs "tinycc-seed"))
- (out (assoc-ref %outputs "out"))
- (out/bin (string-append out "/bin"))
- (interpreter "interpreter")
- (dir (getcwd)))
- (setenv "PATH" (string-append bash "/bin:"
- mes "/bin:"
- "../guile/bin:"
- mescc-tools "/bin:"
- tar "/bin:"
- xz "/bin"))
- (format (current-error-port) "PATH=~s\n" (getenv "PATH"))
- (mkdir-p "source")
- (system* "tar" "--strip=1" "-C" "source" "-xvf" source)
- (mkdir-p "guile")
- (system* "tar" "-C" "guile" "-xvf" guile)
- (mkdir-p "nyacc-source")
- (system* "tar" "--strip=1" "-C" "nyacc-source" "-xvf"
nyacc-source)
- (mkdir-p "tinycc-seed")
- (system* "tar" "--strip=1" "-C" "tinycc-seed" "-xvf" tinycc-seed)
- (mkdir-p "srfi")
- (system* "cp" srfi-43 "srfi/srfi-43.scm")
- (chdir "source")
- (zero? (system (string-append
-"set -ex;"
+ (package-with-bootstrap-guile
+ (package
+ (name "tcc-boot")
+ (version (string-append version "-" revision "." (string-take commit
7)))
+ (synopsis "Tiny and fast C compiler")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://gitlab.com/janneke/tinycc"
-;; configure
-"export PREFIX=" out ";"
-"export MESCC=" mes "/bin/mescc.scm;"
-"export GUILE_AUTO_COMPILE=1;"
-"export GUILE_LOAD_COMPILED_PATH=" dir "/guile/lib/guile/2.0/ccache;"
-"export GUILE_LOAD_PATH=" dir
- ":" dir "/guile/share/guile/2.0/"
- ":" dir "/nyacc-source/module"
- ":" mes "/share/mes/guile;"
-
-"sh configure --prefix=$PREFIX --elfinterp=interpreter --crtprefix=.
--tccdir=.;"
+ "/repository/archive.tar.gz?ref="
+ commit))
+ (file-name (string-append name "-" version ".tar.xz"))
+ (sha256
+ (base32
+ "15kh9qpc12pph0yz1rz8v646kx9x62a1cqgy0g0y4vbj3sampdsy"))))
+ (build-system trivial-build-system)
+ (supported-systems '("i686-linux" "x86_64-linux"))
+ (native-inputs
+ `(("static-bash" ,@(assoc-ref %bootstrap-inputs "bash"))
+ ("guile" ,%bootstrap-guile)
+ ;; guile-2.0.9 does not have srfi-43; cherry-pick
+ ("srfi-43" ,(origin
+ (method url-fetch)
+ (uri
"http://git.savannah.gnu.org/cgit/guile.git/plain/module/srfi/srfi-43.scm?h=stable-2.0")
+ (file-name "srfi-43.scm")
+ (sha256
+ (base32
+
"0rnkppwdkxbzkgp9s9ccmby9f7p3ijxjlmvj0pzqxwmrmpy7jwmb"))))
+ ("tar" ,(search-bootstrap-binary "tar" (%current-system)))
+ ("xz" ,(search-bootstrap-binary "xz" (%current-system)))
+ ("mes" ,mes-boot)
+ ("mescc-tools" ,mescc-tools-boot)
+ ("nyacc-source" ,(package-source nyacc-boot))
+ ("tinycc-seed"
+ ,(origin
+ (method url-fetch)
+ (uri (string-append "https://gitlab.com/janneke/tinycc-seed"
+ "/repository/archive.tar.gz?ref="
+ "393a3117a91ec057494986bd75215e1a1786d69d"))
+ (file-name (string-append name "-seed" "-" version ".tar.xz"))
+ (sha256
+ (base32
+ "0ipb59my9hxkaybvj8bss5chqs2ypga3k765l93z374p57cqmllm"))))))
+ (arguments
+ `(#:modules ((guix build utils))
+ #:builder
+ (begin
+ (use-modules (guix build utils))
+ (let* ((bash (assoc-ref %build-inputs "static-bash"))
+ (mes (assoc-ref %build-inputs "mes"))
+ (guile (assoc-ref %build-inputs "guile"))
+ (srfi-43 (assoc-ref %build-inputs "srfi-43"))
+ (mescc-tools (assoc-ref %build-inputs "mescc-tools"))
+ (tar (assoc-ref %build-inputs "tar"))
+ (xz (assoc-ref %build-inputs "xz"))
+ (source (assoc-ref %build-inputs "source"))
+ (nyacc-source (assoc-ref %build-inputs "nyacc-source"))
+ (tinycc-seed (assoc-ref %build-inputs "tinycc-seed"))
+ (out (assoc-ref %outputs "out"))
+ (dir (getcwd)))
+ (setenv "PATH" (string-append bash "/bin:"
+ mes "/bin:"
+ guile "/bin:"
+ mescc-tools "/bin:"
+ tar "/bin:"
+ xz "/bin"))
+ (format (current-error-port) "PATH=~s\n" (getenv "PATH"))
+ (mkdir-p "source")
+ (system* "tar" "--strip=1" "-C" "source" "-xvf" source)
+ (mkdir-p "nyacc-source")
+ (system* "tar" "--strip=1" "-C" "nyacc-source" "-xvf"
nyacc-source)
+ (mkdir-p "tinycc-seed")
+ (system* "tar" "--strip=1" "-C" "tinycc-seed" "-xvf" tinycc-seed)
+ (mkdir-p "srfi")
+ (system* "cp" srfi-43 "srfi/srfi-43.scm")
+ (chdir "source")
+ (setenv "PREFIX" out)
+ (setenv "MESCC" (string-append mes "/bin/mescc.scm"))
+ (setenv "GUILE_AUTO_COMPILE" "1")
+ (setenv "GUILE_LOAD_COMPILED_PATH"
+ (string-append guile "/lib/guile/2.0/ccache"))
+ (setenv "GUILE_LOAD_PATH"
+ (string-append dir
+ ":" guile "/share/guile/2.0/"
+ ":" dir "/nyacc-source/module"
+ ":" mes "/share/mes/guile"))
+ (and
+ ;; configure
+ (zero? (system* "sh" "configure"
+ "--prefix=$PREFIX"
+ "--elfinterp=interpreter"
+ "--crtprefix=."
+ "--tccdir=."))
-;; build
-"sh build.sh;"
+ ;; build
+ (zero? (system* "sh" "build.sh"))
-;; check: 26/65 tests fail
-"sh check.sh || true;"
+ ;; check: 26/65 tests fail
+ (or (zero? (system* "sh" "check.sh")) #t)
-;; install
-"sh install.sh;"))))))) ; []
- (description
- "TCC, also referred to as \"TinyCC\", is a small and fast C compiler
+ ;; install
+ (zero? (system* "sh" "install.sh")))))))
+ (description
+ "TCC, also referred to as \"TinyCC\", is a small and fast C compiler
written in C. It supports ANSI C with GNU and extensions and most of the C99
standard.")
- (home-page "http://www.tinycc.org/")
- (license lgpl2.1+))))
+ (home-page "http://www.tinycc.org/")
+ (license lgpl2.1+)))))
;; gcc-boot
;; <rain1> what I did was just this [19:11]
- 11/176: tcc-boot: bump tinycc-seed: GNU Gcc support: Add ferror., (continued)
- 11/176: tcc-boot: bump tinycc-seed: GNU Gcc support: Add ferror., Jan Nieuwenhuizen, 2018/08/31
- 01/176: gnu: Add stage0-boot., Jan Nieuwenhuizen, 2018/08/31
- 03/176: gnu: Add mes-boot., Jan Nieuwenhuizen, 2018/08/31
- 10/176: bump: mes-tools: add ferror for [m4] configure, Jan Nieuwenhuizen, 2018/08/31
- 09/176: bump tcc-boot: add sysinclude path for [m4] configure., Jan Nieuwenhuizen, 2018/08/31
- 02/176: gnu: Add mescc-tools-boot., Jan Nieuwenhuizen, 2018/08/31
- 05/176: gnu: Add tcc-boot., Jan Nieuwenhuizen, 2018/08/31
- 07/176: Revert "use %bootstrap-guile -- still guile-2.2 in bag-with-origins :-(", Jan Nieuwenhuizen, 2018/08/31
- 06/176: use %bootstrap-guile -- still guile-2.2 in bag-with-origins :-(, Jan Nieuwenhuizen, 2018/08/31
- 22/176: gnu: Update mescc-tools-boot: bootstrap from .M1 sources: remove MORTAL SIN., Jan Nieuwenhuizen, 2018/08/31
- 15/176: gnu: tcc-boot: Use bootstrap Guile and simplify.,
Jan Nieuwenhuizen <=
- 19/176: gnu: mes-boot: Use bootstrap Guile and simplify., Jan Nieuwenhuizen, 2018/08/31
- 21/176: gnu: Update mes-boot: Mescc-tools support: char foo[BAR] = {'a', 'b', 'c'}., Jan Nieuwenhuizen, 2018/08/31
- 34/176: gnu: Update tcc-boot: qsort., Jan Nieuwenhuizen, 2018/08/31
- 31/176: gnu: Update tcc-boot: mescc char cast truncate bug., Jan Nieuwenhuizen, 2018/08/31
- 20/176: gnu: mes-boot: Update mes-boot, mes-seed: Mescc-tools support., Jan Nieuwenhuizen, 2018/08/31
- 26/176: gnu: Update mescc-tools-boot, mes-boot, tcc-boot., Jan Nieuwenhuizen, 2018/08/31
- 37/176: gnu: %mes-seed: Update for mes-0.12., Jan Nieuwenhuizen, 2018/08/31
- 39/176: gnu: %tinycc-seed: Update for mes-0.12., Jan Nieuwenhuizen, 2018/08/31
- 57/176: gnu: %mes-seed: Update for 0.15., Jan Nieuwenhuizen, 2018/08/31
- 54/176: gnu: mescc-tools-boot: Update to 0.4., Jan Nieuwenhuizen, 2018/08/31