Jan (janneke) Nieuwenhuizen
e354d912ef
lib: posix/open: Support M2-Planet.
...
* lib/posix/open.c (open)[__M2__]: New function.
2023-05-02 10:22:45 +02:00
Jan (janneke) Nieuwenhuizen
6ec74a34c4
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-05-02 10:22:45 +02:00
Jan (janneke) Nieuwenhuizen
4d4e6959e9
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-05-02 10:22:45 +02:00
Jan (janneke) Nieuwenhuizen
2a759f904d
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-05-02 10:22:45 +02:00
Jan (janneke) Nieuwenhuizen
fda2e4b9fc
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-05-02 10:22:45 +02:00
Jan (janneke) Nieuwenhuizen
468a9c7cd8
kaem: main: Remove --bootstrap-mode.
...
* scaffold/main.kaem: Remove --bootstrap-mode from M2-Planet call.
2023-05-02 10:22:45 +02:00
Jan (janneke) Nieuwenhuizen
37e8093bbb
guix: m2-planet: Update to 1.10.0.
...
* guix/git/mes.scm (m2-planet): Update to 1.10.0.
[supported-systems]: Add riscv32-linux, riscv64-linux.
2023-05-02 10:22:45 +02:00
Jan (janneke) Nieuwenhuizen
402b024982
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-05-02 10:22:45 +02:00
Jan (janneke) Nieuwenhuizen
29341f5783
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-05-02 10:22:45 +02:00
Jan (janneke) Nieuwenhuizen
e428c17cc5
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-05-02 10:22:01 +02: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 Zarraga
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 Zarraga
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
Jan (janneke) Nieuwenhuizen
cb39c832a5
doc: Update `ROADMAP'.
...
* ROADMAP (release 0.x, unsorted): Add Full Source bootstrap and
wip-aarch64-bootstrap branch. Move DONE item...
(DONE): ...here.
2022-10-15 10:05:13 +02:00
Jan (janneke) Nieuwenhuizen
60965a172c
doc: Add ANNOUNCE-0.24.1.
...
* doc/announce/ANNOUNCE-0.24 (Subject): New file.
2022-10-15 10:13:09 +02:00
Jan (janneke) Nieuwenhuizen
e70409d666
doc: Update `NEWS'.
...
* NEWS (Changes in 0.24.1 since 0.24): New section.
2022-10-15 10:01:10 +02:00
Jan (janneke) Nieuwenhuizen
074fa78f5e
lib/test: Cater for gcc-12.2.0.
...
These inexplicably avoid segfaults with gcc-12.2.0.
* lib/tests/posix/50-open-read.c (main)[__GNUC__ > 11]: Use malloc
instead of local allocated string.
* lib/tests/scaffold/7i-struct-struct.c (main)[__GNUC__ > 11]:
Initialize all fields of struct.
* lib/tests/scaffold/t.c (main): Likewise.
2022-09-15 13:56:38 +02:00
Jan (janneke) Nieuwenhuizen
ac1fab97e5
doc: Update `PORTING'.
...
* PORTING (Setup environment): Update guile, gcc-toolchain, pin
nyacc@1.00.2.
2022-06-01 14:24:34 +02:00
Rick Masters
fdac9fd3f2
lib: abtol: Fix number digits in hex number conversion.
...
After a letter based digit, number based digits are off.
* lib/mes/abtol.c (abtol): Reset "m" for number based digit.
* lib/tests/stdlib/70-strtoull.c (main): Test it.
* lib/tests/stdlib/90-strtol.c (main): Likewise.
2022-10-07 11:59:57 +02:00
Jan (janneke) Nieuwenhuizen
2cfce3186b
ARM: Use explicit remainder in __mesabi_uldiv call.
...
This inexplicably fixes a segfault in tcc-boot0.
* module/mescc/armv4/as.scm (armv4:r0/r1): Instead of using "push 0",
use explicit slot for remainder.
2022-09-13 13:52:03 +02:00
Jan (janneke) Nieuwenhuizen
eee5398f3b
ARM: Fix unsigned modulo.
...
* lib/arm-mes/arm.M1 (mov____%esp,%r3): New macro.
* module/mescc/armv4/as.scm (armv4:r0%r1): Use it to avoid overwriting
%r0 before caling __mesabi_uldiv.
2022-09-12 09:47:28 +02:00