Compare commits
209 Commits
Author | SHA1 | Date |
---|---|---|
|
157c6da386 | |
|
67263894f9 | |
|
655dd267ca | |
|
48bcfadd3b | |
|
7c138ebdbc | |
|
0f6a03f5f2 | |
|
293b9eb5da | |
|
c471939a74 | |
|
a9f79c34ec | |
|
44e5a39756 | |
|
173b0e615e | |
|
542a8a4a66 | |
|
1ed5254df4 | |
|
a8bc7b4b0f | |
|
fab12946f1 | |
|
030b9b3575 | |
|
21d774c40e | |
|
273e37dfb0 | |
|
d578bee8e5 | |
|
9e4d62b15d | |
|
1739234cc5 | |
|
1117e3cb98 | |
|
9c0ff7b123 | |
|
8fe33921a3 | |
|
e34355f290 | |
|
41223ffbf4 | |
|
3073642e4b | |
|
60b9e0785c | |
|
ba188efc8d | |
|
92deedf55c | |
|
42845aadf6 | |
|
ae3c72dac5 | |
|
7a438c4757 | |
|
58dce4d34a | |
|
f612861cd8 | |
|
9dde43c320 | |
|
734d69c491 | |
|
cfa43e2a17 | |
|
b4a57cbbf1 | |
|
c4e40b8a7a | |
|
4222d4b45d | |
|
fe753c4a40 | |
|
717aed496f | |
|
4d49b6af6d | |
|
bb9edf4605 | |
|
7fc1614048 | |
|
2408220f2c | |
|
b63faffee0 | |
|
eb4bdaa729 | |
|
268a4dd7e3 | |
|
c84f88e446 | |
|
d667aab5bc | |
|
81a5f2afdb | |
|
6ac30c68d6 | |
|
b40bc2e745 | |
|
29064b8b2d | |
|
fed4444f96 | |
|
4110e82d58 | |
|
36e13334d7 | |
|
99506b4dbc | |
|
a47e65e01c | |
|
446ff8b055 | |
|
f259412985 | |
|
14aedd5623 | |
|
35a82d5515 | |
|
59cd14e982 | |
|
ebb608ef85 | |
|
a781708fda | |
|
61ea06d2b3 | |
|
ebec3ce34c | |
|
366ad5c816 | |
|
0026738794 | |
|
3032affd25 | |
|
31c20fb81b | |
|
6c3ff27de6 | |
|
e79f898515 | |
|
58f959ae8e | |
|
0c6c5fcc17 | |
|
a50da8f059 | |
|
c3dacad7da | |
|
669c376273 | |
|
f76a12ae37 | |
|
e4b24c27b1 | |
|
d363f1fee3 | |
|
84dad8ec52 | |
|
43a8fa8cb1 | |
|
ad5b1f5932 | |
|
885e7d3948 | |
|
335c00147e | |
|
41ce6dcce8 | |
|
e898234863 | |
|
a626ae9a05 | |
|
764f4fd170 | |
|
671ba4b21a | |
|
3034323fd8 | |
|
893d866d55 | |
|
7ded6103fc | |
|
3a6e0dd9b0 | |
|
928c691145 | |
|
fa4a212917 | |
|
59d6623ee6 | |
|
c8ff5817be | |
|
a3fd2c6dac | |
|
ec7e0b30ac | |
|
41f1548636 | |
|
4f173b7ceb | |
|
d306a02c00 | |
|
f33bc20bc7 | |
|
6e0ff69fc8 | |
|
e9eed6c996 | |
|
11a2d8f60c | |
|
b1af20c691 | |
|
e1c5d7ef7a | |
|
35db5aeefe | |
|
640ba776e7 | |
|
8133ac3553 | |
|
0a6df87427 | |
|
08d198413a | |
|
05f1662c86 | |
|
d20b96cd9c | |
|
4f2d6302bd | |
|
37ae5dc1fd | |
|
92ab4b0f3a | |
|
aa8be292a8 | |
|
237333857f | |
|
05417d7659 | |
|
b5d5e6bc94 | |
|
497b37dd42 | |
|
201aef922a | |
|
858793a953 | |
|
167c5d840b | |
|
46d932581e | |
|
ef0291470d | |
|
b320959731 | |
|
28d5cb4865 | |
|
4c64362805 | |
|
cd2e932d80 | |
|
f427a9a54d | |
|
0c97f67f28 | |
|
bf44b167d4 | |
|
972aa5d856 | |
|
1af450321a | |
|
9d5a4a78cc | |
|
a2f69f721f | |
|
520dadc60b | |
|
6e093bd6e4 | |
|
817430837c | |
|
4e92422bdf | |
|
bdd84ac5c6 | |
|
7ad95740b5 | |
|
59ab9a2444 | |
|
998644fcb6 | |
|
3001645d26 | |
|
5d499cb531 | |
|
3a270ca346 | |
|
2044609309 | |
|
e0fe761ee8 | |
|
888aaddf2f | |
|
989478f522 | |
|
214630c2f8 | |
|
7baa9d7d08 | |
|
30b580915e | |
|
a65ac3154b | |
|
723b25a2ac | |
|
6d761e812b | |
|
b56ba5d954 | |
|
45a25ee36f | |
|
8c95e3da56 | |
|
530b7e2260 | |
|
2bbf1579b2 | |
|
07fb20f172 | |
|
938f154fdc | |
|
e3763a312e | |
|
cc6d0b10d4 | |
|
e6d06cc63a | |
|
2ab42f7d10 | |
|
b959a02a19 | |
|
4181c4afdc | |
|
c1d006ce17 | |
|
78e0b21570 | |
|
17b6ad893a | |
|
7ea8fc60b5 | |
|
586fb79985 | |
|
e4bb357e99 | |
|
2a0799975b | |
|
1d8c0a5f1c | |
|
92f8f05a4b | |
|
4b65ece428 | |
|
a2f76f9b16 | |
|
ed2cd8ccfa | |
|
cd563a96e5 | |
|
31ea016b94 | |
|
96c8651733 | |
|
64ef3b8fe9 | |
|
6ae9b88237 | |
|
b12e7e895a | |
|
9a4aea5e29 | |
|
e29844e6a0 | |
|
5b2e3d2422 | |
|
802ce1569b | |
|
8040a57a06 | |
|
a359b0bf9f | |
|
d72833502c | |
|
f884f44e7c | |
|
a9370eb25a | |
|
d81acf49be | |
|
d2c8924316 | |
|
5554dea204 | |
|
c9ca4a0c79 |
|
@ -1,21 +1,3 @@
|
|||
# GNU Mes --- Maxwell Equations of Software
|
||||
# Copyright © 2016,2017,2019,2020,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
#
|
||||
# This file is part of GNU Mes.
|
||||
#
|
||||
# GNU Mes is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or (at
|
||||
# your option) any later version.
|
||||
#
|
||||
# GNU Mes is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
*-
|
||||
*~
|
||||
.#*
|
||||
|
@ -135,7 +117,6 @@
|
|||
/doc/images/gcc-mesboot-graph.pdf
|
||||
/doc/web/
|
||||
/config.sh
|
||||
/include/arch
|
||||
/include/mes/config.h
|
||||
/gcc-lib
|
||||
/mescc-lib
|
||||
|
|
8
COPYING
8
COPYING
|
@ -1,7 +1,7 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
@ -645,7 +645,7 @@ the "copyright" line and a pointer to where the full notice is found.
|
|||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
|
@ -664,11 +664,11 @@ might be different; for a GUI interface, you would use an "about box".
|
|||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
|
|
35
HACKING
35
HACKING
|
@ -5,8 +5,7 @@
|
|||
guix shell #64 bit + 32bit
|
||||
|
||||
CC=i686-unknown-linux-gnu-gcc ./configure
|
||||
CC=arm-unknown-linux-gnueabihf-gcc ./configure
|
||||
|
||||
CC=arm-unknown-linux-gnu-gcc ./configure
|
||||
or
|
||||
./configure
|
||||
|
||||
|
@ -130,30 +129,30 @@ x/s *((char **)($rsp+8))
|
|||
|
||||
** C parser/compiler
|
||||
*** [[https://savannah.gnu.org/projects/nyacc][nyacc]]
|
||||
*** PEG: [[https://piumarta.com/software/peg/][parse C using PEG]]
|
||||
*** PEG: [[http://piumarta.com/software/peg/][parse C using PEG]]
|
||||
*** [[https://en.wikipedia.org/wiki/Tiny_C_Compiler][Tiny C Compiler]]
|
||||
*** [[https://www.t3x.org/subc/index.html][Sub C]]
|
||||
*** [[http://www.t3x.org/subc/index.html][Sub C]]
|
||||
*** [[https://groups.google.com/forum/#!topic/comp.lang.lisp/VPuX0VsjTTE][C intepreter in LISP/Scheme/Python]]
|
||||
|
||||
** C assembler/linker
|
||||
*** [[https://www.tldp.org/HOWTO/Assembly-HOWTO/linux.html][Assembly HOWTO]]
|
||||
*** [[http://www.tldp.org/HOWTO/Assembly-HOWTO/linux.html][Assembly HOWTO]]
|
||||
*** ELF
|
||||
7f 45 4c 46
|
||||
*** [[https://www.muppetlabs.com/~breadbox/software/tiny/][Small ELF programs]]
|
||||
*** [[https://www.cirosantilli.com/elf-hello-world/][Elf hello world]]
|
||||
*** [[http://www.muppetlabs.com/~breadbox/software/tiny/][Small ELF programs]]
|
||||
*** [[http://www.cirosantilli.com/elf-hello-world/][Elf hello world]]
|
||||
** SC - c as s-expressions
|
||||
sc: https://sph.mn/content/3d3
|
||||
sc: http://sph.mn/content/3d3
|
||||
** RNRS
|
||||
*** [[https://www.scheme-reports.org/][Scheme Reports]]
|
||||
*** [[http://www.scheme-reports.org/][Scheme Reports]]
|
||||
*** [[ftp://publications.ai.mit.edu/ai-publications/pdf/AIM-349.pdf][Scheme - Report on Scheme]]
|
||||
*** [[ftp://publications.ai.mit.edu/ai-publications/pdf/AIM-452.pdf][RRS - Revised Report on Scheme]]
|
||||
|
||||
** tiny schemes
|
||||
https://forum.osdev.org/viewtopic.php?f=15&t=19937
|
||||
http://forum.osdev.org/viewtopic.php?f=15&t=19937
|
||||
|
||||
https://www.stripedgazelle.org/joey/dreamos.html
|
||||
https://armpit.sourceforge.net/
|
||||
https://common-lisp.net/project/movitz/movitz.html
|
||||
http://www.stripedgazelle.org/joey/dreamos.html
|
||||
http://armpit.sourceforge.net/
|
||||
http://common-lisp.net/project/movitz/movitz.html
|
||||
|
||||
<civodul> janneke: https://github.com/namin/inc looks interesting [15:18]
|
||||
** Orians Jeremiah
|
||||
|
@ -170,13 +169,13 @@ https://common-lisp.net/project/movitz/movitz.html
|
|||
<janneke> OriansJ: i looked a few times and saw 'LISP empty', so thanks for
|
||||
the pointer! [00:24]
|
||||
<civodul> OriansJ, janneke: from that page, there's also:
|
||||
https://web.archive.org/web/20160604035203fw_/https://homepage.ntlworld.com/edmund.grimley-evans/bcompiler.html
|
||||
https://web.archive.org/web/20160604035203fw_/http://homepage.ntlworld.com/edmund.grimley-evans/bcompiler.html
|
||||
|
||||
** C4/C500
|
||||
https://web.archive.org/web/20160604041431/https://homepage.ntlworld.com/edmund.grimley-evans/cc500/cc500.c
|
||||
https://web.archive.org/web/20160604041431/http://homepage.ntlworld.com/edmund.grimley-evans/cc500/cc500.c
|
||||
https://github.com/rswier/c4/blob/master/c4.c
|
||||
** Compilers for free
|
||||
https://codon.com/compilers-for-free
|
||||
http://codon.com/compilers-for-free
|
||||
** Small lisps
|
||||
*** [[https://www.mirrorservice.org/sites/www.bitsavers.org/bits/TI/Explorer/zeta-c/][ZETA-C]]
|
||||
** Small C compilers
|
||||
|
@ -188,10 +187,10 @@ simple as possible.
|
|||
*** pcc
|
||||
*** early GCC?
|
||||
https://miyuki.github.io/2017/10/04/gcc-archaeology-1.html
|
||||
*** [[https://tack.sourceforge.net/][ack]]
|
||||
*** [[http://tack.sourceforge.net/][ack]]
|
||||
<rain1> it may be possible to compile like this: mes |> ack |> pcc |> tcc |>
|
||||
gcc 4.7.4 |> gcc later version... up to modern
|
||||
*** [[https://web.archive.org/web/20160402225843/https://homepage.ntlworld.com/edmund.grimley-evans/cc500/][cc500]]
|
||||
*** [[https://web.archive.org/web/20160402225843/http://homepage.ntlworld.com/edmund.grimley-evans/cc500/][cc500]]
|
||||
** rain1's Bootstrapping Wiki: https://bootstrapping.miraheze.org/wiki/Main_Page
|
||||
** rain1's hex86
|
||||
https://notabug.org/rain1/hex86/src/master/tests/hex0b3.hex86
|
||||
|
|
8
INSTALL
8
INSTALL
|
@ -26,8 +26,8 @@ similar way.
|
|||
#+END_SRC
|
||||
|
||||
*** Other GNU/Linux
|
||||
- [[https://savannah.gnu.org/projects/mescc-tools/][mescc-tools]], 1.4.0 is known to work.
|
||||
- [[https://github.com/oriansj/m2-planet][M2-Planet]] (optional), 1.9.0 is known to work.
|
||||
- [[https://savannah.gnu.org/projects/mescc-tools/][mescc-tools]], 1.0.1 is known to work.
|
||||
- [[https://github.com/oriansj/m2-planet][M2-Planet]] (optional), 1.8.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.
|
||||
|
@ -79,8 +79,8 @@ The bootstrap build is part of Guix, see
|
|||
https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/commencement.scm
|
||||
|
||||
** Prerequisites
|
||||
- [[https://savannah.gnu.org/projects/mescc-tools/][mescc-tools]], 1.4.0 is known to work.
|
||||
- [[https://github.com/oriansj/m2-planet][M2-Planet]], 1.9.0 is known to work.
|
||||
- [[https://savannah.gnu.org/projects/mescc-tools/][mescc-tools]], 1.0.1 is known to work.
|
||||
- [[https://github.com/oriansj/m2-planet][M2-Planet]], 1.8.0 is known to work.
|
||||
- [[https://savannah.gnu.org/projects/nyacc][Nyacc]], 1.00.2 is known to work.
|
||||
|
||||
** Build it
|
||||
|
|
42
NEWS
42
NEWS
|
@ -2,7 +2,7 @@
|
|||
#+TITLE: GNU Mes NEWS – history of user-visible changes
|
||||
#+STARTUP: content hidestars
|
||||
|
||||
Copyright © 2016,2017,2018,2019,2021,2022,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
Copyright © 2016,2017,2018,2019,2021,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
|
@ -10,32 +10,6 @@ Copyright © 2016,2017,2018,2019,2021,2022,2023 Jan (janneke) Nieuwenhuizen <jan
|
|||
|
||||
Please send Mes bug reports to bug-mes@gnu.org.
|
||||
|
||||
* Changes in 0.24.2 since 0.24.1
|
||||
** Build
|
||||
*** A number of compile warnings have been fixed.
|
||||
*** The `simple.make' and `simple.sh' builds have been resurrected.
|
||||
** MesCC
|
||||
*** Some assembly defines were added for building TinyCC for x86_64.
|
||||
*** `__assert_fail' has been updated to use the standard signature.
|
||||
** Noteworthy bug fixes
|
||||
*** A bootstrap build without M2-Planet is now supported again.
|
||||
*** `gettimeofday' no longer segfaults in the M2-Planet build.
|
||||
*** `stat64' and friends are now used on 32bit platforms.
|
||||
This fixes https://debbugs.gnu.org/41264, and should also fix
|
||||
https://debbugs.gnu.org/49985,
|
||||
https://debbugs.gnu.org/53415,
|
||||
https://debbugs.gnu.org/53416.
|
||||
*** The Mes C Library now supports uppercase hex conversions.
|
||||
* Changes in 0.24.1 since 0.24
|
||||
** Build
|
||||
*** Support M2-Planet bootstrap for ARM.
|
||||
** MesCC
|
||||
*** The Mes C Library now supports bootstrapping ARM.
|
||||
** Noteworthy bug fixes
|
||||
*** The definition of S_ISUID was fixed.
|
||||
*** Unsigned modulo has been fixed for ARM.
|
||||
*** A bug with abtol has been fixed.
|
||||
*** Workarounds for building with gcc-12.2.0 have been added.
|
||||
* Changes in 0.24 since 0.23
|
||||
** Core
|
||||
*** Mes and Mes C Library can now be built with M2-Planet.
|
||||
|
@ -50,20 +24,6 @@ Next to `U', also support `ULL', `UL', `L', and `LL'.
|
|||
*** Development build support with Guile-2 was resurrected.
|
||||
*** The logand procedure now works correctly.
|
||||
*** The 64bit build was resurrected.
|
||||
|
||||
* Changes in 0.23.1 since 0.23
|
||||
** Build: Move to libera.chat.
|
||||
** Core
|
||||
*** Mes and Mes C Library can now support ARM bootstrap.
|
||||
** MesCC
|
||||
*** MesCC now supports ARM bootstrap.
|
||||
** Noteworthy bug fixes
|
||||
*** Stack frame 0 does not perform out of bounds access.
|
||||
*** MesCC's -m64 works again.
|
||||
*** Guile-2 support has been resurrected.
|
||||
*** logand has been fixed.
|
||||
*** Mes C Library now supports more than 255 command line parameters.
|
||||
|
||||
* Changes in 0.23 since 0.22
|
||||
** Core
|
||||
*** Mes and Mes C Library can now be built with GCC 10.x.
|
||||
|
|
2
PORTING
2
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 shell --system=armhf-linux --pure bash coreutils diffutils findutils gawk gcc-toolchain grep git guile gzip help2man make mescc-tools nyacc openssh-sans-x pkg-config sed tar texinfo
|
||||
guix shell --system=armhf-linux --pure 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
|
||||
|
|
8
README
8
README
|
@ -6,8 +6,8 @@
|
|||
[[https://www.gnu.org/software/mes][GNU Mes]] 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
|
||||
[[https://guix.gnu.org/blog/2020/guix-further-reduces-bootstrap-seed-to-25][Further Reduced Binary Seed bootstrap]] of [[https://www.gnu.org/software/guix][GNU Guix]]. The final goal is to
|
||||
help create a full-source bootstrap as part of the [[https://bootstrappable.org][bootstrappable builds]]
|
||||
[[https://guix.gnu.org/blog/2019/guix-reduces-bootstrap-seed-by-50/][Reduced Binary Seed bootstrap]] of [[https://www.gnu.org/software/guix][GNU Guix]]. The final goal is to help
|
||||
create a full source bootstrap as part of the [[http://bootstrappable.org][bootstrappable builds]]
|
||||
effort for UNIX-like operating systems.
|
||||
|
||||
The Scheme interpreter is written in ~5,000 LOC of simple C, and the C
|
||||
|
@ -25,7 +25,7 @@ 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: [[https://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf][LISP-1.5]] -- John
|
||||
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.
|
||||
|
||||
|
@ -76,7 +76,7 @@ General Public Licence version 3 or later. See the file [[file:COPYING][COPYING
|
|||
[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] [[https://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf]]
|
||||
[10] [[http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf]]
|
||||
[11] https://savannah.nongnu.org/projects/stage0
|
||||
[12] https://nlnet.nl/project/GNUMes
|
||||
[13] https://nlnet.nl/project/GNUMes-arm
|
||||
|
|
14
ROADMAP
14
ROADMAP
|
@ -1,7 +1,7 @@
|
|||
-*- org -*-
|
||||
#+TITLE: Tentative GNU Mes Road Map
|
||||
|
||||
Copyright © 2016,2017,2018,2019,2020,2022,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
Copyright © 2016,2017,2018,2019,2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
|
@ -23,15 +23,13 @@ on Libera Chat!
|
|||
|
||||
* TODO
|
||||
** release 0.x, unsorted
|
||||
- Full Guile module support.
|
||||
- Run Gash and Gash-Utils on Mes.
|
||||
- Remove Guile as a dependency for the Guix Full Source Bootstrap.
|
||||
- Integrate Full Source bootstrap for ARM on GNU Guix;
|
||||
see branch wip-aarch64-bootstrap.
|
||||
- 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.
|
||||
|
@ -66,10 +64,6 @@ on Libera Chat!
|
|||
https://srfi.schemers.org/srfi-72/srfi-72.html, or
|
||||
+ ... drop it?
|
||||
* DONE
|
||||
- 0.24: Full Source Bootstrap:
|
||||
+ integrate into GNU Guix; see branch wip-full-source-bootstrap.
|
||||
- 0.23 Full Source Bootstrap:
|
||||
+ compile mes.c using M2-Planet; see branch wip-m2,
|
||||
- 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
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# GNU Mes --- Maxwell Equations of Software
|
||||
# Copyright © 2018,2019,2021,2022,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
# Copyright © 2018,2019,2021 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
#
|
||||
# This file is part of GNU Mes.
|
||||
#
|
||||
|
@ -85,26 +85,17 @@ PHONY_TARGETS:=\
|
|||
|
||||
.PHONY: $(PHONY_TARGETS)
|
||||
|
||||
X86_ARCH_HEADERS = $(wildcard $(scrdest)include/linux/x86/*.h)
|
||||
ARCH_HEADERS = $(X86_ARCH_HEADERS:$(srcdest)include/linux/x86/%=include/arch/%)
|
||||
|
||||
default: all
|
||||
|
||||
all: doc
|
||||
|
||||
doc: build
|
||||
|
||||
build: | $(ARCH_HEADERS)
|
||||
build:
|
||||
$(SHELL) build.sh
|
||||
|
||||
src/${program_prefix}mes: build
|
||||
|
||||
include/arch/%.h: $(srcdest)include/$(mes_kernel)/$(mes_cpu)/%.h | arch-dir
|
||||
cp -f $< $@
|
||||
|
||||
arch-dir:
|
||||
mkdir -p include/arch
|
||||
|
||||
clean:
|
||||
rm -f *.o *.s bin/mes bin/mes-gcc bin/mes-mescc
|
||||
rm -f mes.{aux,cp,cps,fn,info,log,tmp,toc,vr,vrs}
|
||||
|
@ -270,16 +261,6 @@ WEB_IMAGES:=\
|
|||
web: info $(WEB_IMAGES)
|
||||
GENDOCS_TEMPLATE_DIR=doc build-aux/gendocs.sh -I doc -s ${srcdest}doc/mes.texi -o doc/web/manual --email bug-mes@gnu.org mes "GNU Mes manual"
|
||||
|
||||
SITE = /srv/mes.org
|
||||
publish: web
|
||||
rsync -P -v . $(SITE)/
|
||||
rsync -P -v . $(SITE)/manual/
|
||||
rsync -P -rvz doc/web/manual/ $(SITE)/manual/
|
||||
|
||||
LOCAL_SITE = $(HOME)/src/web/mes
|
||||
publish-local: web
|
||||
$(MAKE) publish SITE=$(LOCAL_SITE)
|
||||
|
||||
### dist
|
||||
COMMIT=$(shell test -e ${srcdest}.git && (cd ${srcdir} && git describe --dirty 2>/dev/null) || cat ${srcdest}.tarball-version)
|
||||
TARBALL_VERSION=$(COMMIT:v%=%)
|
||||
|
@ -301,10 +282,7 @@ GIT_LS_FILES:=find
|
|||
MTIME:=0
|
||||
endif
|
||||
|
||||
check-signature:
|
||||
git show HEAD --show-signature |grep 'gpg: Good signature'
|
||||
|
||||
dist: check-signature $(TARBALL)
|
||||
dist: $(TARBALL)
|
||||
|
||||
sign-dist: $(TARBALL)
|
||||
gpg -a --output $(TARBALL).sig --detach-sig $(TARBALL)
|
||||
|
@ -357,28 +335,22 @@ tag:
|
|||
# 1. Tag for release
|
||||
# make tag VERSION=0.23
|
||||
# 2. Create signed tarball
|
||||
# ./configure
|
||||
# make sign-dist
|
||||
# 3. Update Guix package description
|
||||
# make release
|
||||
# - make release
|
||||
# 4. Finish announcement
|
||||
# - make sum-announce
|
||||
# - Update doc/announce/ANNOUNCE-0.23
|
||||
# - doc: Post-release update.
|
||||
# - 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. Update web
|
||||
# - make publish-local
|
||||
# - Update ~/src/web/mes/index.html
|
||||
# - Upload: cvs ci
|
||||
# 8. Create blog post
|
||||
# 7. Create blog post
|
||||
# cp doc/announce/ANNOUNCE-0.23 ~/src/web/joyofsource.com/posts/announce-0.23.md
|
||||
# fix urls and all
|
||||
# 9. Send mail
|
||||
# 8. Send mail
|
||||
# To: info-gnu@gnu.org
|
||||
# Cc: bug-mes@gnu.org
|
||||
# Cc: guix-devel@gnu.org
|
||||
# Cc: bootstrappable@freelists.org
|
||||
# Cc: rb-general@lists.reproducible-builds.org
|
||||
|
@ -386,7 +358,7 @@ tag:
|
|||
guix-build:
|
||||
./pre-inst-env $(GUIX) build mes@$(VERSION) --with-source=$(TARBALL)
|
||||
|
||||
release: check-signature update-hash
|
||||
release: update-hash
|
||||
git commit -m 'guix: mes: Update to $(VERSION).' \
|
||||
-m '* guix/git/mes.scm (mes)[source]: Update to $(VERSION).' \
|
||||
guix/git/mes.scm
|
||||
|
@ -398,20 +370,13 @@ gen-announce:
|
|||
$(GEN_ANNOUNCE) \
|
||||
--release-type=beta \
|
||||
--package-name=mes \
|
||||
--previous-version='0.24.1' \
|
||||
--previous-version='0.23 ' \
|
||||
--current-version=$(VERSION) \
|
||||
--gpg-key-id=$(GPG_KEY_ID) \
|
||||
--url-directory=https://ftp.gnu.org/gnu/mes \
|
||||
--news=NEWS \
|
||||
> doc/announce/ANNOUNCE-$(VERSION)
|
||||
|
||||
sum-announce:
|
||||
sed -i \
|
||||
-e "s, xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx $(PACKAGE)-$(VERSION).tar.gz, $(shell sha256sum $(PACKAGE)-$(VERSION).tar.gz)," \
|
||||
-e "s, xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx $(PACKAGE)-$(VERSION).tar.gz, $(shell sha1sum $(PACKAGE)-$(VERSION).tar.gz)," \
|
||||
-e "s, xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx $(PACKAGE)-$(VERSION).tar.gz, $(shell md5sum $(PACKAGE)-$(VERSION).tar.gz)," \
|
||||
doc/announce/ANNOUNCE-$(VERSION)
|
||||
|
||||
installdirs: mkinstalldirs
|
||||
mkdir -p\
|
||||
$(DESTDIR)$(bindir)\
|
||||
|
|
|
@ -50,7 +50,7 @@ srcdest=../${srcdest}
|
|||
ln -sf ${srcdest}mes .
|
||||
ln -sf ${srcdest}module .
|
||||
ln -sf ${srcdest}src .
|
||||
AM_CPPFLAGS="-D HAVE_CONFIG_H=1 -I ${srcdest}include -I ../include -I include"
|
||||
AM_CPPFLAGS="-D HAVE_CONFIG_H=1 -I ${srcdest}include -I ${srcdest}include/$mes_kernel/$mes_cpu"
|
||||
AM_CFLAGS="-L ${srcdest}lib"
|
||||
|
||||
mkdir -p $mes_cpu-mes
|
||||
|
@ -108,7 +108,7 @@ $AR crD $mes_cpu-mes/libc+tcc.a $objects
|
|||
|
||||
cd ..
|
||||
srcdest=
|
||||
AM_CPPFLAGS="-D HAVE_CONFIG_H=1 -I ${srcdest}include -I ../include -I include"
|
||||
CPPFLAGS="-D HAVE_CONFIG_H=1 -I ${srcdest}include -I ${srcdest}include/$mes_kernel/$mes_cpu"
|
||||
AM_CFLAGS="-L ${srcdest}lib"
|
||||
|
||||
objects=
|
||||
|
|
|
@ -64,6 +64,16 @@ if test -e libc+tcc.s; then
|
|||
cp libc+tcc.s $mes_cpu-mes
|
||||
fi
|
||||
|
||||
if $courageous; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
archive libc+gnu.a $libc_gnu_SOURCES
|
||||
cp libc+gnu.a $mes_cpu-mes
|
||||
if test -e libc+gnu.s; then
|
||||
cp libc+gnu.s $mes_cpu-mes
|
||||
fi
|
||||
|
||||
archive libtcc1.a $libtcc1_SOURCES
|
||||
cp libtcc1.a $mes_cpu-mes
|
||||
if test -e libtcc1.s; then
|
||||
|
@ -75,13 +85,3 @@ cp libgetopt.a $mes_cpu-mes
|
|||
if test -e libgetopt.s; then
|
||||
cp libgetopt.s $mes_cpu-mes
|
||||
fi
|
||||
|
||||
if $courageous; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
archive libc+gnu.a $libc_gnu_SOURCES
|
||||
cp libc+gnu.a $mes_cpu-mes
|
||||
if test -e libc+gnu.s; then
|
||||
cp libc+gnu.s $mes_cpu-mes
|
||||
fi
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#! /bin/sh
|
||||
|
||||
# GNU Mes --- Maxwell Equations of Software
|
||||
# Copyright © 2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
# Copyright © 2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
#
|
||||
# This file is part of GNU Mes.
|
||||
#
|
||||
|
@ -29,7 +29,6 @@ fi
|
|||
|
||||
. ./config.sh
|
||||
. ${srcdest}build-aux/trace.sh
|
||||
. ${srcdest}build-aux/cflags.sh
|
||||
|
||||
if $courageous; then
|
||||
set +e
|
||||
|
@ -43,6 +42,25 @@ else
|
|||
}
|
||||
fi
|
||||
|
||||
case "$mes_cpu" in
|
||||
arm)
|
||||
stage0_arch=40
|
||||
stage0_cpu=armv7l
|
||||
;;
|
||||
x86_64)
|
||||
stage0_arch=2
|
||||
stage0_cpu=amd64
|
||||
;;
|
||||
x86)
|
||||
stage0_arch=1
|
||||
stage0_cpu=x86
|
||||
;;
|
||||
*)
|
||||
stage0_arch=1
|
||||
stage0_cpu=$mes_cpu
|
||||
;;
|
||||
esac
|
||||
|
||||
trace "CCLD ${srcdest}lib/$mes_kernel/$mes_cpu-mes-$compiler/exit-42.S" $CC\
|
||||
-nostdlib\
|
||||
-g\
|
||||
|
@ -66,6 +84,7 @@ trace "HEX2 ${srcdest}lib/$mes_kernel/$mes_cpu-mes/elf$mes_bits-0exit-42.h
|
|||
--base-address 0x1000000\
|
||||
-f ${srcdest}lib/$mes_kernel/$mes_cpu-mes/elf$mes_bits-0header.hex2\
|
||||
-f ${srcdest}lib/$mes_kernel/$mes_cpu-mes/elf$mes_bits-0exit-42.hex2\
|
||||
--exec_enable\
|
||||
-o 0exit-42
|
||||
|
||||
trace "TEST 0exit-42"
|
||||
|
@ -80,6 +99,7 @@ trace "HEX2 ${srcdest}lib/$mes_kernel/$mes_cpu-mes/elf$mes_bits-body-exit-
|
|||
-f ${srcdest}lib/$mes_kernel/$mes_cpu-mes/elf$mes_bits-header.hex2\
|
||||
-f ${srcdest}lib/$mes_kernel/$mes_cpu-mes/elf$mes_bits-body-exit-42.hex2\
|
||||
-f ${srcdest}lib/$mes_kernel/$mes_cpu-mes/elf$mes_bits-footer-single-main.hex2\
|
||||
--exec_enable\
|
||||
-o body-exit-42
|
||||
|
||||
trace "TEST body-exit-42"
|
||||
|
@ -105,6 +125,7 @@ trace "HEX2 ${srcdest}lib/$mes_kernel/$mes_cpu-mes/elf$mes_bits-0hello-mes
|
|||
--base-address 0x1000000\
|
||||
-f ${srcdest}lib/$mes_kernel/$mes_cpu-mes/elf$mes_bits-0header.hex2\
|
||||
-f ${srcdest}lib/$mes_kernel/$mes_cpu-mes/elf$mes_bits-0hello-mes.hex2\
|
||||
--exec_enable\
|
||||
-o 0hello-mes
|
||||
|
||||
trace "TEST 0hello-mes"
|
||||
|
@ -119,6 +140,7 @@ trace "HEX2 ${srcdest}lib/$mes_kernel/$mes_cpu-mes/elf$mes_bits-body-hello
|
|||
-f ${srcdest}lib/$mes_kernel/$mes_cpu-mes/elf$mes_bits-header.hex2\
|
||||
-f ${srcdest}lib/$mes_kernel/$mes_cpu-mes/elf$mes_bits-body-hello-mes.hex2\
|
||||
-f ${srcdest}lib/$mes_kernel/$mes_cpu-mes/elf$mes_bits-footer-single-main.hex2\
|
||||
--exec_enable\
|
||||
-o body-hello-mes
|
||||
|
||||
trace "TEST body-hello-mes"
|
||||
|
|
|
@ -38,6 +38,25 @@ set -u
|
|||
. ./config.sh
|
||||
. ${srcdest}build-aux/cflags.sh
|
||||
|
||||
case "$mes_cpu" in
|
||||
arm)
|
||||
stage0_arch=40
|
||||
stage0_cpu=armv7l
|
||||
;;
|
||||
x86_64)
|
||||
stage0_arch=2
|
||||
stage0_cpu=amd64
|
||||
;;
|
||||
x86)
|
||||
stage0_arch=1
|
||||
stage0_cpu=x86
|
||||
;;
|
||||
*)
|
||||
stage0_arch=1
|
||||
stage0_cpu=$mes_cpu
|
||||
;;
|
||||
esac
|
||||
|
||||
if $courageous; then
|
||||
echo "Applying courage"
|
||||
set +e
|
||||
|
@ -66,8 +85,9 @@ fi
|
|||
AM_CPPFLAGS="
|
||||
-D HAVE_CONFIG_H=1
|
||||
-I ${srcdest}lib
|
||||
-I include
|
||||
-I ${srcdest}include
|
||||
-I ../include
|
||||
-I ${srcdest}include/$mes_kernel/$mes_cpu
|
||||
"
|
||||
if test $mes_kernel = gnu; then
|
||||
AM_CPPFLAGS="$AM_CPPFLAGS
|
||||
|
@ -92,17 +112,16 @@ fi
|
|||
AM_CPPFLAGS="
|
||||
-D HAVE_CONFIG_H=1
|
||||
-I ${srcdest}lib
|
||||
-I ${srcdest}include
|
||||
-I ../include
|
||||
-I include
|
||||
-I ${srcdest}include
|
||||
-I ${srcdest}include/$mes_kernel/$mes_cpu
|
||||
"
|
||||
if test "$compiler" != bootstrap; then
|
||||
${SHELL} ${srcdest}build-aux/build-mes.sh
|
||||
fi
|
||||
)
|
||||
|
||||
if test -n "$M2_PLANET" && (test "$mes_cpu" == "x86" \
|
||||
|| test "$mes_cpu" == "arm"); then
|
||||
if test -n "$M2_PLANET"; then
|
||||
(
|
||||
. ${srcdest}build-aux/trace.sh
|
||||
if [ -z "$V" -o "$V" = 0 ]; then
|
||||
|
@ -136,9 +155,9 @@ fi
|
|||
AM_CPPFLAGS="
|
||||
-D HAVE_CONFIG_H=1
|
||||
-I ${srcdest}lib
|
||||
-I ${srcdest}include
|
||||
-I ../include
|
||||
-I include
|
||||
-I ${srcdest}include
|
||||
-I ${srcdest}include/$mes_kernel/$mes_cpu
|
||||
"
|
||||
compiler=mescc
|
||||
AR=${MESAR-"${srcdest}pre-inst-env mesar"}
|
||||
|
@ -150,7 +169,6 @@ fi
|
|||
${SHELL} ${srcdest}build-aux/build-lib.sh
|
||||
${SHELL} ${srcdest}build-aux/build-source-lib.sh
|
||||
if $bootstrap; then
|
||||
rm -f globals.* # FIXME: avoid name clash with globals from lib
|
||||
${SHELL} ${srcdest}build-aux/build-mes.sh
|
||||
cp -f bin/mes-mescc ../bin
|
||||
cp -f bin/mes ../bin
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# GNU Mes --- Maxwell Equations of Software
|
||||
# Copyright © 2018,2019,2020,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
# Copyright © 2018,2019,2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
#
|
||||
# This file is part of GNU Mes.
|
||||
#
|
||||
|
@ -16,25 +16,6 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
case "$mes_cpu" in
|
||||
arm)
|
||||
stage0_arch=40
|
||||
stage0_cpu=armv7l
|
||||
;;
|
||||
x86_64)
|
||||
stage0_arch=2
|
||||
stage0_cpu=amd64
|
||||
;;
|
||||
x86)
|
||||
stage0_arch=1
|
||||
stage0_cpu=x86
|
||||
;;
|
||||
*)
|
||||
stage0_arch=1
|
||||
stage0_cpu=$mes_cpu
|
||||
;;
|
||||
esac
|
||||
|
||||
AM_CPPFLAGS="
|
||||
-D HAVE_CONFIG_H=1
|
||||
-I ${srcdest}include
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#! /bin/sh
|
||||
|
||||
# GNU Mes --- Maxwell Equations of Software
|
||||
# Copyright © 2017,2018,2019,2020,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
# Copyright © 2017,2018,2019,2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
#
|
||||
# This file is part of GNU Mes.
|
||||
#
|
||||
|
@ -117,7 +117,6 @@ lib/tests/scaffold/54-argv.c
|
|||
lib/tests/scaffold/55-char-array.c
|
||||
lib/tests/scaffold/60-math.c
|
||||
lib/tests/scaffold/60-math-itoa.c
|
||||
lib/tests/scaffold/60-math-modulo.c
|
||||
lib/tests/scaffold/61-array.c
|
||||
lib/tests/scaffold/62-array.c
|
||||
lib/tests/scaffold/63-struct.c
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#! @SHELL@
|
||||
|
||||
# GNU Mes --- Maxwell Equations of Software
|
||||
# Copyright © 2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
# Copyright © 2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
#
|
||||
# This file is part of GNU Mes.
|
||||
#
|
||||
|
@ -99,7 +99,6 @@ mkdir -p $DESTDIR$includedir
|
|||
mkdir -p $DESTDIR$libdir
|
||||
mkdir -p $DESTDIR$pkgdatadir
|
||||
tar -cf- -C ${srcdir}/include . | tar -${v}xf- -C $DESTDIR$includedir
|
||||
tar -cf- -C include . | tar -${v}xf- -C $DESTDIR$includedir
|
||||
tar -cf- -C ${srcdir}/lib $mes_cpu-mes | tar -${v}xf- -C $DESTDIR$libdir
|
||||
tar -cf- -C ${srcdir}/lib $mes_kernel/$mes_cpu-mes | tar -${v}xf- -C $DESTDIR$libdir
|
||||
if test -z "$srcdest"; then
|
||||
|
|
|
@ -4,7 +4,7 @@ MES_ARENA=100000000 exec ${SCHEME-guile} -L . --no-auto-compile -e '(configure)'
|
|||
!#
|
||||
|
||||
;;; GNU Mes --- Maxwell Equations of Software
|
||||
;;; Copyright © 2016,2017,2018,2019,2020,2021,2022,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
;;; Copyright © 2016,2017,2018,2019,2020,2021,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
;;; Copyright © 2020 Vagrant Cascadian <vagrant@reproducible-builds.org>
|
||||
;;;
|
||||
;;; configure: This file is part of GNU Mes.
|
||||
|
@ -37,7 +37,7 @@ MES_ARENA=100000000 exec ${SCHEME-guile} -L . --no-auto-compile -e '(configure)'
|
|||
(define PACKAGE "mes")
|
||||
(define PACKAGE-NAME "GNU Mes")
|
||||
(define PACKAGE-BUGREPORT "bug-mes@gnu.org")
|
||||
(define VERSION "0.24.2")
|
||||
(define VERSION "0.24")
|
||||
|
||||
(cond-expand
|
||||
(guile)
|
||||
|
@ -454,11 +454,11 @@ Some influential environment variables:
|
|||
(deps (fold (lambda (program results)
|
||||
(cons (check-program-version program) results))
|
||||
'()
|
||||
(list (make-dep "hex2" #:version '(1 4 0))
|
||||
(make-dep "M1" #:version '(1 4 0))
|
||||
(make-dep "blood-elf" #:version '(2 0 0))
|
||||
(make-dep "kaem" #:version '(1 0 0) #:optional? #t)
|
||||
(list (make-dep "kaem" #:version '(0 6) #:optional? #t)
|
||||
(make-dep "M2-Planet" #:version '(1 9 0) #:optional? #t)
|
||||
(make-dep "hex2")
|
||||
(make-dep "M1")
|
||||
(make-dep "blood-elf")
|
||||
(make-dep "diff" #:optional? #t)
|
||||
(make-dep "guile" #:version '(2 0) #:commands '("guile-3.0" "guile-3" "guile-2.2" "guile-2.0" "guile-2" "guile") #:optional? #t)
|
||||
(make-dep "mes" #:version '(0 22) #:optional? #t)
|
||||
|
@ -494,7 +494,6 @@ Some influential environment variables:
|
|||
(file-name "cc" deps)
|
||||
(file-name "cc-v" deps)
|
||||
(file-name "mescc" deps)))
|
||||
(m2-planet (file-name "M2-Planet" deps))
|
||||
(deps (if cc
|
||||
(cons* (check-header-c cc (make-dep "limits.h"))
|
||||
(check-header-c cc (make-dep "stdio.h" #:optional? #t))
|
||||
|
@ -630,7 +629,7 @@ See \"Porting GNU Mes\" in the manual, or try --with-courage\n" mes-system)
|
|||
|
||||
("@AR@" . ,(or (file-name "ar" deps) ""))
|
||||
("@BASH@" . ,bash)
|
||||
("@CC@" . ,(or cc ""))
|
||||
("@CC@" . ,cc)
|
||||
("@DIFF@" . ,(or (file-name "diff" deps) (string-append abs-top-builddir "/pre-inst-env diff.scm")))
|
||||
("@DOT@" . ,(or (file-name "dot" deps) ""))
|
||||
("@GIT@" . ,(or (file-name "git" deps) ""))
|
||||
|
@ -707,13 +706,6 @@ See \"Porting GNU Mes\" in the manual, or try --with-courage\n" mes-system)
|
|||
#define MES_VERSION \"" VERSION "\"
|
||||
")))))
|
||||
(substitute (string-append srcdest "build-aux/config.make.in") pairs #:target ".config.make"))
|
||||
(let ((arch-dir (string-append srcdest "include/" mes-kernel "/" mes-cpu)))
|
||||
(define (copy-header file-name)
|
||||
(system* "cp" "-f" "-v"
|
||||
(string-append arch-dir "/" file-name)
|
||||
(string-append "include/arch/" file-name)))
|
||||
(system* "mkdir" "-p" "include/arch")
|
||||
(for-each copy-header '("kernel-stat.h" "syscall.h")))
|
||||
|
||||
(let ((make (and=> (file-name "make" deps) basename)))
|
||||
(display (string-append "
|
||||
|
|
12
configure.sh
12
configure.sh
|
@ -1,7 +1,7 @@
|
|||
#! /bin/sh
|
||||
|
||||
# GNU Mes --- Maxwell Equations of Software
|
||||
# Copyright © 2018,2019,2021,2022,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
# Copyright © 2018,2019,2021 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
#
|
||||
# This file is part of GNU Mes.
|
||||
#
|
||||
|
@ -20,7 +20,7 @@
|
|||
|
||||
set -e
|
||||
|
||||
VERSION=0.24.2
|
||||
VERSION=0.24
|
||||
srcdir=${srcdir-$(dirname $0)}
|
||||
srcdest=
|
||||
if test "$srcdir" != "."; then
|
||||
|
@ -77,8 +77,8 @@ GUILE=${GUILE-$(command -v guile)} || true
|
|||
HEX2=${HEX2-$(command -v hex2)}
|
||||
LDPFLAGS=${LDFLAGS-}
|
||||
M1=${M1-$(command -v M1)}
|
||||
M2_PLANET=${M2_PLANET-$(command -v M2-Planet)} || true
|
||||
KAEM=${KAEM-$(command -v kaem)} || true
|
||||
M2_PLANET=${M1-$(command -v M2-Planet)}
|
||||
KAEM=${KAEM-$(command -v kaem)}
|
||||
MES_FOR_BUILD=${MES_FOR_BUILD-$(command -v mes || command -v guile || echo mes)}
|
||||
GIT=${GIT-$(command -v git)} || true
|
||||
PERL=${PERL-$(command -v perl)} || true
|
||||
|
@ -271,10 +271,6 @@ cat >> include/mes/config.h <<EOF
|
|||
#define MES_VERSION "$VERSION"
|
||||
EOF
|
||||
|
||||
mkdir -p include/arch
|
||||
cp -f -v ${srcdest}include/${mes_kernel}/${mes_cpu}/kernel-stat.h include/arch
|
||||
cp -f -v ${srcdest}include/${mes_kernel}/${mes_cpu}/syscall.h include/arch
|
||||
|
||||
cat <<EOF
|
||||
GNU Mes is configured for
|
||||
compiler: $compiler
|
||||
|
|
|
@ -10,15 +10,12 @@ Mes has now been ported to M2-Planet and can be bootstrapped using
|
|||
stage0-posix[0], starting from the 357-byte hex0 binary of the
|
||||
bootstrap-seeds[1], as was promised at FOSDEM'21[2].
|
||||
|
||||
Work to integrate this so-called "Full Source Bootstrap" is happening on
|
||||
the wip-full-source-bootstrap[3] branch.
|
||||
|
||||
We are exciteda that the NlNet Foundation[4] is again sponsoring this
|
||||
work!
|
||||
|
||||
What's next?
|
||||
|
||||
Work to integrate this so-called "Full Source Bootstrap" is happening on
|
||||
the wip-full-source-bootstrap[3] branch. Also, full Guile compatible
|
||||
module support, and RICS-V support.
|
||||
|
||||
Enjoy!
|
||||
|
||||
* About
|
||||
|
@ -63,8 +60,11 @@ Enjoy!
|
|||
|
||||
Here are the SHA1 and SHA256 checksums:
|
||||
|
||||
f6681aa02edc6729af43f1d7c46ae1a97cbc1c92 mes-0.24.tar.gz
|
||||
828be15e02c103df8a248232491fba10d763724d6ec10f08a2e0e1d249bd9902 mes-0.24.tar.gz
|
||||
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx mes-0.24.tar.gz
|
||||
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx mes-0.24.tar.gz
|
||||
|
||||
The SHA256 checksum is base64 encoded, instead of the
|
||||
hexadecimal encoding that most checksum tools default to.
|
||||
|
||||
[*] 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
|
||||
|
|
|
@ -1,115 +0,0 @@
|
|||
|
||||
Subject: GNU Mes 0.24.1 released
|
||||
|
||||
<#secure method=pgpmime mode=sign>
|
||||
|
||||
We are happy to announce the release of GNU Mes 0.24.1, representing 23
|
||||
commits over five months by four people.
|
||||
|
||||
Mes now supports the stage0-posix and M2-Planet Full Source bootstrap on
|
||||
Aarch64 for ARM. Because stage0-posix does not support ARM yet, the Mes
|
||||
ARM bootstrap is currently prototyped on Aarch64.
|
||||
|
||||
We are excited that the NlNet Foundation[4] is again sponsoring this
|
||||
work!
|
||||
|
||||
What's next?
|
||||
|
||||
Work to prototype this so-called "Full Source Bootstrap" for ARM on
|
||||
Aarch64 is happening on the wip-aarch64-bootstrap[3] branch. Also, full
|
||||
Guile compatible module support, and RISC-V support.
|
||||
|
||||
Enjoy!
|
||||
|
||||
* About
|
||||
|
||||
GNU Mes[5] 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[6] of GNU Guix[7]. The
|
||||
final goal is to help create a full source bootstrap as part of the
|
||||
bootstrappable builds[8] 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. Mes can
|
||||
now be bootstrapped from M2-Planet[9] and Mescc-Tools[10].
|
||||
|
||||
Mes has a Garbage Collector, a library of loadable Scheme modules--
|
||||
notably Dominique Boucher's LALR[11], Pre-R6RS portable
|
||||
syntax-case[12] with R7RS ellipsis, Matt Wette's Nyacc[13] --and test
|
||||
suite, just enough to support a REPL and a C99 compiler: mescc.
|
||||
|
||||
Mes + MesCC + Mes C Library can build a bootstrappable TinyCC[14] 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[15] --
|
||||
John McCarthy page 13, GNU Guix's source/binary packaging transparency
|
||||
and Jeremiah Orians's stage0[16] 357-byte self-hosting hex assembler.
|
||||
|
||||
* 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.24.1.tar.gz
|
||||
https://ftp.gnu.org/gnu/mes/mes-0.24.1.tar.gz.sig
|
||||
|
||||
Use a mirror for higher download bandwidth:
|
||||
https://ftpmirror.gnu.org/mes/mes-0.24.1.tar.gz
|
||||
https://ftpmirror.gnu.org/mes/mes-0.24.1.tar.gz.sig
|
||||
|
||||
Here are the SHA1 and SHA256 checksums:
|
||||
|
||||
bceaaaf1cafaa31ccb1ee1247ce2dd651a2f67be mes-0.24.1.tar.gz
|
||||
35120ceb0676632e58973355b9f86dff9cc717ed65ed2a17ff5272c59f2a0535 mes-0.24.1.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.24.1.tar.gz.sig
|
||||
|
||||
If that command fails because you don't have the required public key,
|
||||
or that public key has expired, try the following commands to update
|
||||
or refresh it, and then rerun the 'gpg --verify' command.
|
||||
|
||||
gpg --recv-keys 1A858392E331EAFDB8C27FFBF3C1A0D9C1D65273
|
||||
|
||||
* Get informed, get involved
|
||||
|
||||
See https://bootstrappable.org
|
||||
Join #bootstrappable on irc.libera.chat
|
||||
|
||||
* NEWS
|
||||
* Changes in 0.24.1 since 0.24
|
||||
** Build
|
||||
*** Support M2-Planet bootstrap for ARM.
|
||||
** MesCC
|
||||
*** The Mes C Library now supports bootstrapping ARM.
|
||||
** Noteworthy bug fixes
|
||||
*** The definition of S_ISUID was fixed.
|
||||
*** Unsigned modulo has been fixed for ARM.
|
||||
*** A bug with abtol has been fixed.
|
||||
*** Workarounds for building with gcc-12.2.0 have been added.
|
||||
|
||||
* Links
|
||||
[0] https://github.com/oriansj/stage0-posix
|
||||
[1] https://github.com/oriansj/bootstrap-seeds
|
||||
[2] https://archive.fosdem.org/2021/schedule/event/gnumes/
|
||||
[3] https://git.savannah.gnu.org/cgit/guix.git/log/?h=wip-aarch64-bootstrap
|
||||
[4] https://nlnet.nl/project/GNUMes-ARM_RISC-V
|
||||
[5] https://www.gnu.org/software/mes
|
||||
[6] https://guix.gnu.org/blog/2020/guix-further-reduces-bootstrap-seed-to-25
|
||||
[7] https://www.gnu.org/software/guix
|
||||
[8] https://bootstrappable.org
|
||||
[9] https://github.com/oriansj/m2-planet
|
||||
[10] https://savannah.nongnu.org/projects/mescc-tools
|
||||
[11] https://github.com/schemeway/lalr-scm
|
||||
[12] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
|
||||
[13] https://www.nongnu.org/nyacc
|
||||
[14] https://gitlab.com/janneke/tinycc
|
||||
[15] http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf
|
||||
[16] https://savannah.nongnu.org/projects/stage0
|
|
@ -1,117 +0,0 @@
|
|||
|
||||
Subject: GNU Mes 0.24.2 released
|
||||
|
||||
<#secure method=pgpmime mode=sign>
|
||||
|
||||
We are happy to announce the release of GNU Mes 0.24.2, representing 25
|
||||
commits over nine months by four people.
|
||||
|
||||
This release should fix the long standing `stat64' bug #41264[0].
|
||||
|
||||
We are very grateful that the NLnet Foundation[1] is sponsoring this
|
||||
work!
|
||||
|
||||
What's next?
|
||||
|
||||
Work to prototype this so-called "Full Source Bootstrap" for ARM on
|
||||
Aarch64 is happening on the wip-aarch64-bootstrap[2] branch. Also, full
|
||||
Guile compatible module support, and RISC-V support.
|
||||
|
||||
Enjoy!
|
||||
|
||||
* About
|
||||
|
||||
GNU Mes[3] 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[4] of GNU Guix[5]. The
|
||||
final goal is to help create a full source bootstrap as part of the
|
||||
bootstrappable builds[6] 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. Mes can
|
||||
now be bootstrapped from M2-Planet[7] and Mescc-Tools[8].
|
||||
|
||||
Mes has a Garbage Collector, a library of loadable Scheme modules--
|
||||
notably Dominique Boucher's LALR[9], Pre-R6RS portable
|
||||
syntax-case[10] with R7RS ellipsis, Matt Wette's Nyacc[11] --and test
|
||||
suite, just enough to support a REPL and a C99 compiler: mescc.
|
||||
|
||||
Mes + MesCC + Mes C Library can build a bootstrappable TinyCC[12] 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[13] --
|
||||
John McCarthy page 13, GNU Guix's source/binary packaging transparency
|
||||
and Jeremiah Orians's stage0[14] 357-byte self-hosting hex assembler.
|
||||
|
||||
* 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.24.2.tar.gz
|
||||
https://ftp.gnu.org/gnu/mes/mes-0.24.2.tar.gz.sig
|
||||
|
||||
Use a mirror for higher download bandwidth:
|
||||
https://ftpmirror.gnu.org/mes/mes-0.24.2.tar.gz
|
||||
https://ftpmirror.gnu.org/mes/mes-0.24.2.tar.gz.sig
|
||||
|
||||
Here are the SHA1 and SHA256 checksums:
|
||||
|
||||
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx mes-0.24.2.tar.gz
|
||||
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx mes-0.24.2.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.24.2.tar.gz.sig
|
||||
|
||||
If that command fails because you don't have the required public key,
|
||||
or that public key has expired, try the following commands to update
|
||||
or refresh it, and then rerun the 'gpg --verify' command.
|
||||
|
||||
gpg --recv-keys 1A858392E331EAFDB8C27FFBF3C1A0D9C1D65273
|
||||
|
||||
* Get informed, get involved
|
||||
|
||||
See https://bootstrappable.org
|
||||
Join #bootstrappable on irc.libera.chat
|
||||
|
||||
* NEWS
|
||||
* Changes in 0.24.2 since 0.24.1
|
||||
** Build
|
||||
*** A number of compile warnings have been fixed.
|
||||
*** The `simple.make' and `simple.sh' builds have been resurrected.
|
||||
** MesCC
|
||||
*** Some assembly defines were added for building TinyCC for x86_64.
|
||||
*** `__assert_fail' has been updated to use the standard signature.
|
||||
** Noteworthy bug fixes
|
||||
*** A bootstrap build without M2-Planet is now supported again.
|
||||
*** `gettimeofday' no longer segfaults in the M2-Planet build.
|
||||
*** `stat64' and friends are now used on 32bit platforms.
|
||||
This fixes https://debbugs.gnu.org/41264, and should also fix
|
||||
https://debbugs.gnu.org/49985,
|
||||
https://debbugs.gnu.org/53415,
|
||||
https://debbugs.gnu.org/53416.
|
||||
*** The Mes C Library now supports uppercase hex conversions.
|
||||
|
||||
* Links
|
||||
[0] https://debbugs.gnu.org/41264
|
||||
[1] https://nlnet.nl/project/GNUMes-ARM_RISC-V
|
||||
[2] https://git.savannah.gnu.org/cgit/guix.git/log/?h=wip-aarch64-bootstrap
|
||||
[3] https://www.gnu.org/software/mes
|
||||
[4] https://guix.gnu.org/blog/2020/guix-further-reduces-bootstrap-seed-to-25
|
||||
[5] https://www.gnu.org/software/guix
|
||||
[6] https://bootstrappable.org
|
||||
[7] https://github.com/oriansj/m2-planet
|
||||
[8] https://savannah.nongnu.org/projects/mescc-tools
|
||||
[9] https://github.com/schemeway/lalr-scm
|
||||
[10] https://www.cs.indiana.edu/chezscheme/syntax-case/old-psyntax.html
|
||||
[11] https://www.nongnu.org/nyacc
|
||||
[12] https://gitlab.com/janneke/tinycc
|
||||
[13] http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf
|
||||
[14] https://github.com/oriansj/stage0-posix
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
@display
|
||||
Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
|
||||
@uref{https://fsf.org/}
|
||||
@uref{http://fsf.org/}
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
@ -414,7 +414,7 @@ The Free Software Foundation may publish new, revised versions
|
|||
of the GNU Free Documentation License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns. See
|
||||
@uref{https://www.gnu.org/copyleft/}.
|
||||
@uref{http://www.gnu.org/copyleft/}.
|
||||
|
||||
Each version of the License is given a distinguishing version number.
|
||||
If the Document specifies that a particular numbered version of this
|
||||
|
|
32
doc/mes.texi
32
doc/mes.texi
|
@ -204,7 +204,7 @@ Freedom 1.
|
|||
@section Reproducible Builds
|
||||
|
||||
The current Reproducible Builds effort incubated in the Debian
|
||||
project@footnote{@url{https://debian.org, The Debian Project}} and was
|
||||
project@footnote{@url{http://debian.org, The Debian Project}} and was
|
||||
organized by Lunar. Quoting the Reproducible Builds
|
||||
website@footnote{@url{https://reproducible-builds.org/,Reproducible
|
||||
Builds}}
|
||||
|
@ -365,7 +365,7 @@ Most computers work pretty well so apparently there is not a pressing
|
|||
need to inspect and study all of these codes. At the same time it is
|
||||
tricky to fully trust@footnote{ Ken Thompson's 1984 Turing award
|
||||
acceptance speech
|
||||
@url{https://www.ece.cmu.edu/~ganger/712.fall02/papers/p761-thompson.pdf,
|
||||
@url{http://www.ece.cmu.edu/~ganger/712.fall02/papers/p761-thompson.pdf,
|
||||
Reflections on Trusting Tust}.} a computer that was bootstrapped in this
|
||||
way.
|
||||
|
||||
|
@ -461,7 +461,7 @@ and mescc-tools can be removed.
|
|||
As fate would have it, I stumbled upon this
|
||||
@url{https://queue.acm.org/detail.cfm?id=1039523, interview with Alan
|
||||
Kay}, where he shares a revelation he had when reading John McCarthy's
|
||||
@url{https://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf,
|
||||
@url{http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf,
|
||||
LISP-1.5} manual:
|
||||
|
||||
@quotation
|
||||
|
@ -553,19 +553,19 @@ in the Mes source tree for additional details.
|
|||
GNU Mes depends on the following packages:
|
||||
|
||||
@itemize
|
||||
@item @url{https://gnu.org/software/guile/, GNU Guile}, version 2.0.13 or
|
||||
@item @url{http://gnu.org/software/guile/, GNU Guile}, version 2.0.13 or
|
||||
later, including 2.2.x and 3.0.x,
|
||||
@item @url{https://www.gnu.org/software/make/, GNU Make}.
|
||||
@item @url{http://www.gnu.org/software/make/, GNU Make}.
|
||||
@item @url{https://savannah.gnu.org/projects/nyacc/, NYACC}, version 1.00.2,
|
||||
@item @url{https://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 1.4.0,
|
||||
@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 1.0.1 or later,
|
||||
@end itemize
|
||||
|
||||
The following dependencies are optional:
|
||||
|
||||
@itemize
|
||||
Support for building the bootstrap @file{bin/mes-m2} depends on
|
||||
@item @url{https://github.com/oriansj/m2-planet/, M2-Planet}, version 1.9.0.
|
||||
@item @url{https://github.com/oriansj/m2-planet/, M2-Planet}, version 1.8.0.
|
||||
@end itemize
|
||||
|
||||
@cindex Guile, compatibility
|
||||
|
@ -594,8 +594,8 @@ Bootstrapping Mes depends on the following packages:
|
|||
|
||||
@itemize
|
||||
@item a POSIX-compatible shell
|
||||
@item @url{https://savannah.gnu.org/projects/mescc-tools/, mescc-tools}, version 1.4.0,
|
||||
@item @url{https://github.com/oriansj/m2-planet/, M2-Planet}, version 1.9.0.
|
||||
@item @url{https://savannah.gnu.org/projects/mescc-tools/, mescc-tools}, version 1.0.1 or later,
|
||||
@item @url{https://github.com/oriansj/m2-planet/, M2-Planet}, version 1.8.0.
|
||||
@item @url{https://savannah.gnu.org/projects/nyacc/, NYACC}, version 1.00.2,
|
||||
@end itemize
|
||||
|
||||
|
@ -693,7 +693,7 @@ responsibility.
|
|||
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{https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/commencement.scm}}.
|
||||
@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 and armhf-linux.
|
||||
|
||||
Currently, it goes like this:
|
||||
|
@ -749,7 +749,7 @@ Currently, it goes like this:
|
|||
Here's a generated dependency diagram to for the initial bootstrap gcc
|
||||
that builds the rest of Guix.
|
||||
|
||||
@image{images/gcc-mesboot-graph,6in,,Reference graph of the gcc-core-mesboot0}
|
||||
@image{images/gcc-mesboot-graph,2in,,Reference graph of the gcc-core-mesboot0}
|
||||
|
||||
Work is ongoing to remove these binary seeds that were intentionally
|
||||
injected by our own doing as temporary shortcut
|
||||
|
@ -935,7 +935,7 @@ The @var{option}s can be among the following:
|
|||
align @var{symbol}, the default is @code{functions}; other valid values
|
||||
are: @code{globals}.
|
||||
|
||||
@item --base-address=ADDRESS
|
||||
@item --base-address=ADRRESS
|
||||
use BaseAddress ADDRESS [0x1000000]
|
||||
|
||||
@item -c
|
||||
|
@ -1155,8 +1155,8 @@ Porting MesCC:
|
|||
The Perfect Setup to hack on Mes is basically the perfect setup used
|
||||
for Guile hacking (@pxref{Using Guile in Emacs,,, guile, Guile Reference
|
||||
Manual}). First, you need more than an editor, you need
|
||||
@url{https://www.gnu.org/software/emacs, Emacs}, empowered by the
|
||||
wonderful @url{https://nongnu.org/geiser/, Geiser}.
|
||||
@url{http://www.gnu.org/software/emacs, Emacs}, empowered by the
|
||||
wonderful @url{http://nongnu.org/geiser/, Geiser}.
|
||||
|
||||
Geiser allows for interactive and incremental development from within
|
||||
Emacs: code compilation and evaluation from within buffers, access to
|
||||
|
@ -1181,7 +1181,7 @@ Scheme code in Mes is written in a purely functional style.
|
|||
@cindex coding style
|
||||
When writing Scheme code, we follow common wisdom among Scheme
|
||||
programmers. In general, we follow the
|
||||
@url{https://mumble.net/~campbell/scheme/style.txt, Riastradh's Lisp
|
||||
@url{http://mumble.net/~campbell/scheme/style.txt, Riastradh's Lisp
|
||||
Style Rules}. This document happens to describe the conventions mostly
|
||||
used in Guile’s code too. It is very thoughtful and well written, so
|
||||
please do read it.
|
||||
|
|
2
guix.scm
2
guix.scm
|
@ -30,7 +30,7 @@
|
|||
;;
|
||||
;; To use as the basis for a development environment, run:
|
||||
;;
|
||||
;; guix time-machine --commit=ffb616b69dced25b840f2e5178062072d89623eb -- shell
|
||||
;; guix shell
|
||||
;;
|
||||
;;; Code:
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
(define-public mescc-tools
|
||||
(package
|
||||
(name "mescc-tools")
|
||||
(version "1.4.0")
|
||||
(version "1.3")
|
||||
(source (origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
|
@ -64,7 +64,7 @@
|
|||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32
|
||||
"0z2ni2qn2np1walcaqlxz8sinzb78d4hiq9glddzf26wxc226hs4"))))
|
||||
"1mx68mavh39mfpa0vjxv0y057alcp5p2xy2j6wmz5gxy795h0vpa"))))
|
||||
(build-system gnu-build-system)
|
||||
(supported-systems
|
||||
'("aarch64-linux" "armhf-linux" "i686-linux" "x86_64-linux"))
|
||||
|
@ -183,13 +183,13 @@ extensive examples, including parsers for the Javascript and C99 languages.")
|
|||
(define-public mes
|
||||
(package
|
||||
(name "mes")
|
||||
(version #!mes!# "0.24.2")
|
||||
(version #!mes!# "0.23")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append
|
||||
"https://ftp.gnu.org/pub/gnu/mes/mes-" version ".tar.gz"))
|
||||
(sha256
|
||||
(base32 #!mes!# "0vp8v88zszh1imm3dvdfi3m8cywshdj7xcrsq4cgmss69s2y1nkx"))))
|
||||
(base32 #!mes!# "0mnryfkl0dwbr5gxp16j5s95gw7z1vm1fqa1pxabp0aiar1hw53s"))))
|
||||
(build-system gnu-build-system)
|
||||
(supported-systems '("aarch64-linux" "armhf-linux" "i686-linux" "x86_64-linux"))
|
||||
(propagated-inputs (list mescc-tools nyacc))
|
||||
|
@ -238,7 +238,7 @@ Guile.")
|
|||
(license gpl3+)))
|
||||
|
||||
(define-public mes.git
|
||||
(let ((version #!mes!# "0.24.2")
|
||||
(let ((version #!mes!# "0.23")
|
||||
(revision "0")
|
||||
(commit (read-string (open-pipe "git show HEAD | head -1 | cut -d ' ' -f 2" OPEN_READ))))
|
||||
(package
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2017,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2017 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -27,9 +27,8 @@
|
|||
#undef __MES_ASSERT_H
|
||||
#include_next <assert.h>
|
||||
#else // ! SYSTEM_LIBC
|
||||
#define assert(x) ((x) ? (void)0 : __assert_fail (#x, 0, 0, 0))
|
||||
void __assert_fail (char const *s, char const *file, unsigned line,
|
||||
char const *function);
|
||||
#define assert(x) ((x) ? (void)0 : __assert_fail (#x))
|
||||
void __assert_fail (char *s);
|
||||
#endif // ! SYSTEM_LIBC
|
||||
|
||||
#endif // __MES_ASSERT_H
|
||||
|
|
|
@ -1,79 +0,0 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2017,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
* GNU Mes is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* GNU Mes is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __MES_LINUX_ARM_KERNEL_STAT_H
|
||||
#define __MES_LINUX_ARM_KERNEL_STAT_H 1
|
||||
|
||||
// https://github.com/torvalds/linux/blob/master/arch/arm/include/uapi/asm/stat.h
|
||||
|
||||
#include <arch/syscall.h>
|
||||
|
||||
#if __SIZEOF_LONG_LONG__ != 8
|
||||
|
||||
// *INDENT-OFF*
|
||||
struct stat
|
||||
{
|
||||
unsigned long st_dev;
|
||||
unsigned long st_ino;
|
||||
unsigned short st_mode;
|
||||
unsigned short st_nlink;
|
||||
unsigned short st_uid;
|
||||
unsigned short st_gid;
|
||||
unsigned long st_rdev;
|
||||
unsigned long st_size;
|
||||
unsigned long st_blksize;
|
||||
unsigned long st_blocks;
|
||||
unsigned long st_atime;
|
||||
unsigned long st_atime_usec;
|
||||
unsigned long st_mtime;
|
||||
unsigned long st_mtime_usec;
|
||||
unsigned long st_ctime;
|
||||
unsigned long st_ctime_usec;
|
||||
unsigned long __pad0;
|
||||
unsigned long __pad1;
|
||||
};
|
||||
|
||||
#else // __SIZEOF_LONG_LONG__ == 8
|
||||
|
||||
struct stat
|
||||
{
|
||||
unsigned long long st_dev;
|
||||
unsigned char __pad0[4];
|
||||
unsigned long __st_ino;
|
||||
unsigned int st_mode;
|
||||
unsigned int st_nlink;
|
||||
unsigned long st_uid;
|
||||
unsigned long st_gid;
|
||||
unsigned long long st_rdev;
|
||||
unsigned char __pad3[4];
|
||||
long long st_size;
|
||||
unsigned long st_blksize;
|
||||
unsigned long long st_blocks;
|
||||
unsigned long st_atime;
|
||||
unsigned long st_atime_nsec;
|
||||
unsigned long st_mtime;
|
||||
unsigned int st_mtime_nsec;
|
||||
unsigned long st_ctime;
|
||||
unsigned long st_ctime_nsec;
|
||||
unsigned long long st_ino;
|
||||
};
|
||||
|
||||
#endif // __SIZEOF_LONG_LONG__ == 8
|
||||
|
||||
#endif // __MES_LINUX_ARM_KERNEL_STAT_H
|
|
@ -109,23 +109,4 @@
|
|||
#define SYS_readlink 0x55
|
||||
#define SYS_mknod 0x0e
|
||||
|
||||
#if __SIZEOF_LONG_LONG__ == 8
|
||||
|
||||
#define SYS_stat64 0xc3
|
||||
#define SYS_lstat64 0xc4
|
||||
#define SYS_fstat64 0xc5
|
||||
#define SYS_fcntl64 0xdd
|
||||
#define SYS_getdents64 0xdc
|
||||
|
||||
#undef SYS_stat
|
||||
#define SYS_stat SYS_stat64
|
||||
|
||||
#undef SYS_lstat
|
||||
#define SYS_lstat SYS_lstat64
|
||||
|
||||
#undef SYS_fstat
|
||||
#define SYS_fstat SYS_fstat64
|
||||
|
||||
#endif // __SIZEOF_LONG_LONG__ == 8
|
||||
|
||||
#endif /* __MES_LINUX_ARM_SYSCALL_H */
|
||||
|
|
|
@ -1,47 +0,0 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
* GNU Mes is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* GNU Mes is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __LINUX_M2_KERNEL_STAT_H
|
||||
#define __LINUX_M2_KERNEL_STAT_H
|
||||
|
||||
/* https://github.com/torvalds/linux/blob/master/arch/x86/include/uapi/asm/stat.h */
|
||||
|
||||
/* *INDENT-OFF* */
|
||||
struct stat
|
||||
{
|
||||
unsigned st_dev;
|
||||
unsigned st_ino;
|
||||
char st_mode[2];
|
||||
char st_nlink[2];
|
||||
char st_uid[2];
|
||||
char st_gid[2];
|
||||
unsigned st_rdev;
|
||||
unsigned st_size;
|
||||
unsigned st_blksize;
|
||||
unsigned st_blocks;
|
||||
unsigned st_atime;
|
||||
unsigned st_atime_usec;
|
||||
unsigned st_mtime;
|
||||
unsigned st_mtime_usec;
|
||||
unsigned st_ctime;
|
||||
unsigned st_ctime_usec;
|
||||
unsigned __pad0;
|
||||
unsigned __pad1;
|
||||
};
|
||||
#endif /* __LINUX_M2_KERNEL_STAT_H */
|
|
@ -1,79 +0,0 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2017,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
* GNU Mes is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* GNU Mes is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __MES_LINUX_X86_KERNEL_STAT_H
|
||||
#define __MES_LINUX_X86_KERNEL_STAT_H 1
|
||||
|
||||
// https://github.com/torvalds/linux/blob/master/arch/x86/include/uapi/asm/stat.h
|
||||
|
||||
#include <arch/syscall.h>
|
||||
|
||||
#if __SIZEOF_LONG_LONG__ != 8
|
||||
|
||||
// *INDENT-OFF*
|
||||
struct stat
|
||||
{
|
||||
unsigned long st_dev;
|
||||
unsigned long st_ino;
|
||||
unsigned short st_mode;
|
||||
unsigned short st_nlink;
|
||||
unsigned short st_uid;
|
||||
unsigned short st_gid;
|
||||
unsigned long st_rdev;
|
||||
unsigned long st_size;
|
||||
unsigned long st_blksize;
|
||||
unsigned long st_blocks;
|
||||
unsigned long st_atime;
|
||||
unsigned long st_atime_usec;
|
||||
unsigned long st_mtime;
|
||||
unsigned long st_mtime_usec;
|
||||
unsigned long st_ctime;
|
||||
unsigned long st_ctime_usec;
|
||||
unsigned long __pad0;
|
||||
unsigned long __pad1;
|
||||
};
|
||||
|
||||
#else // __SIZEOF_LONG_LONG__ == 8
|
||||
|
||||
struct stat
|
||||
{
|
||||
unsigned long long st_dev;
|
||||
unsigned char __pad0[4];
|
||||
unsigned long __st_ino;
|
||||
unsigned int st_mode;
|
||||
unsigned int st_nlink;
|
||||
unsigned long st_uid;
|
||||
unsigned long st_gid;
|
||||
unsigned long long st_rdev;
|
||||
unsigned char __pad3[4];
|
||||
long long st_size;
|
||||
unsigned long st_blksize;
|
||||
unsigned long long st_blocks;
|
||||
unsigned long st_atime;
|
||||
unsigned long st_atime_nsec;
|
||||
unsigned long st_mtime;
|
||||
unsigned int st_mtime_nsec;
|
||||
unsigned long st_ctime;
|
||||
unsigned long st_ctime_nsec;
|
||||
unsigned long long st_ino;
|
||||
};
|
||||
|
||||
#endif // __SIZEOF_LONG_LONG__ == 8
|
||||
|
||||
#endif // __MES_LINUX_X86_KERNEL_STAT_H
|
|
@ -75,6 +75,7 @@
|
|||
#define SYS_stat 0x6a
|
||||
|
||||
/* libc+gnu */
|
||||
|
||||
#define SYS_chdir 0x0c
|
||||
#define SYS_link 0x09
|
||||
#define SYS_getpid 0x14
|
||||
|
@ -111,23 +112,4 @@
|
|||
#define SYS_readlink 0x55
|
||||
#define SYS_mknod 0x0e
|
||||
|
||||
#if __SIZEOF_LONG_LONG__ == 8
|
||||
|
||||
#define SYS_stat64 0xc3
|
||||
#define SYS_lstat64 0xc4
|
||||
#define SYS_fstat64 0xc5
|
||||
#define SYS_fcntl64 0xdd
|
||||
#define SYS_getdents64 0xdc
|
||||
|
||||
#undef SYS_stat
|
||||
#define SYS_stat SYS_stat64
|
||||
|
||||
#undef SYS_lstat
|
||||
#define SYS_lstat SYS_lstat64
|
||||
|
||||
#undef SYS_fstat
|
||||
#define SYS_fstat SYS_fstat64
|
||||
|
||||
#endif // __SIZEOF_LONG_LONG__ == 8
|
||||
|
||||
#endif /* __MES_LINUX_X86_SYSCALL_H */
|
||||
|
|
|
@ -1,51 +0,0 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2017,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
* GNU Mes is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* GNU Mes is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __MES_LINUX_X86_64_KERNEL_STAT_H
|
||||
#define __MES_LINUX_X86_64_KERNEL_STAT_H 1
|
||||
|
||||
// https://github.com/torvalds/linux/blob/master/arch/x86/include/uapi/asm/stat.h
|
||||
|
||||
// *INDENT-OFF*
|
||||
struct stat
|
||||
{
|
||||
unsigned long st_dev;
|
||||
unsigned long st_ino;
|
||||
unsigned long st_nlink;
|
||||
unsigned int st_mode;
|
||||
unsigned int st_uid;
|
||||
unsigned int st_gid;
|
||||
unsigned int __pad0;
|
||||
unsigned long st_rdev;
|
||||
unsigned long st_size;
|
||||
unsigned long st_atime;
|
||||
unsigned long st_atime_nsec;
|
||||
unsigned long st_mtime;
|
||||
unsigned long st_mtime_nsec;
|
||||
unsigned long st_ctime;
|
||||
unsigned long st_ctime_nsec;
|
||||
unsigned long st_blksize;
|
||||
long st_blocks;
|
||||
unsigned long __pad1;
|
||||
unsigned long __pad2;
|
||||
unsigned long __pad3;
|
||||
unsigned long __pad4;
|
||||
};
|
||||
|
||||
#endif // __MES_LINUX_X86_64_KERNEL_STAT_H
|
|
@ -1,138 +0,0 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2017,2022,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
* GNU Mes is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* GNU Mes is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __M2_TYPES_H
|
||||
#define __M2_TYPES_H 1
|
||||
|
||||
/*
|
||||
#ifndef __MES_CLOCK_T
|
||||
#define __MES_CLOCK_T
|
||||
#undef clock_t
|
||||
typedef long clock_t;
|
||||
#endif
|
||||
*/
|
||||
|
||||
#ifndef __MES_DEV_T
|
||||
#define __MES_DEV_T
|
||||
#undef dev_t
|
||||
typedef long dev_t;
|
||||
#endif
|
||||
|
||||
/*
|
||||
#if !defined (__MES_FILE_T) && ! defined (_FILE_T)
|
||||
#define __MES_FILE_T
|
||||
#define _FILE_T
|
||||
typedef long FILE;
|
||||
#endif
|
||||
*/
|
||||
|
||||
#ifndef __MES_GID_T
|
||||
#define __MES_GID_T
|
||||
#undef gid_t
|
||||
typedef unsigned gid_t;
|
||||
#endif
|
||||
|
||||
#ifndef __MES_INO_T
|
||||
#define __MES_INO_T
|
||||
#undef ino_t
|
||||
typedef unsigned ino_t;
|
||||
#endif
|
||||
|
||||
#if __SIZEOF_LONG_LONG__ == 8
|
||||
#ifndef __MES_INO64_T
|
||||
#define __MES_INO64_T
|
||||
#undef ino64_t
|
||||
typedef unsigned ino64_t;
|
||||
#endif
|
||||
#endif // __SIZEOF_LONG_LONG__ == 8
|
||||
|
||||
#if !defined (__MES_INTPTR_T) && !defined (__intptr_t_defined)
|
||||
#define __MES_INTPTR_T
|
||||
#define __intptr_t_defined
|
||||
#undef intptr_t
|
||||
typedef long intptr_t;
|
||||
#undef uintptr_t
|
||||
typedef unsigned uintptr_t;
|
||||
#endif
|
||||
|
||||
#ifndef __MES_OFF_T
|
||||
#define __MES_OFF_T
|
||||
#undef off_t
|
||||
typedef long off_t;
|
||||
#endif
|
||||
|
||||
#if __SIZEOF_LONG_LONG__ == 8
|
||||
#ifndef __MES_OFF64_T
|
||||
#define __MES_OFF64_T
|
||||
#undef off64_t
|
||||
typedef unsigned off64_t;
|
||||
#endif
|
||||
#endif // __SIZEOF_LONG_LONG__ == 8
|
||||
|
||||
#ifndef __MES_PID_T
|
||||
#define __MES_PID_T
|
||||
#undef pid_t
|
||||
typedef int pid_t;
|
||||
#endif
|
||||
|
||||
#ifndef __PTRDIFF_T
|
||||
#define __PTRDIFF_T
|
||||
#ifndef __MES_PTRDIFF_T
|
||||
#define __MES_PTRDIFF_T
|
||||
#undef ptrdiff_t
|
||||
typedef long ptrdiff_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef __MES_SIGVAL_T
|
||||
#define __MES_SIGVAL_T
|
||||
#undef clock_t
|
||||
typedef long sigval_t;
|
||||
#endif
|
||||
|
||||
#ifndef __SIZE_T
|
||||
#define __SIZE_T
|
||||
#ifndef __MES_SIZE_T
|
||||
#define __MES_SIZE_T
|
||||
typedef unsigned size_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef __MES_SSIZE_T
|
||||
#define __MES_SSIZE_T
|
||||
#undef ssize_t
|
||||
typedef long ssize_t;
|
||||
#endif
|
||||
|
||||
#ifndef __MES_UID_T
|
||||
#define __MES_UID_T
|
||||
#undef uid_t
|
||||
typedef unsigned uid_t;
|
||||
#endif
|
||||
|
||||
#ifndef __WCHAR_T
|
||||
#define __WCHAR_T
|
||||
#ifndef __MES_WCHAR_T
|
||||
#define __MES_WCHAR_T
|
||||
#undef wchar_t
|
||||
typedef int wchar_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif // __M2_TYPES_H
|
|
@ -67,8 +67,7 @@ extern void (*__call_at_exit) (void);
|
|||
#define __FILEDES_MAX 512
|
||||
|
||||
#if !SYSTEM_LIBC
|
||||
void __assert_fail (char const *s, char const *file, unsigned line,
|
||||
char const *function);
|
||||
void __assert_fail (char *s);
|
||||
ssize_t __buffered_read (int filedes, void *buffer, size_t size);
|
||||
size_t __buffered_read_clear (int filedes);
|
||||
void _exit (int code);
|
||||
|
|
|
@ -153,6 +153,7 @@ struct scm *vector_ref_ (struct scm *x, long i);
|
|||
struct scm *vector_set_x_ (struct scm *x, long i, struct scm *e);
|
||||
FUNCTION builtin_function (struct scm *builtin);
|
||||
char *cell_bytes (struct scm *x);
|
||||
char *news_bytes (struct scm *x);
|
||||
int peekchar ();
|
||||
int readchar ();
|
||||
int unreadchar ();
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2017 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2022 Dor Askayo <dor.askayo@gmail.com>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +18,7 @@
|
|||
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __MES_SYS_STAT_H
|
||||
#define __MES_SYS_STAT_H 1
|
||||
#define __MES_SYS_STAT_H 1lei
|
||||
|
||||
#if SYSTEM_LIBC
|
||||
#undef __MES_SYS_STAT_H
|
||||
|
@ -29,13 +28,60 @@
|
|||
|
||||
#include <time.h>
|
||||
#include <sys/types.h>
|
||||
#include <arch/kernel-stat.h>
|
||||
|
||||
#ifndef __MES_MODE_T
|
||||
#define __MES_MODE_T
|
||||
typedef int mode_t;
|
||||
#endif
|
||||
|
||||
// *INDENT-OFF*
|
||||
#if __i386__ || __arm__
|
||||
struct stat
|
||||
{
|
||||
unsigned long st_dev;
|
||||
unsigned long st_ino;
|
||||
unsigned short st_mode;
|
||||
unsigned short st_nlink;
|
||||
unsigned short st_uid;
|
||||
unsigned short st_gid;
|
||||
unsigned long st_rdev;
|
||||
long st_size; /* Linux: unsigned long; glibc: off_t (i.e. signed) */
|
||||
unsigned long st_blksize;
|
||||
unsigned long st_blocks;
|
||||
time_t st_atime; /* Linux: unsigned long; glibc: time_t */
|
||||
unsigned long st_atime_usec;
|
||||
time_t st_mtime; /* Linux: unsigned long; glibc: time_t */
|
||||
unsigned long st_mtime_usec;
|
||||
time_t st_ctime; /* Linux: unsigned long; glibc: time_t */
|
||||
unsigned long st_ctime_usec;
|
||||
unsigned long __foo0;
|
||||
unsigned long __foo1;
|
||||
};
|
||||
#elif __x86_64__
|
||||
struct stat
|
||||
{
|
||||
unsigned long st_dev;
|
||||
unsigned long st_ino;
|
||||
unsigned int st_mode;
|
||||
unsigned int st_nlink;
|
||||
unsigned int st_uid;
|
||||
unsigned int st_gid;
|
||||
unsigned long st_rdev;
|
||||
long st_size;
|
||||
unsigned long st_blksize;
|
||||
unsigned long st_blocks;
|
||||
time_t st_atime;
|
||||
unsigned long st_atime_usec;
|
||||
time_t st_mtime;
|
||||
unsigned long st_mtime_usec;
|
||||
time_t st_ctime;
|
||||
unsigned long st_ctime_usec;
|
||||
unsigned long __foo0;
|
||||
unsigned long __foo1;
|
||||
};
|
||||
#endif
|
||||
// *INDENT-ON*
|
||||
|
||||
int chmod (char const *file_name, mode_t mode);
|
||||
int fstat (int filedes, struct stat *buf);
|
||||
int mkdir (char const *file_name, mode_t mode);
|
||||
|
@ -61,7 +107,7 @@ int stat (char const *file_name, struct stat *buf);
|
|||
#define S_IWUSR 00200
|
||||
#define S_IRUSR 00400
|
||||
|
||||
#define S_ISUID 04000
|
||||
#define S_ISUID 0400
|
||||
#define S_ISGID 02000
|
||||
#define S_IXGRP 00010
|
||||
#define S_IXOTH 00001
|
||||
|
|
14
kaem.run
14
kaem.run
|
@ -20,7 +20,7 @@
|
|||
# kaem --verbose --strict
|
||||
|
||||
mes_cpu=${mes_cpu:-x86}
|
||||
stage0_cpu=${stage0_cpu:-x86}
|
||||
stage0_cpu=${mes_cpu:-x86}
|
||||
|
||||
mkdir -p m2
|
||||
|
||||
|
@ -53,7 +53,6 @@ M2-Planet \
|
|||
-f lib/mes/fdputc.c \
|
||||
-f lib/mes/eputc.c \
|
||||
\
|
||||
-f include/m2/types.h \
|
||||
-f include/mes/mes.h \
|
||||
-f include/mes/builtins.h \
|
||||
-f include/mes/constants.h \
|
||||
|
@ -82,8 +81,6 @@ M2-Planet \
|
|||
-f lib/mes/fdungetc.c \
|
||||
-f lib/posix/setenv.c \
|
||||
-f lib/linux/access.c \
|
||||
-f include/linux/m2/kernel-stat.h \
|
||||
-f include/sys/stat.h \
|
||||
-f lib/m2/chmod.c \
|
||||
-f lib/linux/ioctl3.c \
|
||||
-f lib/m2/isatty.c \
|
||||
|
@ -121,11 +118,11 @@ M2-Planet \
|
|||
-f src/vector.c \
|
||||
-o m2/mes.M1
|
||||
|
||||
blood-elf --little-endian -f m2/mes.M1 -o m2/mes.blood-elf-M1
|
||||
blood-elf -f m2/mes.M1 -o m2/mes.blood-elf-M1
|
||||
|
||||
M1 \
|
||||
--LittleEndian \
|
||||
--architecture ${stage0_cpu} \
|
||||
--little-endian \
|
||||
-f lib/m2/${mes_cpu}/${mes_cpu}_defs.M1 \
|
||||
-f lib/${mes_cpu}-mes/${mes_cpu}.M1 \
|
||||
-f lib/linux/${mes_cpu}-mes-m2/crt1.M1 \
|
||||
|
@ -135,9 +132,10 @@ M1 \
|
|||
|
||||
mkdir -p bin
|
||||
hex2 \
|
||||
--LittleEndian \
|
||||
--architecture ${stage0_cpu} \
|
||||
--little-endian \
|
||||
--base-address 0x1000000 \
|
||||
--BaseAddress 0x1000000 \
|
||||
--exec_enable \
|
||||
-f lib/m2/${mes_cpu}/ELF-${mes_cpu}.hex2 \
|
||||
-f m2/mes.hex2 \
|
||||
-o bin/mes-m2
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
### GNU Mes --- Maxwell Equations of Software
|
||||
### Copyright © 2017,2018,2020,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
### Copyright © 2017,2018,2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
### Copyright © 2019,2020 Danny Milosavljevic <dannym@scratchpost.org>
|
||||
###
|
||||
### This file is part of GNU Mes.
|
||||
|
@ -91,7 +91,6 @@ DEFINE mov____%r0,(%r1) 000081e5
|
|||
DEFINE mov____%r1,%r0 0100a0e1
|
||||
DEFINE mov____%r1,%r2 0120a0e1
|
||||
DEFINE mov____%esp,%r0 0d00a0e1
|
||||
DEFINE mov____%esp,%r3 0d30a0e1
|
||||
|
||||
# e59f9004 ldr r9, [pc, #4] ; <L1>
|
||||
# e5890000 str r0, [r9]
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2016,2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2023 Rick Masters <grick23@gmail.com>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
|
|
@ -24,5 +24,5 @@
|
|||
int
|
||||
isxdigit (int c)
|
||||
{
|
||||
return isdigit (c) || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F');
|
||||
return isdigit (c) || (c >= 'a' && c <= 'f');
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <mes/lib.h>
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
|
||||
char *
|
||||
_getcwd (char *buffer, size_t size)
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <mes/lib.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <mes/lib.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <mes/lib.h>
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
|
||||
int
|
||||
access (char const *file_name, int how)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <mes/lib.h>
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
|
||||
long
|
||||
brk (void *addr)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
|
||||
int
|
||||
chdir (char const *file_name)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <mes/lib.h>
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
int
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <mes/lib.h>
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <time.h>
|
||||
|
||||
int
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <mes/lib.h>
|
||||
|
||||
int
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
|
||||
int
|
||||
dup (int old)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
|
||||
int
|
||||
dup2 (int old, int new)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
|
||||
int
|
||||
execve (char const *file_name, char *const argv[], char *const env[])
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
int
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
|
||||
int
|
||||
fork ()
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
int
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
|
||||
int
|
||||
fsync (int filedes)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
int
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <unistd.h>
|
||||
|
||||
gid_t
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <unistd.h>
|
||||
|
||||
uid_t
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <unistd.h>
|
||||
|
||||
gid_t
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <unistd.h>
|
||||
|
||||
pid_t
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <unistd.h>
|
||||
|
||||
pid_t
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <sys/resource.h>
|
||||
|
||||
int
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <mes/lib.h>
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
int
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <unistd.h>
|
||||
|
||||
uid_t
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <stdarg.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <mes/lib.h>
|
||||
|
||||
int
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
|
||||
int
|
||||
link (char const *old_name, char const *new_name)
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <mes/lib.h>
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
int
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
int
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
int
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2016,2017,2018,2019,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <mes/lib.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
|
@ -27,7 +27,7 @@ ssize_t
|
|||
read (int filedes, void *buffer, size_t size)
|
||||
{
|
||||
long long_filedes = filedes;
|
||||
ssize_t bytes = _sys_call3 (SYS_read, long_filedes, (long) buffer, (long) size);
|
||||
ssize_t bytes = _sys_call3 (SYS_read, long_filedes, buffer, size);
|
||||
if (__mes_debug () > 4)
|
||||
{
|
||||
if (bytes == 1)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
ssize_t
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
|
||||
int
|
||||
rmdir (char const *file_name)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019,2022,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <unistd.h>
|
||||
#include <signal.h>
|
||||
|
||||
|
@ -36,7 +36,7 @@ sighandler_t
|
|||
signal (int signum, sighandler_t action)
|
||||
{
|
||||
#if __i386__
|
||||
return (sighandler_t) _sys_call2 (SYS_signal, signum, (long) action);
|
||||
return _sys_call2 (SYS_signal, signum, action);
|
||||
#else
|
||||
static struct sigaction setup_action = { 0 };
|
||||
static struct sigaction old = { 0 };
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
int
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,11 +19,17 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/* Linux' SYS_time syscall is a compatibility shim for SYS_gettimeofday.
|
||||
Therefore, prefer SYS_gettimeofday. */
|
||||
|
||||
#if defined (SYS_gettimeofday)
|
||||
|
||||
#include <sys/time.h>
|
||||
|
||||
time_t
|
||||
time (time_t * result)
|
||||
{
|
||||
|
@ -35,3 +41,31 @@ time (time_t * result)
|
|||
*result = tv.tv_sec;
|
||||
return tv.tv_sec;
|
||||
}
|
||||
|
||||
#elif defined (SYS_time)
|
||||
|
||||
time_t
|
||||
time (time_t * result)
|
||||
{
|
||||
return _sys_call1 (SYS_time, (long) result);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#warning there is no time
|
||||
|
||||
#include <mes/lib.h>
|
||||
|
||||
time_t
|
||||
time (time_t * result)
|
||||
{
|
||||
static int stub = 0;
|
||||
if (__mes_debug () && !stub)
|
||||
eputs ("time stub\n");
|
||||
stub = 1;
|
||||
if (result)
|
||||
*result = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <mes/lib.h>
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
|
||||
int
|
||||
unlink (char const *file_name)
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
pid_t
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
|
||||
int
|
||||
execve (char const *file_name, char **argv, char **env)
|
||||
|
|
|
@ -18,8 +18,6 @@
|
|||
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <mes/lib.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdarg.h>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019,2022,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,19 +19,16 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <time.h>
|
||||
|
||||
char *__tv;
|
||||
|
||||
long
|
||||
time (long* result)
|
||||
{
|
||||
int r;
|
||||
if (__tv == 0)
|
||||
__tv = malloc (sizeof (struct timeval));
|
||||
struct timeval *tv = __tv;
|
||||
r = _sys_call2 (SYS_gettimeofday, tv, 0);
|
||||
struct timeval tv;
|
||||
struct timezone tz;
|
||||
r = _sys_call2 (SYS_gettimeofday, tv, tz);
|
||||
if (r != 0)
|
||||
return -1;
|
||||
if (result != 0)
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <mes/lib.h>
|
||||
#include <linux/syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
int
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,30 +19,14 @@
|
|||
*/
|
||||
|
||||
#include <mes/lib.h>
|
||||
#include <assert.h>
|
||||
|
||||
void
|
||||
__assert_fail (char const *msg, char const *file, unsigned line,
|
||||
char const *function)
|
||||
__assert_fail (char *s)
|
||||
{
|
||||
if (file && file[0])
|
||||
{
|
||||
eputs (file);
|
||||
eputs (":");
|
||||
}
|
||||
if (line)
|
||||
{
|
||||
eputs (itoa (line));
|
||||
eputs (":");
|
||||
}
|
||||
if (function && function[0])
|
||||
{
|
||||
eputs (function);
|
||||
eputs (":");
|
||||
}
|
||||
eputs ("assert fail: ");
|
||||
eputs (msg);
|
||||
eputs (s);
|
||||
eputs ("\n");
|
||||
char *fail = 0;
|
||||
char *fail = s;
|
||||
fail = 0;
|
||||
fail[0] = 0;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2016,2017,2018,2019,2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2022,2023 Rick Masters <grick23@gmail.com>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -43,15 +42,8 @@ abtol (char const **p, int base)
|
|||
while (isnumber (s[0], base) != 0)
|
||||
{
|
||||
i = i * base;
|
||||
if (s[0] >= 'a')
|
||||
if (s[0] > '9')
|
||||
m = 'a' - 10;
|
||||
else
|
||||
{
|
||||
if (s[0] >= 'A')
|
||||
m = 'A' - 10;
|
||||
else
|
||||
m = '0';
|
||||
}
|
||||
i = i + s[0] - m;
|
||||
s = s + 1;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2019 Jeremiah Orians <jeremiah@pdp10.guru>
|
||||
* Copyright © 2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -20,12 +20,11 @@
|
|||
*/
|
||||
|
||||
#include <mes/lib.h>
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void
|
||||
assert_msg (int bool, char *msg)
|
||||
{
|
||||
if (bool == 0)
|
||||
__assert_fail (msg, 0, 0, 0);
|
||||
__assert_fail (msg);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2016,2017,2018,2019,2020,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2016,2017,2018,2019,2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -23,7 +23,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#if __M2_PLANET__ || (!(__MESC__ && __arm__) && !(__TINYC__ && __arm__ && BOOTSTRAP))
|
||||
#if __M2_PLANET__ || !(__MESC__ && __arm__)
|
||||
size_t
|
||||
__mesabi_uldiv (size_t a, size_t b, size_t *remainder)
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2017,2018,2019,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -22,7 +22,6 @@
|
|||
#include <ctype.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int
|
||||
vfscanf (FILE * stream, char const *template, va_list ap)
|
||||
|
@ -77,7 +76,7 @@ vfscanf (FILE * stream, char const *template, va_list ap)
|
|||
ungetc (p, stream);
|
||||
*q = 0;
|
||||
q = buf;
|
||||
*d = abtol ((char const**)&q, 10);
|
||||
*d = abtol (&q, 10);
|
||||
count++;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -30,6 +30,6 @@ mbstowcs (wchar_t * wstring, char const *string, size_t size)
|
|||
if (__mes_debug () && !stub)
|
||||
eputs ("mbstowcs stub\n");
|
||||
stub = 1;
|
||||
strcpy ((char*)wstring, string);
|
||||
strcpy (wstring, string);
|
||||
return strlen (string);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2019, 2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -29,12 +29,7 @@ int
|
|||
main (int argc, char const *argv[])
|
||||
{
|
||||
eputs ("test:getenv\n");
|
||||
#if __GNUC__ > 11
|
||||
char* file_name = malloc (PATH_MAX);
|
||||
#else
|
||||
// FIXME: gcc-12.2.0 fails open using this
|
||||
char file_name[PATH_MAX];
|
||||
#endif
|
||||
char *srcdir = getenv ("abs_top_srcdir");
|
||||
if (! srcdir) // for running by hand
|
||||
srcdir = ".";
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue