Compare commits
43 Commits
wip-wip-ar
...
master
Author | SHA1 | Date |
---|---|---|
Jan (janneke) Nieuwenhuizen | 1608f9f38a | |
Jan (janneke) Nieuwenhuizen | 7562330ec7 | |
Jan (janneke) Nieuwenhuizen | f0182ecf97 | |
Jan (janneke) Nieuwenhuizen | 56fed8d65e | |
Jan (janneke) Nieuwenhuizen | c824c62f85 | |
Jan (janneke) Nieuwenhuizen | 029a891d4e | |
Jan (janneke) Nieuwenhuizen | 43fe67e2f9 | |
R. Masters | b28f42de07 | |
Jan (janneke) Nieuwenhuizen | 1e14c26305 | |
Jan (janneke) Nieuwenhuizen | c1f93c1d71 | |
Jan (janneke) Nieuwenhuizen | dbb446d906 | |
Jan (janneke) Nieuwenhuizen | cfb620567a | |
Jan (janneke) Nieuwenhuizen | bc1fa57851 | |
Jan (janneke) Nieuwenhuizen | 25e0c4d119 | |
Jan (janneke) Nieuwenhuizen | 84fd995f43 | |
Jan (janneke) Nieuwenhuizen | 77602c2cde | |
Jan (janneke) Nieuwenhuizen | fc6e88ab89 | |
Jan (janneke) Nieuwenhuizen | 5f73e64480 | |
Gabriel Wicki | 580782bb72 | |
Jan (janneke) Nieuwenhuizen | ec12220737 | |
Ekaitz | f89fed3c3b | |
Ekaitz | 761420ac31 | |
Jan (janneke) Nieuwenhuizen | 5fc5983e50 | |
Jan (janneke) Nieuwenhuizen | 358ae145ab | |
Jan (janneke) Nieuwenhuizen | 2a1976b6de | |
Jan (janneke) Nieuwenhuizen | 550ef59cf0 | |
Jan (janneke) Nieuwenhuizen | 678b23a2ca | |
Jan (janneke) Nieuwenhuizen | 343ac812ca | |
Jan (janneke) Nieuwenhuizen | d6e3d26478 | |
Jan (janneke) Nieuwenhuizen | 62fbe42c5c | |
Jan (janneke) Nieuwenhuizen | e37e564ae3 | |
Jan (janneke) Nieuwenhuizen | cb39c832a5 | |
Jan (janneke) Nieuwenhuizen | 60965a172c | |
Jan (janneke) Nieuwenhuizen | e70409d666 | |
Jan (janneke) Nieuwenhuizen | 074fa78f5e | |
Jan (janneke) Nieuwenhuizen | ac1fab97e5 | |
Rick Masters | fdac9fd3f2 | |
Jan (janneke) Nieuwenhuizen | 2cfce3186b | |
Jan (janneke) Nieuwenhuizen | eee5398f3b | |
Jan (janneke) Nieuwenhuizen | dbec0c3845 | |
Jan (janneke) Nieuwenhuizen | e64d763ccd | |
Jan (janneke) Nieuwenhuizen | 06453020e6 | |
Jan (janneke) Nieuwenhuizen | adb232edd9 |
|
@ -1,3 +1,21 @@
|
|||
# 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/>.
|
||||
|
||||
*-
|
||||
*~
|
||||
.#*
|
||||
|
@ -117,6 +135,7 @@
|
|||
/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. <http://fsf.org/>
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://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 <http://www.gnu.org/licenses/>.
|
||||
along with this program. If not, see <https://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
|
||||
<http://www.gnu.org/licenses/>.
|
||||
<https://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
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
|
|
35
HACKING
35
HACKING
|
@ -5,7 +5,8 @@
|
|||
guix shell #64 bit + 32bit
|
||||
|
||||
CC=i686-unknown-linux-gnu-gcc ./configure
|
||||
CC=arm-unknown-linux-gnu-gcc ./configure
|
||||
CC=arm-unknown-linux-gnueabihf-gcc ./configure
|
||||
|
||||
or
|
||||
./configure
|
||||
|
||||
|
@ -129,30 +130,30 @@ x/s *((char **)($rsp+8))
|
|||
|
||||
** C parser/compiler
|
||||
*** [[https://savannah.gnu.org/projects/nyacc][nyacc]]
|
||||
*** PEG: [[http://piumarta.com/software/peg/][parse C using PEG]]
|
||||
*** PEG: [[https://piumarta.com/software/peg/][parse C using PEG]]
|
||||
*** [[https://en.wikipedia.org/wiki/Tiny_C_Compiler][Tiny C Compiler]]
|
||||
*** [[http://www.t3x.org/subc/index.html][Sub C]]
|
||||
*** [[https://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
|
||||
*** [[http://www.tldp.org/HOWTO/Assembly-HOWTO/linux.html][Assembly HOWTO]]
|
||||
*** [[https://www.tldp.org/HOWTO/Assembly-HOWTO/linux.html][Assembly HOWTO]]
|
||||
*** ELF
|
||||
7f 45 4c 46
|
||||
*** [[http://www.muppetlabs.com/~breadbox/software/tiny/][Small ELF programs]]
|
||||
*** [[http://www.cirosantilli.com/elf-hello-world/][Elf hello world]]
|
||||
*** [[https://www.muppetlabs.com/~breadbox/software/tiny/][Small ELF programs]]
|
||||
*** [[https://www.cirosantilli.com/elf-hello-world/][Elf hello world]]
|
||||
** SC - c as s-expressions
|
||||
sc: http://sph.mn/content/3d3
|
||||
sc: https://sph.mn/content/3d3
|
||||
** RNRS
|
||||
*** [[http://www.scheme-reports.org/][Scheme Reports]]
|
||||
*** [[https://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
|
||||
http://forum.osdev.org/viewtopic.php?f=15&t=19937
|
||||
https://forum.osdev.org/viewtopic.php?f=15&t=19937
|
||||
|
||||
http://www.stripedgazelle.org/joey/dreamos.html
|
||||
http://armpit.sourceforge.net/
|
||||
http://common-lisp.net/project/movitz/movitz.html
|
||||
https://www.stripedgazelle.org/joey/dreamos.html
|
||||
https://armpit.sourceforge.net/
|
||||
https://common-lisp.net/project/movitz/movitz.html
|
||||
|
||||
<civodul> janneke: https://github.com/namin/inc looks interesting [15:18]
|
||||
** Orians Jeremiah
|
||||
|
@ -169,13 +170,13 @@ http://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_/http://homepage.ntlworld.com/edmund.grimley-evans/bcompiler.html
|
||||
https://web.archive.org/web/20160604035203fw_/https://homepage.ntlworld.com/edmund.grimley-evans/bcompiler.html
|
||||
|
||||
** C4/C500
|
||||
https://web.archive.org/web/20160604041431/http://homepage.ntlworld.com/edmund.grimley-evans/cc500/cc500.c
|
||||
https://web.archive.org/web/20160604041431/https://homepage.ntlworld.com/edmund.grimley-evans/cc500/cc500.c
|
||||
https://github.com/rswier/c4/blob/master/c4.c
|
||||
** Compilers for free
|
||||
http://codon.com/compilers-for-free
|
||||
https://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
|
||||
|
@ -187,10 +188,10 @@ simple as possible.
|
|||
*** pcc
|
||||
*** early GCC?
|
||||
https://miyuki.github.io/2017/10/04/gcc-archaeology-1.html
|
||||
*** [[http://tack.sourceforge.net/][ack]]
|
||||
*** [[https://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/http://homepage.ntlworld.com/edmund.grimley-evans/cc500/][cc500]]
|
||||
*** [[https://web.archive.org/web/20160402225843/https://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
|
||||
|
|
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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
Copyright © 2016,2017,2018,2019,2021,2022,2023 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,6 +10,32 @@ Copyright © 2016,2017,2018,2019,2021,2022 Jan (janneke) Nieuwenhuizen <janneke@
|
|||
|
||||
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.
|
||||
|
@ -24,6 +50,20 @@ 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@7 grep git guile@2.2 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 grep git guile gzip help2man make mescc-tools nyacc openssh-sans-x pkg-config sed tar texinfo
|
||||
#+END_SRC
|
||||
|
||||
** Try it
|
||||
|
|
6
README
6
README
|
@ -7,7 +7,7 @@
|
|||
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 [[http://bootstrappable.org][bootstrappable builds]]
|
||||
help create a full-source bootstrap as part of the [[https://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: [[http://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: [[https://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] [[http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf]]
|
||||
[10] [[https://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
|
||||
|
|
11
ROADMAP
11
ROADMAP
|
@ -1,7 +1,7 @@
|
|||
-*- org -*-
|
||||
#+TITLE: Tentative GNU Mes Road Map
|
||||
|
||||
Copyright © 2016,2017,2018,2019,2020,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
Copyright © 2016,2017,2018,2019,2020,2022,2023 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,8 +23,11 @@ on Libera Chat!
|
|||
|
||||
* TODO
|
||||
** release 0.x, unsorted
|
||||
- Full Source Bootstrap:
|
||||
+ integrate into GNU Guix; see branch wip-full-source-bootstrap.
|
||||
- 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,
|
||||
|
@ -63,6 +66,8 @@ 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.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# GNU Mes --- Maxwell Equations of Software
|
||||
# Copyright © 2018,2019,2021,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
# Copyright © 2018,2019,2021,2022,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
#
|
||||
# This file is part of GNU Mes.
|
||||
#
|
||||
|
@ -85,17 +85,26 @@ 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:
|
||||
build: | $(ARCH_HEADERS)
|
||||
$(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}
|
||||
|
@ -348,6 +357,7 @@ 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
|
||||
|
@ -388,7 +398,7 @@ gen-announce:
|
|||
$(GEN_ANNOUNCE) \
|
||||
--release-type=beta \
|
||||
--package-name=mes \
|
||||
--previous-version='0.24' \
|
||||
--previous-version='0.24.1' \
|
||||
--current-version=$(VERSION) \
|
||||
--gpg-key-id=$(GPG_KEY_ID) \
|
||||
--url-directory=https://ftp.gnu.org/gnu/mes \
|
||||
|
|
|
@ -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 ${srcdest}include/$mes_kernel/$mes_cpu"
|
||||
AM_CPPFLAGS="-D HAVE_CONFIG_H=1 -I ${srcdest}include -I ../include -I include"
|
||||
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=
|
||||
CPPFLAGS="-D HAVE_CONFIG_H=1 -I ${srcdest}include -I ${srcdest}include/$mes_kernel/$mes_cpu"
|
||||
AM_CPPFLAGS="-D HAVE_CONFIG_H=1 -I ${srcdest}include -I ../include -I include"
|
||||
AM_CFLAGS="-L ${srcdest}lib"
|
||||
|
||||
objects=
|
||||
|
|
|
@ -64,16 +64,6 @@ 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
|
||||
|
@ -85,3 +75,13 @@ 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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
# Copyright © 2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
#
|
||||
# This file is part of GNU Mes.
|
||||
#
|
||||
|
@ -29,6 +29,7 @@ fi
|
|||
|
||||
. ./config.sh
|
||||
. ${srcdest}build-aux/trace.sh
|
||||
. ${srcdest}build-aux/cflags.sh
|
||||
|
||||
if $courageous; then
|
||||
set +e
|
||||
|
@ -42,25 +43,6 @@ 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\
|
||||
|
|
|
@ -38,25 +38,6 @@ 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
|
||||
|
@ -85,9 +66,8 @@ fi
|
|||
AM_CPPFLAGS="
|
||||
-D HAVE_CONFIG_H=1
|
||||
-I ${srcdest}lib
|
||||
-I include
|
||||
-I ${srcdest}include
|
||||
-I ${srcdest}include/$mes_kernel/$mes_cpu
|
||||
-I ../include
|
||||
"
|
||||
if test $mes_kernel = gnu; then
|
||||
AM_CPPFLAGS="$AM_CPPFLAGS
|
||||
|
@ -112,9 +92,9 @@ fi
|
|||
AM_CPPFLAGS="
|
||||
-D HAVE_CONFIG_H=1
|
||||
-I ${srcdest}lib
|
||||
-I include
|
||||
-I ${srcdest}include
|
||||
-I ${srcdest}include/$mes_kernel/$mes_cpu
|
||||
-I ../include
|
||||
-I include
|
||||
"
|
||||
if test "$compiler" != bootstrap; then
|
||||
${SHELL} ${srcdest}build-aux/build-mes.sh
|
||||
|
@ -156,9 +136,9 @@ fi
|
|||
AM_CPPFLAGS="
|
||||
-D HAVE_CONFIG_H=1
|
||||
-I ${srcdest}lib
|
||||
-I include
|
||||
-I ${srcdest}include
|
||||
-I ${srcdest}include/$mes_kernel/$mes_cpu
|
||||
-I ../include
|
||||
-I include
|
||||
"
|
||||
compiler=mescc
|
||||
AR=${MESAR-"${srcdest}pre-inst-env mesar"}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# GNU Mes --- Maxwell Equations of Software
|
||||
# Copyright © 2018,2019,2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
# Copyright © 2018,2019,2020,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
#
|
||||
# This file is part of GNU Mes.
|
||||
#
|
||||
|
@ -16,6 +16,25 @@
|
|||
# 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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
# Copyright © 2017,2018,2019,2020,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
#
|
||||
# This file is part of GNU Mes.
|
||||
#
|
||||
|
@ -117,6 +117,7 @@ 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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
# Copyright © 2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
#
|
||||
# This file is part of GNU Mes.
|
||||
#
|
||||
|
@ -99,6 +99,7 @@ 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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
;;; Copyright © 2016,2017,2018,2019,2020,2021,2022,2023 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")
|
||||
(define VERSION "0.24.2")
|
||||
|
||||
(cond-expand
|
||||
(guile)
|
||||
|
@ -707,6 +707,13 @@ 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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
# Copyright © 2018,2019,2021,2022,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
#
|
||||
# This file is part of GNU Mes.
|
||||
#
|
||||
|
@ -20,7 +20,7 @@
|
|||
|
||||
set -e
|
||||
|
||||
VERSION=0.24
|
||||
VERSION=0.24.2
|
||||
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=${M1-$(command -v M2-Planet)}
|
||||
KAEM=${KAEM-$(command -v kaem)}
|
||||
M2_PLANET=${M2_PLANET-$(command -v M2-Planet)} || true
|
||||
KAEM=${KAEM-$(command -v kaem)} || true
|
||||
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,6 +271,10 @@ 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
|
||||
|
|
|
@ -0,0 +1,115 @@
|
|||
|
||||
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
|
|
@ -0,0 +1,117 @@
|
|||
|
||||
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{http://fsf.org/}
|
||||
@uref{https://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{http://www.gnu.org/copyleft/}.
|
||||
@uref{https://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
|
||||
|
|
24
doc/mes.texi
24
doc/mes.texi
|
@ -204,7 +204,7 @@ Freedom 1.
|
|||
@section Reproducible Builds
|
||||
|
||||
The current Reproducible Builds effort incubated in the Debian
|
||||
project@footnote{@url{http://debian.org, The Debian Project}} and was
|
||||
project@footnote{@url{https://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{http://www.ece.cmu.edu/~ganger/712.fall02/papers/p761-thompson.pdf,
|
||||
@url{https://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{http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf,
|
||||
@url{https://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf,
|
||||
LISP-1.5} manual:
|
||||
|
||||
@quotation
|
||||
|
@ -553,11 +553,11 @@ in the Mes source tree for additional details.
|
|||
GNU Mes depends on the following packages:
|
||||
|
||||
@itemize
|
||||
@item @url{http://gnu.org/software/guile/, GNU Guile}, version 2.0.13 or
|
||||
@item @url{https://gnu.org/software/guile/, GNU Guile}, version 2.0.13 or
|
||||
later, including 2.2.x and 3.0.x,
|
||||
@item @url{http://www.gnu.org/software/make/, GNU Make}.
|
||||
@item @url{https://www.gnu.org/software/make/, GNU Make}.
|
||||
@item @url{https://savannah.gnu.org/projects/nyacc/, NYACC}, version 1.00.2,
|
||||
@item @url{http://gcc.gnu.org, GCC's gcc}, version 2.95.3 or later, including 10.2.0,
|
||||
@item @url{https://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,
|
||||
@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{http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/commencement.scm}}.
|
||||
@url{https://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,2in,,Reference graph of the gcc-core-mesboot0}
|
||||
@image{images/gcc-mesboot-graph,6in,,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=ADRRESS
|
||||
@item --base-address=ADDRESS
|
||||
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{http://www.gnu.org/software/emacs, Emacs}, empowered by the
|
||||
wonderful @url{http://nongnu.org/geiser/, Geiser}.
|
||||
@url{https://www.gnu.org/software/emacs, Emacs}, empowered by the
|
||||
wonderful @url{https://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{http://mumble.net/~campbell/scheme/style.txt, Riastradh's Lisp
|
||||
@url{https://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.
|
||||
|
|
|
@ -183,13 +183,13 @@ extensive examples, including parsers for the Javascript and C99 languages.")
|
|||
(define-public mes
|
||||
(package
|
||||
(name "mes")
|
||||
(version #!mes!# "0.24")
|
||||
(version #!mes!# "0.24.2")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append
|
||||
"https://ftp.gnu.org/pub/gnu/mes/mes-" version ".tar.gz"))
|
||||
(sha256
|
||||
(base32 #!mes!# "00lrpm4x5qg0l840zhbf9mr67mqhp8gljcl24j5dy0y109gf32w2"))))
|
||||
(base32 #!mes!# "0vp8v88zszh1imm3dvdfi3m8cywshdj7xcrsq4cgmss69s2y1nkx"))))
|
||||
(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")
|
||||
(let ((version #!mes!# "0.24.2")
|
||||
(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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2017,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -27,8 +27,9 @@
|
|||
#undef __MES_ASSERT_H
|
||||
#include_next <assert.h>
|
||||
#else // ! SYSTEM_LIBC
|
||||
#define assert(x) ((x) ? (void)0 : __assert_fail (#x))
|
||||
void __assert_fail (char *s);
|
||||
#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);
|
||||
#endif // ! SYSTEM_LIBC
|
||||
|
||||
#endif // __MES_ASSERT_H
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2016,2017 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2017,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -17,40 +17,9 @@
|
|||
* 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_GNU_X86_KERNEL_STAT_H
|
||||
#define __MES_GNU_X86_KERNEL_STAT_H 1
|
||||
|
||||
#if SYSTEM_LIBC
|
||||
#error "SYSTEM_LIBC not supported"
|
||||
#endif
|
||||
#include <arch/syscall.h>
|
||||
|
||||
#include <mes/lib.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
int size = 5000;
|
||||
puts ("m!\n");
|
||||
//int *p = 0;
|
||||
char *p = 0;
|
||||
p = malloc (size);
|
||||
size = 5000;
|
||||
puts ("p=");
|
||||
puts (itoa (p));
|
||||
puts ("\n");
|
||||
for (int i = 0; i < size; i++)
|
||||
{
|
||||
puts ("set ");
|
||||
puts (itoa (i));
|
||||
puts ("\n");
|
||||
p[i] = i;
|
||||
}
|
||||
for (int i = 0; i < size; i++)
|
||||
{
|
||||
puts (itoa (i));
|
||||
puts (": ");
|
||||
puts (itoa (p[i]));
|
||||
puts ("\n");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif // __MES_GNU_X86_KERNEL_STAT_H
|
|
@ -0,0 +1,79 @@
|
|||
/* -*-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,4 +109,23 @@
|
|||
#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 */
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
/* -*-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 */
|
|
@ -0,0 +1,79 @@
|
|||
/* -*-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,7 +75,6 @@
|
|||
#define SYS_stat 0x6a
|
||||
|
||||
/* libc+gnu */
|
||||
|
||||
#define SYS_chdir 0x0c
|
||||
#define SYS_link 0x09
|
||||
#define SYS_getpid 0x14
|
||||
|
@ -112,4 +111,23 @@
|
|||
#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 */
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
/* -*-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
|
|
@ -0,0 +1,138 @@
|
|||
/* -*-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,7 +67,8 @@ extern void (*__call_at_exit) (void);
|
|||
#define __FILEDES_MAX 512
|
||||
|
||||
#if !SYSTEM_LIBC
|
||||
void __assert_fail (char *s);
|
||||
void __assert_fail (char const *s, char const *file, unsigned line,
|
||||
char const *function);
|
||||
ssize_t __buffered_read (int filedes, void *buffer, size_t size);
|
||||
size_t __buffered_read_clear (int filedes);
|
||||
void _exit (int code);
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __MES_SYS_STAT_H
|
||||
#define __MES_SYS_STAT_H 1lei
|
||||
#define __MES_SYS_STAT_H 1
|
||||
|
||||
#if SYSTEM_LIBC
|
||||
#undef __MES_SYS_STAT_H
|
||||
|
@ -29,60 +29,13 @@
|
|||
|
||||
#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);
|
||||
|
|
3
kaem.run
3
kaem.run
|
@ -53,6 +53,7 @@ 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 \
|
||||
|
@ -81,6 +82,8 @@ 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 \
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
### GNU Mes --- Maxwell Equations of Software
|
||||
### Copyright © 2017,2018,2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
### Copyright © 2017,2018,2020,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
### Copyright © 2019,2020 Danny Milosavljevic <dannym@scratchpost.org>
|
||||
###
|
||||
### This file is part of GNU Mes.
|
||||
|
@ -91,6 +91,7 @@ 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,6 +1,7 @@
|
|||
/* -*-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');
|
||||
return isdigit (c) || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F');
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2016,2017,2018,2019,2022 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 <syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
|
||||
char *
|
||||
_getcwd (char *buffer, size_t size)
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2016,2017,2018,2019,2022 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 <syscall.h>
|
||||
#include <arch/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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2016,2017,2018,2019,2022 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 <syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
|
||||
long
|
||||
brk (void *addr)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2016,2017,2018,2019,2022 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 <syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
int
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019,2022 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 <syscall.h>
|
||||
#include <arch/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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
|
||||
int
|
||||
fork ()
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
|
||||
int
|
||||
fsync (int filedes)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
int
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <unistd.h>
|
||||
|
||||
gid_t
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <unistd.h>
|
||||
|
||||
uid_t
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <unistd.h>
|
||||
|
||||
gid_t
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <unistd.h>
|
||||
|
||||
pid_t
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <unistd.h>
|
||||
|
||||
pid_t
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <sys/resource.h>
|
||||
|
||||
int
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019,2022 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 <syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
int
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <unistd.h>
|
||||
|
||||
uid_t
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <stdarg.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <mes/lib.h>
|
||||
|
||||
int
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/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 <syscall.h>
|
||||
#include <arch/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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
int
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
int
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
int
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2016,2017,2018,2019,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/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, buffer, size);
|
||||
ssize_t bytes = _sys_call3 (SYS_read, long_filedes, (long) buffer, (long) 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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019,2022,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <unistd.h>
|
||||
#include <signal.h>
|
||||
|
||||
|
@ -36,7 +36,7 @@ sighandler_t
|
|||
signal (int signum, sighandler_t action)
|
||||
{
|
||||
#if __i386__
|
||||
return _sys_call2 (SYS_signal, signum, action);
|
||||
return (sighandler_t) _sys_call2 (SYS_signal, signum, (long) 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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
int
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,16 +19,10 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <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>
|
||||
#include <stdlib.h>
|
||||
|
||||
time_t
|
||||
time (time_t * result)
|
||||
|
@ -41,31 +35,3 @@ 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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2016,2017,2018,2019,2022 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 <syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
|
||||
int
|
||||
unlink (char const *file_name)
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
|
||||
int
|
||||
execve (char const *file_name, char **argv, char **env)
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
* 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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2019,2022,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,16 +19,19 @@
|
|||
*/
|
||||
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/syscall.h>
|
||||
#include <time.h>
|
||||
|
||||
char *__tv;
|
||||
|
||||
long
|
||||
time (long* result)
|
||||
{
|
||||
int r;
|
||||
struct timeval tv;
|
||||
struct timezone tz;
|
||||
r = _sys_call2 (SYS_gettimeofday, tv, tz);
|
||||
if (__tv == 0)
|
||||
__tv = malloc (sizeof (struct timeval));
|
||||
struct timeval *tv = __tv;
|
||||
r = _sys_call2 (SYS_gettimeofday, tv, 0);
|
||||
if (r != 0)
|
||||
return -1;
|
||||
if (result != 0)
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <mes/lib.h>
|
||||
#include <linux/syscall.h>
|
||||
#include <syscall.h>
|
||||
#include <arch/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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -19,14 +19,30 @@
|
|||
*/
|
||||
|
||||
#include <mes/lib.h>
|
||||
#include <assert.h>
|
||||
|
||||
void
|
||||
__assert_fail (char *s)
|
||||
__assert_fail (char const *msg, char const *file, unsigned line,
|
||||
char const *function)
|
||||
{
|
||||
if (file && file[0])
|
||||
{
|
||||
eputs (file);
|
||||
eputs (":");
|
||||
}
|
||||
if (line)
|
||||
{
|
||||
eputs (itoa (line));
|
||||
eputs (":");
|
||||
}
|
||||
if (function && function[0])
|
||||
{
|
||||
eputs (function);
|
||||
eputs (":");
|
||||
}
|
||||
eputs ("assert fail: ");
|
||||
eputs (s);
|
||||
eputs (msg);
|
||||
eputs ("\n");
|
||||
char *fail = s;
|
||||
fail = 0;
|
||||
char *fail = 0;
|
||||
fail[0] = 0;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/* -*-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.
|
||||
*
|
||||
|
@ -42,8 +43,15 @@ abtol (char const **p, int base)
|
|||
while (isnumber (s[0], base) != 0)
|
||||
{
|
||||
i = i * base;
|
||||
if (s[0] > '9')
|
||||
if (s[0] >= 'a')
|
||||
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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -20,11 +20,12 @@
|
|||
*/
|
||||
|
||||
#include <mes/lib.h>
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void
|
||||
assert_msg (int bool, char *msg)
|
||||
{
|
||||
if (bool == 0)
|
||||
__assert_fail (msg);
|
||||
__assert_fail (msg, 0, 0, 0);
|
||||
}
|
||||
|
|
|
@ -1,6 +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 © 2016,2017,2018,2019,2020,2022 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__)
|
||||
#if __M2_PLANET__ || (!(__MESC__ && __arm__) && !(__TINYC__ && __arm__ && BOOTSTRAP))
|
||||
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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2017,2018,2019,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -22,6 +22,7 @@
|
|||
#include <ctype.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int
|
||||
vfscanf (FILE * stream, char const *template, va_list ap)
|
||||
|
@ -76,7 +77,7 @@ vfscanf (FILE * stream, char const *template, va_list ap)
|
|||
ungetc (p, stream);
|
||||
*q = 0;
|
||||
q = buf;
|
||||
*d = abtol (&q, 10);
|
||||
*d = abtol ((char const**)&q, 10);
|
||||
count++;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2023 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 (wstring, string);
|
||||
strcpy ((char*)wstring, string);
|
||||
return strlen (string);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2019, 2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -29,7 +29,12 @@ 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 = ".";
|
||||
|
|
|
@ -0,0 +1,79 @@
|
|||
/* -*-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/>.
|
||||
*/
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <mes/lib.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
int i;
|
||||
|
||||
oputs ("\n");
|
||||
|
||||
oputs ("t: 1 % 2\n");
|
||||
i = 1 % 2;
|
||||
if (i != 1)
|
||||
return 1;
|
||||
|
||||
oputs ("t: 2 % 4\n");
|
||||
i = 2 % 4;
|
||||
if (i != 2)
|
||||
return 2;
|
||||
|
||||
oputs ("t: 3 % 4\n");
|
||||
i = 3 % 4;
|
||||
if (i != 3)
|
||||
return 3;
|
||||
|
||||
oputs ("t: 1 % 256\n");
|
||||
i = 1 % 256;
|
||||
if (i != 1)
|
||||
return 4;
|
||||
|
||||
unsigned u;
|
||||
|
||||
oputs ("\n");
|
||||
|
||||
oputs ("t: 1U % 2\n");
|
||||
u = 1 % 2;
|
||||
if (u != 1)
|
||||
return 5;
|
||||
|
||||
oputs ("t: 2U % 4\n");
|
||||
u = 2 % 4;
|
||||
if (u != 2)
|
||||
return 6;
|
||||
|
||||
oputs ("t: 3U % 4\n");
|
||||
u = 3 % 4;
|
||||
if (u != 3)
|
||||
return 7;
|
||||
|
||||
oputs ("t: 1U % 256\n");
|
||||
u = 1 % 256;
|
||||
if (u != 1)
|
||||
return 8;
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2017,2018,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -48,7 +48,12 @@ struct anon
|
|||
int
|
||||
main ()
|
||||
{
|
||||
struct foo f = { 0, 1, 2 };
|
||||
#if __GNUC__ > 11
|
||||
struct foo f = { 0, 1, 2, 0, 0 };
|
||||
#else
|
||||
// FIXME: gcc-12.2.0 segfaults on this
|
||||
struct foo f = { 0, 1, 2, 0 };
|
||||
#endif
|
||||
f.s.baz = 2;
|
||||
oputs ("f.s.bar=");
|
||||
oputs (itoa (f.s.bar));
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2018,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -214,7 +214,12 @@ main (int argc, char *argv[])
|
|||
//i = (*fun2)(argc, argv);
|
||||
|
||||
i = 1;
|
||||
#if __GNUC__ > 11
|
||||
int lst[6] = { -1, 1 - 1, i, 2, 3, 0 };
|
||||
#else
|
||||
// FIXME: gcc-12.2.0 segfaults on this
|
||||
int lst[6] = { -1, 1 - 1, i, 2, 3 };
|
||||
#endif
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
eputs ("i: ");
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue