Janneke Nieuwenhuizen
ef12ed4df7
squash! fixup read.kaem EOF?
2023-04-30 13:40:50 +02:00
Janneke Nieuwenhuizen
6ddf5b17de
squash! kaem.run: Remove --bootstrap-mode.
...
* include/mes/cc.h (__raise): ...here.
* include/sys/types.h (EOF): Move to...
* include/mes/cc.h (EOF): ...here, and...
* include/m2/types.h (EOF): ...here, to avoid M2-Planet crash.
2023-04-30 12:27:49 +02:00
Andrius Štikonas
aaf9d178d4
m2: Add new style x86 defines to support M2-Planet 1.11.0.
...
* lib/m2/x86/x86_defs.M1: Add new M1 defines.
2023-04-30 10:45:16 +02:00
Jan (janneke) Nieuwenhuizen
3f62afe465
DRAFT lib: __assert_fail: Remove M2-Planet workarounds.
...
* lib/mes/__assert_fail.c (__assert_fail): Use *file, *function.
2023-04-30 10:45:16 +02:00
Jan (janneke) Nieuwenhuizen
975c87941b
DRAFT lib: linux: Add wait4.
...
* lib/linux/waitpid.c (waitpid): Factor-out wait4 call to...
* lib/linux/wait4.c: ...new file here.
* include/sys/wait.h (wait4): Add prototype. Include sys/resource.h.
* include/sys/resource.h (struct rusage): Remove gratuitous "int" for
M2-Planet.
* build-aux/configure-lib.sh (libc_SOURCES): Add it.
* kaem.run,
simple.make (M2_SOURCES),
simple.sh: Likewise. Also add resource.h.
2023-04-30 10:41:08 +02:00
Jan (janneke) Nieuwenhuizen
e6f875a2c6
core: Move M2_PTR_SIZE, M2_CELL_SIZE to include file.
...
* lib/posix/getenv.c (M2_PTR_SIZE),
lib/posix/setenv.c (M2_PTR_SIZE): Move definition...
* include/mes/lib-mini.h (M2_PTR_SIZE): ...here.
* src/gc.c (M2_CELL_SIZE),
src/symbol.c (M2_CELL_SIZE),
src/test/gc.c (M2_CELL_SIZE),
src/vector.c (M2_CELL_SIZE): Move definition...
* include/mes/mes.h (M2_CELL_SIZE): ...here.
2023-04-30 10:41:08 +02:00
Jan (janneke) Nieuwenhuizen
e1fa9f4959
kaem: Add kaem.arm and kaem.x86.
...
* kaem.arm,
kaem.x86: New files.
2023-04-30 10:41:08 +02:00
Jan (janneke) Nieuwenhuizen
f5b96067be
kaem.run: Remove --bootstrap-mode.
...
* include/linux/arm/syscall.h,
include/linux/x86/syscall.h,
include/mes/constants.h: Remove CONSTANTs.
* include/sys/types.h (EOF): Change to 0xffffffff,
resp. 0xffffffffffffffff to avoid M2-Planet crash.
* lib/m2/open.c: Move to...
* lib/linux/open.c: ...here. Update to make gcc-compatible.
* scaffold/argv.kaem: Update accordingly.
* lib/linux/lseek.c (_leek, lseek): Suport M2-Planet.
* lib/linux/_open3.c (_open3): Fix cast.
* lib/linux/waitpid.c (waitpid): Suport M2-Planet.
* lib/m2/getcwd.c (PATH_MAX): Remove CONSTANT.
* lib/m2/isatty.c (TCGETS): Remove CONSTANT.
* lib/mes/ntoab.c: Support M2-Planet.
* lib/posix/getcwd.c (__getcwd_buf): Remove.
* lib/posix/getenv.c (M2_PTR_SIZE)[__M2__]: Update to #define.
* lib/posix/setenv.c: Likewise.
* lib/stub/__raise.c (SIGABRT): Remove CONSTANT.
* src/core.c (error): Use __M2__ instead of __M2_PLANET__.
* src/gc.c (M2_CELL_SIZE)[__M2__]: Update to #define. Support
non-bootstrap-mode.
* src/symbol.c: Likewise.
* src/vector.c: Likewise.
* src/posix.c: Likewise.
(__raise): Move to...
* include/mes/lib-system.h: ...this new file to avoid M2-Planet crash.
* kaem.run: Remove --botstrap-mode. Update source list accordingly.
* simple.make (M2_PLANET_FLAGS): Remove --bootstrap-mode.
* simple.make (M2_SOURCES, M2_PLANET_INCLUDES): Update source list
accordingly.
2023-04-30 10:39:03 +02:00
Jan (janneke) Nieuwenhuizen
c37faea559
lib: posix/open: Support M2-Planet.
...
* lib/posix/open.c (open)[__M2__]: New function.
2023-02-13 13:27:51 +01:00
Jan (janneke) Nieuwenhuizen
a3cf7781e2
lib: linux/_open3: Support M2-Planet.
...
* lib/linux/_open3.c (_open3): Use function casting. Also call
__ungetc_init.
* lib/stub/__buffered_read.c: New file.
2023-02-13 13:27:51 +01:00
Jan (janneke) Nieuwenhuizen
94ceb07b70
kaem: read: Remove --bootstrap-mode.
...
* include/mes/lib.h[__M2__](__call_at_exit,abtod,dtoab,ultoa,
* include/sys/types.h[__M2__]: Fall back to unsigned instead of using
unsigned long.
* include/stdio.h[__M2__](fprintf, fscanf, printf, snprintf, sprintf,
sscanf): Hide prototypes.
* lib/stdlib/exit.c (exit)[__M2__]: Hide call to __call_at_exit.
* lib/linux/read.c (read)[__M2__]: Hide debugging.
* lib/linux/malloc.c (malloc)[__M2__]: Hide alignment.
__mesabi_umod, __mesabi_udiv, __mesabi_uldiv): Hide prototypes.
* scaffold/argv.kaem: Use them together with lib/mes/lib-mini.h instead of
lib/mes/* specializations. Remove --bootstrap-mode from M2-Planet call.
2023-02-13 13:27:51 +01:00
Jan (janneke) Nieuwenhuizen
350feb72bb
kaem: argv: Remove --bootstrap-mode.
...
* scaffold/argv.kaem: Use lib/mes/lib-mini.h instead of lib/m2/lib.h.
Remove --bootstrap-mode from M2-Planet call.
2023-02-13 13:27:51 +01:00
Jan (janneke) Nieuwenhuizen
ba01443492
kaem: hello: Remove --bootstrap-mode.
...
* include/mes/lib-mini.h: Remove M2 bootstrap constants.
[__M2__](size_t): Fall-back to unsigned instead of unsigned long.
* scaffold/hello.kaem: Use it instead of lib/m2/lib.h. Remove
--bootstrap-mode from M2-Planet call.
2023-02-13 13:27:51 +01:00
Jan (janneke) Nieuwenhuizen
ee664ba643
kaem: main: Remove --bootstrap-mode.
...
* scaffold/main.kaem: Remove --bootstrap-mode from M2-Planet call.
2023-02-13 13:27:51 +01:00
Jan (janneke) Nieuwenhuizen
5abda859d9
guix: m2-planet: Update to 1.10.0.
...
* guix/git/mes.scm (m2-planet): Update to 1.10.0.
2023-02-13 13:27:51 +01:00
Jan (janneke) Nieuwenhuizen
813e36a6f5
lib: mes/write: Rename from mes/mini-write.c
...
* lib/mes/mini-write.c: Move to...
* lib/mes/write.c: ...here.
* build-aux/configure-lib.sh,
kaem.run,
scaffold/argv.kaem,
scaffold/global-array.kaem,
scaffold/hello.kaem,
scaffold/local-array.kaem,
scaffold/local-static-array.kaem,
scaffold/read.kaem,
simple.make,
simple.sh: Update accordingly.
2023-02-13 13:27:47 +01:00
Jan (janneke) Nieuwenhuizen
d68fd5574a
build: Cater for colliding basename in C sources.
...
This is a follow-up to commit
f785f8d560
build: Fix --with-bootstrap build.
* build-aux/cc.sh: Retain directory name in object file name.
* build-aux/bootstrap.sh.in: Likewise. Compile crt1.c from local
directory.
* build-aux/build-lib.sh: Likewise.
* build-aux/build.sh.in: Remove globals.o hack.
2023-02-13 13:26:15 +01:00
Jan (janneke) Nieuwenhuizen
8bae5fe860
DRAFT lib/m2: Update syscall includes.
...
This is a follow-up to commit
bc1fa57851
lib: stat: Use SYS_stat64 for 32bit platforms.
* lib/m2/chmod.c: Update to <arch/syscall.sh>.
* lib/m2/clock_gettime.c: Likewise.
* lib/m2/read.c: Likewise.
2023-02-13 13:08:39 +01:00
Jan (janneke) Nieuwenhuizen
c656bab1fd
doc: Post-release update.
...
* build-aux/GNUmakefile.in (--previous-version): Update to 0.24.2.
* doc/announce/ANNOUNCE-0.24.2: Run `make sum-announce'.
2023-02-13 12:11:01 +01:00
Jan (janneke) Nieuwenhuizen
1608f9f38a
guix: mes: Update to 0.24.2.
...
* guix/git/mes.scm (mes)[source]: Update to 0.24.2.
2023-02-13 12:09:36 +01:00
Jan (janneke) Nieuwenhuizen
7562330ec7
build: Release 0.24.2.
...
* configure (VERSION): Bump to 0.24.2.
* configure.sh (VERSION): Likewise.
* src/symbol.c (MES_VERSION): Likewise.
* mes/module/mes/repl.mes (welcome): Update copyright years.
2023-02-13 09:22:39 +01:00
Jan (janneke) Nieuwenhuizen
f0182ecf97
build: Update release procedure.
...
* build-aux/GNUmakefile.in: Add `./configure' stage before creating
tarball.
2023-02-13 09:27:52 +01:00
Jan (janneke) Nieuwenhuizen
56fed8d65e
doc: Update `ROADMAP'.
...
* ROADMAP (release 0.x, unsorted): Add Guile module support, Gash on
Mes, Guile as a Guix FSB dependency.
2023-02-13 09:18:57 +01:00
Jan (janneke) Nieuwenhuizen
c824c62f85
doc: Add `ANNOUNCE-0.24.2'.
...
* doc/announce/ANNOUNCE-0.24.2: New file.
2023-02-13 09:15:37 +01:00
Jan (janneke) Nieuwenhuizen
029a891d4e
doc: Update `NEWS'.
...
* NEWS (Changes in 0.24.2 since 0.24.1): New section.
2023-02-13 07:19:16 +01:00
Jan (janneke) Nieuwenhuizen
43fe67e2f9
lib: Fix compile warnings.
...
* lib/linux/read.c (read): Add casts.
* lib/linux/signal.c (signal): Likewise.
* lib/stdio/vfscanf.c: Include stdlib.h.
(vfscanf): Add cast.
* lib/stdlib/mbstowcs.c (mbstowcs): Add cast.
2023-02-12 23:02:24 +01:00
R. Masters
b28f42de07
lib: Support uppercase hex conversions.
...
Uppercase hex number conversions fail for abtol, strtol, strtoul,
strtoull, atoi, and abtod.
The following patch fixes it. This allows tcc to handle assembly
language, which is necessary to build the Fiwix kernel as part of the
kernel bootstrapping in progress for the live-bootstrap project.
* lib/ctype/isxdigit.c (isxdigit): Also allow A-F.
* lib/mes/abtol.c (abtol): Also cater for A-F.
2023-01-31 08:22:49 -08:00
Jan (janneke) Nieuwenhuizen
1e14c26305
lib/m2: time: Fix segfault by allocating timeval struct.
...
Suggested by Meghan Denny <hello@nektro.net>.
* lib/m2/time.c (__tv): New global variable.
(time): Use it to allocate timeval struct.
2023-01-24 07:59:49 +01:00
Jan (janneke) Nieuwenhuizen
c1f93c1d71
doc: Use HTTPS.
...
* COPYING: Replace by new version (which uses HTTPS).
* HACKING,
README,
doc/fdl-1.3.texi,
doc/mes.texi: Use HTTPS.
2022-10-30 09:40:40 +01:00
Jan (janneke) Nieuwenhuizen
dbb446d906
doc: Update `HACKING'.
...
* HACKING (SETUP): Update arm triplet.
2022-10-16 23:19:36 +02:00
Jan (janneke) Nieuwenhuizen
cfb620567a
mescc: Fix Guile warnings.
...
* module/mescc/mescc.scm (GUILE-with-output-to-file): Remove.n
(with-output-to-file): Rename to...
(with-output-to-file*): ...this.
(mescc:preprocess, mescc:compile, infos->hex2): Update callers.
2022-10-19 10:01:48 +02:00
Jan (janneke) Nieuwenhuizen
bc1fa57851
lib: stat: Use SYS_stat64 for 32bit platforms.
...
This fixes <https://debbugs.gnu.org/41264 >.
* include/linux/arm/syscall.h (SYS_stat64, SYS_lstat64,
SYS_fstat64)[__SIZEOF_LONG_LONG__ == 8]:
New defines.
(SYS_stat, SYS_lstat, SYS_fstat)[__SIZEOF_LONG_LONG__ == 8]: Redefine them.
* include/linux/x86/syscall.h (SYS_stat64, SYS_lstat64,
SYS_fstat64)[__SIZEOF_LONG_LONG__ == 8]:
New defines.
(SYS_stat, SYS_lstat, SYS_fstat)[__SIZEOF_LONG_LONG__ == 8]: Redefine them.
* include/sys/stat.h (struct stat): Move definition to...
* include/linux/arm/kernel-stat.h,
include/linux/m2/kernel-stat.h,
include/linux/x86/kernel-stat.h,
include/linux/x86_64/kernel-stat.h: These new files.
* include/gnu/x86/kernel-stat.h: New file.
* configure (main): Copy <srcdest>include/<kernel>/<arch>/*.h to
include/.
* configure.sh: Likewise.
* .gitignore: Ignore them. Add copyright header.
* build-aux/GNUmakefile.in (X86_ARCH_HEADERS, ARCH_HEADERS): New
variables.
(build): Use them.
(include/arch/%.h, arch-dir): New targets.
* build-aux/bootstrap.sh.in (AM_CPPFLAGS): Replace
<srcdest>include/<kernel>/<cpu> with built ../include.
* build-aux/build.sh.in (AM_CPPFLAGS): Likewise.
* build-aux/install.sh.in: Also install built include.
* include/m2/types.h: New file.
* kaem.run: Use it.
* simple.sh: Copy kernel-stat.h, syscall.h for kernel/cpu to
include/arch.
2022-10-29 13:17:58 +02:00
Jan (janneke) Nieuwenhuizen
25e0c4d119
lib: __assert_fail: Update to standard.
...
* lib/mes/__assert_fail.c (__assert_fail): Add file, line, function
parameters.
* include/assert.h (assert): Update caller.
(__assert_fail): Update prototype.
* include/mes/lib.h (__assert_fail): Likewise.
* lib/mes/assert_msg.c (assert_msg): Likewise. Include assert.h.
2022-10-26 21:14:05 +02:00
Jan (janneke) Nieuwenhuizen
84fd995f43
time.c: include sys/time for gettimeofday.
...
* lib/linux/time.c: Include <sys/time.h>.
2022-05-05 23:26:46 +02:00
Jan (janneke) Nieuwenhuizen
77602c2cde
lib: linux/time: Remove SYS_time specialization.
...
* lib/linux/time.c (time)[SYS_time]: Remove specialization.
[!SYS_time && !SYS_gettimeofday]: Remove fallback.
2022-05-04 14:14:51 +02:00
Jan (janneke) Nieuwenhuizen
fc6e88ab89
simple.sh: Resurrect.
...
* simple.sh: Add src/globals.c, lib/stub/__raise.c. Use
lib/linux/malloc.c instead of lib/stdlib/malloc.c.
2022-05-03 23:06:41 +02:00
Jan (janneke) Nieuwenhuizen
5f73e64480
simple.make: Resurrect.
...
* simple.make (M2_PLANET_FLAGS): Add --bootstrap-mode.
(M2_SOURCES): Add lib/mes/globals.c. Use lib/mes/mini-write.c instead
of lib/mes/write.c. Use lib/m2/malloc.c instead of lib/stdlib/malloc.c.
(GCC_SOURCES): Add lib/mes/globals.c
(check-mescc): Set LIBRARY_PATH.
(m2): New target.
(m2/mes-m2.M1): Use it.
(m2/mes-m2.blood-elf.M1): Likewise.
2022-05-03 22:51:21 +02:00
Gabriel Wicki
580782bb72
core: Simplify math expressions.
...
* src/gc.c (gc_up_arena): Use division instead of shift.
(gc_flip): Simplify (free-news) * 1.5.
2022-05-10 22:23:40 +02:00
Jan (janneke) Nieuwenhuizen
ec12220737
scaffold: Remove obsolete malloc.
...
* scaffold/lib/stdlib/malloc.c: Remove.
2022-05-07 08:45:06 +02:00
Ekaitz
f89fed3c3b
doc: Fix typos.
...
* doc/mes.texi (Invoking mescc): Fix typo.
* module/mescc.scm (parse-opts): Likewise.
2022-09-22 11:14:34 +02:00
Ekaitz
761420ac31
mescc: Add X86_64 assembly defines for TinyCC compilation.
...
* lib/x86_64-mes/x86_64.M1 ( mov____%si,(%rdi), mov____%sil,(%rdi),
mov____(%rax),%si, mov____(%rax),%sil): New defines.
2022-09-21 09:43:43 +02:00
Jan (janneke) Nieuwenhuizen
5fc5983e50
build: When courageous, do build libgetopt and libtcc1.
...
* build-aux/build-lib.sh: Move building of libc+gnu and courageous exit
down.
2022-10-18 07:34:27 +02:00
Jan (janneke) Nieuwenhuizen
358ae145ab
build: Support bootstrap build without kaem/M2-Planet.
...
* configure.sh (M2_PLANET): Typo. Allow check to fail.
(KAEM): Allow check to fail.
2022-10-17 13:10:48 +02:00
Jan (janneke) Nieuwenhuizen
2a1976b6de
guix: mes: Update to 0.24.1.
...
* guix/git/mes.scm (mes)[source]: Update to 0.24.1.
2022-10-16 10:14:43 +02:00
Jan (janneke) Nieuwenhuizen
550ef59cf0
doc: Enlarge guix graph bootstrap image.
...
* doc/mes.texi (The Mes Bootstrap Process): Use 6in width.
2022-10-16 11:06:37 +02:00
Jan (janneke) Nieuwenhuizen
678b23a2ca
doc: Typo.
...
* doc/announce/ANNOUNCE-0.24.1: Typo.
2022-10-16 10:09:26 +02:00
Jan (janneke) Nieuwenhuizen
343ac812ca
doc: Typo.
...
* doc/announce/ANNOUNCE-0.24.1 (Subject): Typo.
2022-10-16 10:04:48 +02:00
Jan (janneke) Nieuwenhuizen
d6e3d26478
doc: Post-release update.
...
* doc/announce/ANNOUNCE-0.24.1 (Subject): Update Add gen-announce
checksums by running `make sum-announce'.
* build-aux/GNUmakefile.in (--previous-version): Update to 0.24.1.
2022-10-16 09:57:43 +02:00
Jan (janneke) Nieuwenhuizen
62fbe42c5c
guix: mes: Update to 0.24.1.
...
* guix/git/mes.scm (mes)[source]: Update to 0.24.1.
2022-10-16 09:56:31 +02:00
Jan (janneke) Nieuwenhuizen
e37e564ae3
build: Release 0.24.1.
...
* configure (VERSION): Bump to 0.24.1.
* configure.sh (VERSION): Likewise.
2022-10-15 09:52:04 +02:00