Commit Graph

2375 Commits

Author SHA1 Message Date
Jan (janneke) Nieuwenhuizen e415635663 mescc: Use size 8 for stack.
Reported by  W. J. van der Laan <laanwj@protonmail.com>.

* module/mescc/x86_64/as.scm (x86_64:function-locals): Oops, use size 8.
2023-07-17 09:06:32 +02:00
W. J. van der Laan 252d55d2b8 lib: Linux riscv64-mes-mescc support.
* lib/linux/riscv64-mes-mescc/_exit.c,
lib/linux/riscv64-mes-mescc/_write.c,
lib/linux/riscv64-mes-mescc/crt1.c,
lib/linux/riscv64-mes-mescc/syscall-internal.c,
lib/linux/riscv64-mes-mescc/syscall.c: New files.  These add support for
building for riscv64-mes-mescc and make it self-hosting.
2023-07-17 09:06:32 +02:00
W. J. van der Laan 8fa8bb6f76 lib: Base riscv64-mes-mescc support.
* lib/riscv64-mes-mescc/setjmp.c: New file.
(setjmp, longjmp): Implement for RV64.
2023-07-17 09:06:32 +02:00
W. J. van der Laan ff2b2f6ae6 lib: Add RISCV64 instruction macros for M1.
* lib/riscv64-mes/riscv64.M1: New file.  Add set of instruction macros
for RV64.  These are all potentially needed by the code generation.  I
have made no effort yet to minimize the list of instructions for mes+tcc
compile.
2023-07-17 09:06:32 +02:00
W. J. van der Laan 760f7bc891 mescc: RISC-V64 code generation.
* mes/module/mescc/mescc.mes: Import riscv64 code generation modules.
* mes/module/mescc/riscv64/as.mes: Imports for as.mes.
* mes/module/mescc/riscv64/info.mes: Imports for info.mes.
* module/mescc/mescc.scm (replace-suffix, arch-get, arch-get-info,
arch-get-machine, arch-get-m1-macros, .E?, .s?, .o?): Handle riscv64 and
some stubs for riscv32.
(arch-get-defines): Add defines for riscv32 and riscv64.
* module/mescc/riscv64/as.scm: New file: Code generator module for RISC-V64.
* module/mescc/riscv64/info.scm: New file: Architecture info for RISC-V64.
* build-aux/build-guile.sh (SCM_FILES): Add them.
2023-07-17 09:06:32 +02:00
W. J. van der Laan a5a1ffa6a4 lib: Make stdarg work for GCC on RISC-V64.
* include/stdarg.h: GCC on RISC-V always passes arguments in registers.
Implementing these macros without the use of built-ins would be very
involved. So use those for now to make printf etc work.
2023-07-17 09:06:32 +02:00
W. J. van der Laan 9aa5d71950 lib/tests: Take RISC-V into account in size conditionals.
* lib/tests/scaffold/76-pointer-arithmetic.c (main): Use the right sizes
in the test for RISC-V architectures.
* lib/tests/scaffold/7k-for-each-elem.c (main): Same.
* lib/tests/scaffold/85-sizeof.c: Same.
2023-07-17 09:06:32 +02:00
W. J. van der Laan a9fac33bcb lib: General Linux RISC-V64 syscall support.
* include/linux/riscv32/kernel-stat.h,
include/linux/riscv64/kernel-stat.h: New files.
* include/fcntl.h (AT_FDCWD, AT_SYMLINK_NOFOLLOW, AT_REMOVEDIR): Add
necessary constants.
* include/stdint.h: Integer size defines for RISC-V.
* include/sys/stat.h: "stat" struct for RISC-V.
* lib/linux/_open3.c (_open3)[!SYS_open]: Use SYS_openat.
* lib/linux/access.c (access)[!SYS_access]: Use SYS_faccessat.
* lib/linux/chmod.c (chmod)[!SYS_chmod]: Use SYS_fchmodat.
* lib/linux/dup2.c (dup2)[!SYS_dup2]: Use if SYS_dup3.
* lib/linux/fork.c (fork)[!SYS_fork]: Use SYS_clone.
* lib/linux/getdents.c (getdents)[!SYS_getdents]: Use SYS_getdents64.
* lib/linux/link.c (link)[!SYS_link]: Use SYS_linkat.
* lib/linux/lstat.c (lstat)[!SYS_lstat]: Use SYS_newfstatat.
* lib/linux/mkdir.c (mkdir)[!SYS_mkdir]: Use SYS_mkdirat.
* lib/linux/mknod.c (mknod)[!SYS_mknod]: Use SYS_mknodat.
* lib/linux/pipe.c (pipe)[!SYS_pipe]: Use SYS_pipe2.
* lib/linux/readlink.c (readlink)[!SYS_readlinkat]: Use SYS_readlinkat.
* lib/linux/rename.c (rename)[!SYS_rename]: Use SYS_renameat2.
* lib/linux/rmdir.c (rmdir)[!SYS_rmdir]: Use SYS_unlinkat.
* lib/linux/signal.c (_restorer_for_siginfo): Remove unused function
that causes compilation issue.
* lib/linux/stat.c (stat)[!SYS_stat]: Use SYS_newfstatat.
* lib/linux/symlink.c (symlink)[!SYS_symlinkat]: Use SYS_symlink.
* lib/linux/unlink.c (unlink)[!SYS_unlink]: Use SYS_unlinkat.
2023-07-17 09:06:32 +02:00
W. J. van der Laan f33eef1100 lib: Add _sys_call_5 for Linux RISC-V64.
* include/linux/syscall.h (_sys_call5): Declare 5-argument syscall needed
for SYS_renameat2, currently only used on RISC-V64.
* lib/linux/riscv64-mes-gcc/syscall.c (__sys_call5, _sys_call5):
Implement it.
2023-07-17 09:06:32 +02:00
W. J. van der Laan 5801038749 lib: Linux riscv64-mes-gcc support.
* lib/linux/riscv64-mes-gcc/_exit.c,
lib/linux/riscv64-mes-gcc/_write.c,
lib/linux/riscv64-mes-gcc/crt1.c,
lib/linux/riscv64-mes-gcc/syscall-internal.c,
lib/linux/riscv64-mes-gcc/syscall.c: New files to make it possible
to compile mes for riscv64-mes-gcc.
2023-07-17 09:06:32 +02:00
W. J. van der Laan 6a77115f54 lib: Base riscv64-mes-gcc support (dummy setjmp).
* lib/riscv64-mes-gcc/setjmp.c: New file.
(setjmp, longjmp): Add dummy implementations. Implementing these for gcc
would be very involved, and does not seem necessary to get mescc to
work.
2023-07-17 09:06:32 +02:00
W. J. van der Laan ec2b5b8618 lib: Add RISC-V64 Linux syscall numbers header.
* include/linux/riscv64/syscall.h: New file: list relevant syscall
number constants.
2023-07-17 09:06:32 +02:00
Jan (janneke) Nieuwenhuizen 48bea0ef8a lib: Document syscalls.
* include/linux/SYSCALLS: New file.
2023-07-17 09:06:32 +02:00
W. J. van der Laan e495d0c4a8 lib: Make Linux scaffold work for RISC-V64.
* lib/linux/riscv64-mes-gcc/exit-42.S,
lib/linux/riscv64-mes-gcc/hello-mes.S,
lib/linux/riscv64-mes/elf64-0exit-42.hex2,
lib/linux/riscv64-mes/elf64-0header.hex2,
lib/linux/riscv64-mes/elf64-0hello-mes.hex2,
lib/linux/riscv64-mes/elf64-body-exit-42.hex2,
lib/linux/riscv64-mes/elf64-body-hello-mes.hex2,
lib/linux/riscv64-mes/elf64-footer-single-main.hex2,
lib/linux/riscv64-mes/elf64-header.hex2: New files.  Makes basic
scaffold pass on RISC-V64.
2023-07-17 09:06:32 +02:00
W. J. van der Laan 1de2efef97 core: Add RISC-V architecture detection.
* src/mes.c(mes_environment)[__riscv_xlen == 32]: Set
architecture to riscv32.
[__riscv_xlen == 64]: Set architecture to riscv64.

xlen
2023-07-17 09:06:32 +02:00
W. J. van der Laan be06e18507 configure: Recognize RISC-V architectures.
* configure (main): Classify "riscv64" as 64 bit, allow "redhat" OS
(somewhat tangential, but important for Fedora RISC-V), allow
"riscv32-linux-mes" and "riscv64-linux-mes" as system.
2023-07-17 09:06:32 +02:00
W. J. van der Laan 0e3da7e9d9 mescc: Add r0-cmp-r1 instruction.
This instruction is used to compare two registers and set the flags
accordingly. In current architectures this is the same as r0-r1, but for
RISCV it will be different.  RISC-V does not have condition flags so
(until a better solution) we are going to emulate them there.

* module/mescc/armv4/as.scm (armv4:instructions): Add r0-cmp-r1 as alias
of r0-r1.
* module/mescc/i386/as.scm: Same.
* module/mescc/x86_64/as.scm: Same.
* module/mescc/compile.scm (expr->register): Make use of the new
r0-cmp-r1 instruction.
2023-07-17 09:06:32 +02:00
Andrius Štikonas 1ea9749125 mescc: Do not overflow M1 64bit immediates.
M1 immediates are limited to 31-bit before they become negative.

* module/mescc/x86_64/as.scm (x86_64:value->r, x86_64:r-cmp-value,
x86_64:r-long-mem-add, x86_64:r-and): Limit M1 immediate to #x80000000.

* lib/tests/scaffold/67-m1-overflow-check.c: New test.
* build-aux/check-mescc.sh (mes_tests): Add it.
2023-07-17 09:05:18 +02:00
Andrius Štikonas 0083644f0c mescc: Fix hex2:immediate8 to work with mes/m2-compiled mes.
* module/mescc/M1.scm (hex2:immediate8): Remove mesc? exception.
(mesc?): Remove.
2023-07-17 09:00:01 +02:00
Janneke Nieuwenhuizen e5a49d6ac5 guix: m2-planet: Update to 1.10.0-0.754c5de.
For 64bit platforms, this fix is essential

    85dd953 Add padding when loading global ints on 64-bit arches.

* guix/git/mes.scm (m2-planet): Update to latest git.
2023-07-08 15:13:12 +02:00
Janneke Nieuwenhuizen 54352a7d71 core: Avoid displaying truncated 64bit values.
* src/display.c (display_helper): Use `ltoa' instead of `itoa'.
2023-07-08 15:13:12 +02:00
Andrius Štikonas 2c87a83e13 lib: Fix x86_64 M2 elf header to work with debug info.
* lib/m2/x86_64/ELF-x86_64.hex2: Fix e_shoff, e_shentsize, e_shstrndx.
2023-07-08 15:13:12 +02:00
Andrius Štikonas 7663488afd kaem: Pass --64 to blood_elf on 64-bit arches.
* kaem.run (blood_elf_flag): New variable with dummy default value to
support kaem from mescc-tools 1.4.0.
* kaem.x86_64 (blood_elf_flag): New variable.
2023-07-08 15:13:12 +02:00
Janneke Nieuwenhuizen 9da09192a0 m2: Add new style x86_64 defines to support M2-Planet 1.11.0.
* lib/m2/x86_64/x86_64_defs.M1: Add new M1 defines.
2023-07-08 15:13:12 +02:00
Jan (janneke) Nieuwenhuizen 52003a57a2 x86_64: build: Cater for M2-Planet.
* build-aux/cflags.sh: Set cc_cpu.
* build-aux/config.sh.in (cc_cpu): Export.
* build-aux/export.make (cc_cpu): Likewise.
* kaem.arm (cc_cpu): New variable.
* kaem.x86 (cc_cpu): New variable.
* kaem.run (cc_cpu): New variable.  Define __<cc_cpu>__.
* scaffold/argv.kaem (cc_cpu): Likewise.  Define __linux__
* scaffold/global-array.kaem (cc_cpu): Likewise.
* scaffold/hello.kaem (cc_cpu): Likewise.
* scaffold/local-array.kaem (cc_cpu): Likewise.
* scaffold/local-static-array.kaem (cc_cpu): Likewise.
* scaffold/main.kaem (cc_cpu): Likewise.
* scaffold/read.kaem (cc_cpu): Likewise.
* kaem.x86_64: New file.
lib/m2/x86_64/ELF-x86_64.hex2,
lib/m2/x86_64/x86_64_defs.M1: New files, imported from M2Libc.
lib/linux/x86_64-mes-m2/_exit.c,
lib/linux/x86_64-mes-m2/_write.c,
lib/linux/x86_64-mes-m2/crt1.M1,
lib/linux/x86_64-mes-m2/crt1.c,
lib/linux/x86_64-mes-m2/syscall.c: New files, adapted for M2-Planet
calling convention from ...
* lib/linux/x86_64-mes-mescc: ... here.
* build-aux/build.sh.in: Also allow kaem build for x86_64.
* include/mes/lib-mini.h[__M2__]: Define as sizeof (void*).
* include/mes/mes.h[__M2__](M2_CELL_SIZE): Define as sizeof (struct scm).
* lib/x86_64-mes/x86_64.M1 (add____$i8,%rbp, mov____%rdi,%rbp): New
defines.
* src/posix.c (TIME_UNITS_PER_SECOND): Cater for 64bit M2-Planet.
2023-07-08 15:13:12 +02:00
Janneke Nieuwenhuizen 8e75c00c7b repl: Fix include, load, use MODULE, and mes-use-module.
Reported by Irvise via IRC.

* mes/module/mes/repl.mes (repl)[load-env, mes-load-module-env]: New
inner defines.
[use]: Use mes-load-module-env, do not return content of module.
Special-case 'include' and 'load'.
2023-07-08 15:10:05 +02:00
Janneke Nieuwenhuizen 5850531ae9 core: Set compiler for M2-Planet.
This is a follow-up to commit
    7a6505be6e
    build: Cater for M2-Planet.

* src/mes.c (mes_environment)[__M2__]: Set compiler to "m2c".
2023-07-08 15:10:05 +02:00
Janneke Nieuwenhuizen ab9946d8ef lib/tests: Initialize local variable.
Reuported by Andrius Štikonas <andrius@stikonas.eu> via IRC.

* lib/tests/assert/50-assert.c (main): Initialize local f.
* lib/tests/scaffold/21-char-array.c (main): Likewise.
2023-07-08 15:10:05 +02:00
Janneke Nieuwenhuizen 00720c8d5f mes: Define R_OK as 4.
Reported by fossy via IRC.

* mes/module/mes/posix.mes (R_OK): Define as 4.
2023-07-08 15:10:05 +02:00
Efraim Flashner 8aa28acb4f build: Fix typo.
* build-aux/GNUmakefile.in (X86_ARCH_HEADERS): Fix typo
2023-07-08 15:10:05 +02:00
Emily Trau c20f6ac025 lib: Define O_TMPFILE for GNU make 4.4.1.
* include/fcntl.h (O_TMPFILE): New define.
2023-07-08 15:10:05 +02:00
Janneke Nieuwenhuizen ad7ce36b5b build: Drop support for mescc-tools 0.5.2.
* build-aux/build-scaffold.sh (stage0_cpu_flag): Remove.  Update users.
* build-aux/cflags.sh (stage0_arch): Remove.
* build-aux/config.sh.in (numbered_arch): Remove.
* configure (main): Remove check for numbered-arch?.  Remove
substitution of @numbered-arch@.
* configure.sh (numbered_arch): Likewise.
* module/mescc.scm (%numbered-arch?): Remove.
(parse-opts): Remove support for --numbered-arch?
* module/mescc/mescc.scm (mescc:compile): Remove alignment exception for
numbered-arch?.
(infos->hex2): Likewise.
(arch-get-architecture): Remove support for numbered-arch?.
* scripts/mescc.in (numbered_arch): Remove.
* scripts/mescc.scm.in (%numbered-arch?): Remove.
("%numbered_arch"): Remove.
2023-05-03 14:52:25 +02:00
Janneke Nieuwenhuizen 1a1fbfd36c DRAFT doc: Update for 0.25.
* doc/images/gcc-mesboot-graph.dot: Regenerate.
* doc/mes.texi (Introduction): Whitespace fixes.
(Full Source Bootstrap): Mention deployment in Guix.
(Requirements): Update M2-Planet to 1.10.0.
(Bootstrap Requirements): Likewise.
(The Mes Bootstrap Process): Update Reduced Binary Bootstrap to Full
Source Bootstrap.  Update next priority.  Add deployments.
(Bootstrapping): Add tagline for "Invoking mesar".
(Full Source Bootstrap Deployments): New subsection.
2023-05-03 08:04:32 +02:00
Andrius Štikonas ad18345687 core: Fix a typo in comment.
* src/gc.c (gc_init): Fix typo.
2023-05-03 08:04:32 +02:00
Andrius Štikonas 762200b65a m2: Add new style x86 defines to support M2-Planet 1.11.0.
* lib/m2/x86/x86_defs.M1: Add new M1 defines.
2023-05-03 08:04:32 +02:00
Jan (janneke) Nieuwenhuizen 640bdd027b lib: __assert_fail: Remove M2-Planet workarounds.
* lib/mes/__assert_fail.c (__assert_fail): Use *file, *function.
2023-05-03 08:04:32 +02:00
Jan (janneke) Nieuwenhuizen 6bc6e8354e 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-05-03 08:04:32 +02:00
Jan (janneke) Nieuwenhuizen cbea14f843 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-05-03 08:04:32 +02:00
Jan (janneke) Nieuwenhuizen 7725574935 kaem: Add kaem.arm and kaem.x86.
* kaem.arm,
kaem.x86: New files.
2023-05-03 08:04:32 +02:00
Jan (janneke) Nieuwenhuizen dad460189f kaem.run: Remove --bootstrap-mode.
* include/linux/arm/syscall.h,
include/linux/x86/syscall.h,
include/mes/constants.h: Remove CONSTANTs.
* 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-cc.h (__raise): ...this new file to avoid M2-Planet crash.
* include/sys/types.h: Include it.
* lib/mes/div.c (__raise): Remove prototype.
[__TINYC__ || SYSTEM_LIBC] (__raise): Remove macro.
* include/mes/lib.h (__raise)[SYSTEM_LIBC]: Remove prototype.
* 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.
* include/sys/types.h (EOF): Move to...
* include/mes/lib-cccc.h (EOF): ...here, and...
* include/m2/types.h (EOF): ...here, to avoid M2-Planet crash.
2023-05-03 08:03:48 +02:00
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