diff --git a/INSTALL b/INSTALL index dcea9ebd..f31ac505 100644 --- a/INSTALL +++ b/INSTALL @@ -22,17 +22,18 @@ similar way. #+BEGIN_SRC bash guix environment -l guix.scm #64 bit + 32bit guix environment --system=i686-linux -l guix.scm #32 bit only + guix environment --system=armhf-linux -l guix.scm #32 bit only #+END_SRC *** Other GNU/Linux - - [[https://savannah.gnu.org/projects/mescc-tools/][mescc-tools]], 0.6.1 is known to work. - - [[https://savannah.gnu.org/projects/nyacc][Nyacc]], 0.93.0 is known to work. - - GNU Gcc, 4.9.3 is known to work. - - GNU Guile, version 2.0.12 or is know to work. - - SH, /bin/sh, GNU Bash 4.3 is known to work. + - [[https://savannah.gnu.org/projects/mescc-tools/][mescc-tools]], 0.7.0 is known to work. + - [[https://savannah.gnu.org/projects/nyacc][Nyacc]], 1.00.2 is known to work. + - GNU Gcc, 7.5.0 is known to work. + - GNU Guile, version 3.0.4 is know to work. + - SH, /bin/sh, GNU Bash 5.0.16 is known to work. - GNU coreutils - - sed, GNU sed 4.2 is known to work. - - Perl, 5.22 is known to work. + - sed, GNU sed 4.8 is known to work. + - Perl, 5.30 is known to work. ** Build it diff --git a/NEWS b/NEWS index 2ac36ca8..50cfa0ff 100644 --- a/NEWS +++ b/NEWS @@ -2,7 +2,7 @@ #+TITLE: GNU Mes NEWS – history of user-visible changes #+STARTUP: content hidestars -Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen +Copyright © 2016,2017,2018,2019,2021 Jan (janneke) Nieuwenhuizen Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright @@ -10,6 +10,24 @@ Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen Please send Mes bug reports to bug-mes@gnu.org. +* Changes in 0.23 since 0.22 +** Core +*** Mes and Mes C Library can now be built with GCC 10.x. +** MesCC +*** The Mes C Library now supports an armhf-linux bootstrap. +*** MesCC now supports ARM. +*** mini.c library was split into _exit.c, and _write.c. +*** When building with GCC, -lgcc is now used. +*** MesCC now has it's own support library libmescc.a (-lmescc). +*** MesCC now requires mescc-tools-0.7.0 or later for ARM. +*** MesCC can be now built with nyacc-1.00.2: +note that nyacc-1.03.0 is not (backwards) compatible. +*** MesCC can be built with Guile 3.0.x: +See https://bugs.gnu.org/43831; use guild compile -O1 with Guile 3.0.x. +*** MesCC now raises SIGABRT on abort, if supported. +** Noteworthy bug fixes +*** unreadchar on EOF is now a no-op. +*** malloc now aligns the blocks it gives out to max_align_t. * Changes in 0.22 since 0.21 ** Core *** Mes now builds reproducibly with MesCC, cross distribution diff --git a/PORTING b/PORTING index 9c653147..24990e11 100644 --- a/PORTING +++ b/PORTING @@ -22,7 +22,7 @@ to your config.scm and run guix system reconfigure. For example (note: ARM is no longer a 'port', see HACKING) #+BEGIN_SRC bash - guix environment -s armhf-linux --pure --ad-hoc bash coreutils diffutils findutils gawk gcc-toolchain@7 grep git guile@2.2 gzip help2man make mescc-tools nyacc openssh-sans-x pkg-config sed tar texinfo + guix environment --system=armhf-linux --pure --ad-hoc bash coreutils diffutils findutils gawk gcc-toolchain@7 grep git guile@2.2 gzip help2man make mescc-tools nyacc openssh-sans-x pkg-config sed tar texinfo #+END_SRC ** Try it diff --git a/README b/README index 7607b6c8..55e38683 100644 --- a/README +++ b/README @@ -12,7 +12,7 @@ effort for UNIX-like operating systems. The Scheme interpreter is written in ~5,000 LOC of simple C, and the C compiler written in Scheme and these are mutual self-hosting. This -mes.c is [[https://github.com/oriansj/mes-m2][being simplified]] to be transpiled by [[https://github.com/oriansj/m2-planet][M2-Planet]]. +mes.c is now being simplified to be transpiled by [[https://github.com/oriansj/mes-m2]bto be transpiled by [[https://github.com/oriansj/m2-planet][M2-Planet]]. Mes has a Garbage Collector, a library of loadable Scheme modules-- notably Dominique Boucher's [[https://github.com/schemeway/lalr-scm][LALR]], Pre-R6RS [[https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html][portable syntax-case]] with @@ -23,12 +23,15 @@ Mes+MesCC can compile an only [[http://gitlab.com/janneke/tinycc][lightly patche self-hosting. Using this tcc and the Mes C library we now have a Reduced Binary Seed bootstrap for the gnutools triplet: glibc-2.2.5, binutils-2.20.1, gcc-2.95.3. This is enough to bootstrap Guix for -i686-linux and x86_64-linux. +i686-linux, x86_64-linux, armhf-linux and aarch64-linux. Mes is inspired by The Maxwell Equations of Software: [[http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf][LISP-1.5]] -- John McCarthy page 13, GNU Guix's source/binary packaging transparency and Jeremiah Orians's [[https://github.com/oriansj/stage0][stage0]] ~500 byte self-hosting hex assembler. +We are very grateful to NLNet for sponsoring the [[https://nlnet.nl/project/GNUMes][Reduced Binary Seed +bootstrap]] and the [[https://nlnet.nl/project/GNUMes-arm][ARM port]]. + GNU Mes is free software, it is distributed under the terms of the GNU General Public Licence version 3 or later. See the file [[file:COPYING][COPYING]]. @@ -64,17 +67,18 @@ General Public Licence version 3 or later. See the file [[file:COPYING][COPYING * Links [0] https://www.gnu.org/software/mes - [1] https://guix.gnu.org/blog/2019/guix-reduces-bootstrap-seed-by-50/ + [1] https://guix.gnu.org/blog/2020/guix-further-reduces-bootstrap-seed-to-25 [2] https://www.gnu.org/software/guix [3] https://bootstrappable.org - [4] https://github.com/oriansj/mes-m2 - [5] https://github.com/oriansj/m2-planet - [6] https://github.com/schemeway/lalr-scm - [7] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html - [8] https://www.nongnu.org/nyacc - [9] https://gitlab.com/janneke/tinycc - [10] [[http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf]] - [11] https://github.com/oriansj/stage0 + [4] https://github.com/oriansj/m2-planet + [5] https://github.com/schemeway/lalr-scm + [6] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html + [7] https://www.nongnu.org/nyacc + [8] https://gitlab.com/janneke/tinycc + [9] [[http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf]] + [10] https://github.com/oriansj/stage0 + [11] https://nlnet.nl/project/GNUMes + [12] https://nlnet.nl/project/GNUMes-arm * Legalese Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <[[mailto:janneke@gnu.org][janneke@gnu.org]]> diff --git a/ROADMAP b/ROADMAP index ca476c45..dec8bc75 100644 --- a/ROADMAP +++ b/ROADMAP @@ -1,7 +1,7 @@ -*- org -*- #+TITLE: Tentative GNU Mes Road Map -Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen +Copyright © 2016,2017,2018,2019,2020 Jan (janneke) Nieuwenhuizen Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright @@ -23,23 +23,23 @@ on Freenode! * TODO ** release 0.x, unsorted - - Merge the Scheme-only bootstrap which uses Gash and Gash Core - Utilities to remove from bootstrap-binary seed : Awk, Bash, Core - Utilities, Grep, Gzip, Sed, Tar. - - Introduce the Reduced Binaries Seed bootstrap to NixOS (Debian, - Arch, Gentoo, ...?) - - Full Source Bootstrap: compile mes.c using M2-Planet. Jeremiah - branched-out from mes; see https://github.com/oriansj/mes-m2, also see the - branches: wip-full-source-bootstrap, wip-m2-merge and wip-m2. - - Full Guile-compatible module support: define-module, define-public, - export, use-modules, ... - - ARMv7/AArch64 support: Mes C Library and MesCC. - - Simplify eval-apply and other core functionality (see mes-m2). + - Integrate Reduced Binary Seed bootstrap for ARM on GNU Guix; + see branch wip-arm-bootstrap. + - Introduce the Reduced Binary Seed bootstrap to NixOS (Debian, + Arch, Gentoo, ...?). + - Full Source Bootstrap: + + compile mes.c using M2-Planet; see branch wip-m2, + + integrate into GNU Guix; see branch wip-full-source-bootstrap. + - Full Guile-compatible module support; see branch wip-module. + - RISC-V support: Mes C Library and MesCC. + - AArch64 support: Mes C Library and MesCC. + - Simplify eval-apply and other core functionality + + See https://github.com/oriansj/mes-m2 fork/rewrite of mes. - Support native x86_64 bootstrap. - Simplify MesCC ``MesCC should optimize ease of convincing us of its - correctness'' - - tcc: remove or upstream patches from tcc-boot. - - tcc: build 0.9.27 directly instead of via 0.9.26, see tinycc + correctness''. + - Switch to Autotools for development build (bootstrap builds use + kaem.run and bootstrap.sh); see branch wip-auto. ** after release 1.0 - Build Guix packages using Mes: run or simplify (guix build utils), (guix build gnu-build-system). @@ -48,9 +48,12 @@ on Freenode! - Bootstrap support for the Hurd. Most needed now are fork and exec. - Replace the initial gcc-2.95.3 with gcc-4.6.4. - FreeBSD, *BSD? - wip-bootstrappable@0.9.27 branch - - Skip tcc: Build gcc using MesCC. - - better garbage collector. + - Tiny CC: + + remove or upstream patches from tcc-boot, + + build 0.9.27 directly instead of via 0.9.26; see tinycc branch + wip-bootstrappable@0.9.27 + - Skip Tiny CC: Build gcc using MesCC. + - Better garbage collector. - mes/mescc: proper docstrings, api reference documentation. - mes/mescc: bootstrap a minimal Guile? + libguile/{eval,init,list,strings,values,..}. @@ -61,6 +64,10 @@ on Freenode! https://srfi.schemers.org/srfi-72/srfi-72.html, or + ... drop it? * DONE + - GNU Mes now supports building Tiny CC on ARM. + - Merge the Scheme-only bootstrap which uses Gash and Gash Core + Utilities to remove from bootstrap-binary seed : Awk, Bash, Core + Utilities, Grep, Gzip, Sed, Tar. - 0.22 GNU Mes now builds reproducibly cross-platform, runs on the Hurd and has better support for other distributions and kernels. - 0.21 GNU Mes now supports a Scheme-only bootstrap and is packaged in diff --git a/build-aux/GNUmakefile.in b/build-aux/GNUmakefile.in index ac6ed678..b6c9e49c 100644 --- a/build-aux/GNUmakefile.in +++ b/build-aux/GNUmakefile.in @@ -1,5 +1,5 @@ # GNU Mes --- Maxwell Equations of Software -# Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen +# Copyright © 2018,2019,2021 Jan (janneke) Nieuwenhuizen # # This file is part of GNU Mes. # @@ -323,16 +323,37 @@ tag: # Release process # 0. Prepare git, see history: -# - doc: Release update -# + NEWS, etc. -# + doc/announce/ANNOUNCE-0.22, using xxx for checksums -# - Release 0.22 -# 1. make tag VERSION=0.22 -# 2. make sign-dist -# 3. make release -# - Update doc/announce/ANNOUNCE-0.22 +# - doc: Release update (NEWS, etc.) +# - Generate announcement +# + touch mes-0.23.tar.gz +# + make gen-announce VERSION=0.23 +# + Update and commit doc/announce/ANNOUNCE-0.23, +# using xxx (32,40) for checksums +# - create "Release 0.23" commit (see Release 0.22). +# + configure +# + configure.sh +# 1. Tag for release +# make tag VERSION=0.23 +# 2. Create signed tarball +# make sign-dist +# 3. Update Guix package description +# - make release +# 4. Finish announcement +# - Update doc/announce/ANNOUNCE-0.23 # - doc: Post-release update. -# 4. verify bootstrap +# - build-aux/GNUMakefile.in: gen-announce: update previous-version +# 5. Verify +# - Update package in Guix master. +# - If applicable, verify bootstrap. +# 6. Upload to ftp.gnu.org +# 7. Create blog post +# cp doc/announce/ANNOUNCE-0.23 ~/src/web/joyofsource.com/posts/announce-0.23.md +# fix urls and all +# 8. Send mail +# To: info-gnu@gnu.org +# Cc: guix-devel@gnu.org +# Cc: bootstrappable@freelists.org +# Cc: rb-general@lists.reproducible-builds.org guix-build: ./pre-inst-env $(GUIX) build mes@$(VERSION) --with-source=$(TARBALL) @@ -349,12 +370,12 @@ gen-announce: $(GEN_ANNOUNCE)\ --release-type=beta\ --package-name=mes\ - --previous-version='0.21 '\ + --previous-version='0.22 '\ --current-version=$(VERSION)\ --gpg-key-id=$(GPG_KEY_ID)\ --url-directory=https://ftp.gnu.org/gnu/mes\ --news=NEWS\ - > doc/announce/ANNOUNCE-$(VERSION)- + > doc/announce/ANNOUNCE-$(VERSION) installdirs: mkinstalldirs mkdir -p\ diff --git a/doc/announce/ANNOUNCE-0.23 b/doc/announce/ANNOUNCE-0.23 new file mode 100644 index 00000000..ae8a6857 --- /dev/null +++ b/doc/announce/ANNOUNCE-0.23 @@ -0,0 +1,120 @@ + +Subject: GNU Mes 0.23 released + +<#secure method=pgpmime mode=sign> + +We are happy to announce the release of GNU Mes 0.23, representing 125 +commits over one year by four people. + +Mes was ported to ARM and can now be used in the GNU Guix Reduced Binary +Seed bootstrap as described here + + https://guix.gnu.org/blog/2020/guix-further-reduces-bootstrap-seed-to-25/ + +and now also for armhf-linux and aarch-linux. Work to integrate this +into Guix is ongoing: tinycc and gcc-core-2.95.3 have been built. + +We are excited that the Nlnet Foundation is now sponsoring this work! + +Enjoy, +Janneke and Danny. + +* About + + GNU Mes[0] is a Scheme interpreter and C compiler for bootstrapping the + GNU System. Since version 0.22 it has again helped to halve the size of + opaque, uninspectable binary seeds that are currently being used in the + Reduced Binary Seed bootstrap[1] of GNU Guix[2]. The final goal is to + help create a full source bootstrap as part of the bootstrappable + builds[3] effort for UNIX-like operating systems. + + The Scheme interpreter is written in ~5,000 LOC of simple C, and the C + compiler written in Scheme and these are mutual self-hosting. This + mes.c is now being simplified to be transpiled by M2-Planet[4]. + + Mes has a Garbage Collector, a library of loadable Scheme modules-- + notably Dominique Boucher's LALR[5], Pre-R6RS portable syntax-case[6] + with R7RS ellipsis, Matt Wette's Nyacc[7] --and test suite, just + enough to support a REPL and a C99 compiler: mescc. + + Mes+MesCC can compile an only lightly patched TinyCC[8] that is + self-hosting. Using this tcc and the Mes C library we now have a + Reduced Binary Seed bootstrap for the gnutools triplet: glibc-2.2.5, + binutils-2.20.1, gcc-2.95.3. This is enough to bootstrap Guix for + i686-linux, x86_64-linux, armhf-linux and aarch64-linux. + + Mes is inspired by The Maxwell Equations of Software: LISP-1.5[9] -- John + McCarthy page 13, GNU Guix's source/binary packaging transparency and + Jeremiah Orians's stage0[10] ~500 byte self-hosting hex assembler. + + We are very grateful to NLNet for sponsoring the Reduced Binary Seed + bootstrap[11] and the ARM port[12]. + +* Download + + git clone git://git.savannah.gnu.org/mes.git + + Here are the compressed sources and a GPG detached signature[*]: + https://ftp.gnu.org/gnu/mes/mes-0.23.tar.gz + https://ftp.gnu.org/gnu/mes/mes-0.23.tar.gz.sig + + Use a mirror for higher download bandwidth: + https://ftpmirror.gnu.org/mes/mes-0.23.tar.gz + https://ftpmirror.gnu.org/mes/mes-0.23.tar.gz.sig + + Here are the MD5 and SHA1 checksums: + + xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx mes-0.23.tar.gz + xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx mes-0.23.tar.gz + + [*] Use a .sig file to verify that the corresponding file (without the + .sig suffix) is intact. First, be sure to download both the .sig file + and the corresponding tarball. Then, run a command like this: + + gpg --verify mes-0.23.tar.gz.sig + + If that command fails because you don't have the required public key, + then run this command to import it: + + gpg --keyserver keys.gnupg.net --recv-keys 1A858392E331EAFDB8C27FFBF3C1A0D9C1D65273 + + and rerun the 'gpg --verify' command. + +* Get informed, get involved + + See https://bootstrappable.org + Join #bootstrappable on irc.freenode.net. + +* NEWS + * Changes in 0.23 since 0.22 + ** Core + *** Mes and Mes C Library can now be built with GCC 10.x. + ** MesCC + *** The Mes C Library now supports an armhf-linux bootstrap. + *** MesCC now supports ARM. + *** mini.c library was split into _exit.c, and _write.c. + *** When building with GCC, -lgcc is now used. + *** MesCC now has it's own support library libmescc.a (-lmescc). + *** MesCC now requires mescc-tools-0.7.0 or later for ARM. + *** MesCC can be now built with nyacc-1.00.2: + note that nyacc-1.03.0 is not (backwards) compatible. + *** MesCC can be built with Guile 3.0.x: + See https://bugs.gnu.org/43831; use guild compile -O1 with Guile 3.0.x. + *** MesCC now raises SIGABRT on abort, if supported. + ** Noteworthy bug fixes + *** unreadchar on EOF is now a no-op. + *** malloc now aligns the blocks it gives out to max_align_t. + +[0] https://www.gnu.org/software/mes +[1] https://guix.gnu.org/blog/2020/guix-further-reduces-bootstrap-seed-to-25 +[2] https://www.gnu.org/software/guix +[3] https://bootstrappable.org +[4] https://github.com/oriansj/m2-planet +[5] https://github.com/schemeway/lalr-scm +[6] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html +[7] https://www.nongnu.org/nyacc +[8] https://gitlab.com/janneke/tinycc +[9] http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf +[10] https://savannah.nongnu.org/projects/stage0 +[11] https://nlnet.nl/project/GNUMes +[12] https://nlnet.nl/project/GNUMes-arm diff --git a/doc/mes.texi b/doc/mes.texi index 8494df8f..80183a77 100644 --- a/doc/mes.texi +++ b/doc/mes.texi @@ -13,7 +13,7 @@ @set OPENPGP-SIGNING-KEY-ID 1A858392E331EAFDB8C27FFBF3C1A0D9C1D65273 @copying -Copyright @copyright{} 2018,2019 Jan (janneke) Nieuwenhuizen@* +Copyright @copyright{} 2018,2019,2020,2021 Jan (janneke) Nieuwenhuizen@* Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -508,11 +508,11 @@ GNU Mes depends on the following packages: @itemize @item @url{http://gnu.org/software/guile/, GNU Guile}, version 2.0.13 or -later, including 2.2.x; +later, including 2.2.x and 3.0.x, @item @url{http://www.gnu.org/software/make/, GNU Make}. -@item @url{https://savannah.gnu.org/projects/nyacc/, NYACC}, 0.93.0 or later, including 0.99.0. -@item @url{http://gcc.gnu.org, GCC's gcc}, version 2.95.3 or later. -@item @url{https://savannah.gnu.org/projects/mescc-tools/, mescc-tools}, version 0.6.1 or later, +@item @url{https://savannah.gnu.org/projects/nyacc/, NYACC}, version 1.00.2, +@item @url{http://gcc.gnu.org, GCC's gcc}, version 2.95.3 or later, including 10.2.0, +@item @url{https://savannah.gnu.org/projects/mescc-tools/, mescc-tools}, version 0.7.0 or later, @end itemize @cindex Guile, compatibility @@ -640,7 +640,7 @@ The Reduced Binary Seed bootstrap currently adopted by Guix@footnote{See @file{gnu/packages/commencement.scm} in the @var{master} branch in Guix git @url{http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/commencement.scm}}. -In its intiial form it is only available for x86-linux. +In its intiial form it is only available for x86-linux arm armhf-linux. Currently, it goes like this: @@ -1053,12 +1053,12 @@ lives in the top build tree of Mes). @node Porting GNU Mes, The Perfect Setup, Running Mes From the Source Tree, Contributing @section Porting GNU Mes -Mes was written for x86-linux. A 64 bit (x86_64) is almost done, only a -few bugs remain. The Guix bootstrap for x86_64 uses x86 mes and that is -not expected to change. +Mes is supported for x86-linux and armhf-linux. A 64 bit (x86_64-linux) +is almost done, only a few bugs remain. The Guix bootstrap for +x86_64-linux uses mes for x86-lunix and that is not expected to change. +Likewise, aarch64-linux uses mes for armhf-linux. -An ARM (armv4/armv7l) linux port is underway. A port to GNU/Hurd -(x86-gnu) is also underway. +A port to GNU/Hurd (x86-gnu) is underway. Initial scaffold, built by @file{build-aux/build-scaffold.sh}: @example diff --git a/mes/module/mes/repl.mes b/mes/module/mes/repl.mes index 9f2c3547..4560d60b 100644 --- a/mes/module/mes/repl.mes +++ b/mes/module/mes/repl.mes @@ -1,7 +1,7 @@ ;;; -*-scheme-*- ;;; GNU Mes --- Maxwell Equations of Software -;;; Copyright © 2016,2017,2018 Jan (janneke) Nieuwenhuizen +;;; Copyright © 2016,2017,2018,2019,2020,2021 Jan (janneke) Nieuwenhuizen ;;; ;;; This file is part of GNU Mes. ;;; @@ -29,8 +29,8 @@ (define welcome (string-append "GNU Mes " %version " -Copyright (C) 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen -Copyright (C) 2019 Danny Milosavljevic +Copyright (C) 2016,2017,2018,2019,2020,2021 Jan (janneke) Nieuwenhuizen +Copyright (C) 2019,2020,2021 Danny Milosavljevic GNU Mes comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it