Artemis Tosini
2f28361d24
First work at getting mes to compile on aarch64
2023-10-21 16:29:46 +00:00
Artemis Tosini
98a1873a57
Add initial flake
2023-10-21 02:35:44 +00: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
fd130a03d1
kaem: scaffold/read.kaem.
...
* .gitignore: Update.
* include/linux/x86/syscall.h: Update for M2-Planet.
* lib/linux/brk.c (brk): Remove cast for M2-Planet.
* lib/linux/x86-mes-m2/syscall.c: New file.
* lib/m2/malloc.c: New file.
* lib/string/memset.c (memset): Update for M2-Planet.
* scaffold/read.c: Update for M2-Planet.
* scaffold/kaem.read: New file.
2020-07-15 22:27:57 +02:00
Jan (janneke) Nieuwenhuizen
6297f36d4a
kaem: scaffold/main.kaem.
...
* lib/linux/x86-mes-m2/crt1.c,
lib/linux/x86-mes-m2/crt1.M1,
lib/linux/x86-mes-m2/_exit.c,
lib/linux/x86-mes-m2/_write.c: New files.
* lib/m2/x86/x86_defs.M1: New file. Import from stage0.
* lib/m2/x86/ELF-x86.hex2: New file. Import from M2-Planet.
* scaffold/main.c: Update for M2-Planet.
* scaffold/main.kaem: New file.
* .gitignore: Update.
2020-07-15 19:25:16 +02:00
Jan (janneke) Nieuwenhuizen
94143959af
core: Split-out builtins.c.
...
* src/mes.c make_builtin_type, make_builtin, builtin_name,
builtin_arity, builtin_function, builtin_p, builtin_printer,
init_builtin, mes_builtins): Move to ..
* src/builtins.c: New file.
* build-aux/configure-lib.sh (mes_SOURCES): Add it.
* build-aux/snarf.sh: Likewise.
* build-aux/build-mes.sh (mes_sources): Remove. Include
configure-lib.sh
* include/mes/builtins.h: Remove constants.
* include/mes/mes.h: Add prototypes.
* include/mes/constants.h (cell_symbol_test): Rename from cell_test.
* simple.make: New file.
2020-04-19 10:49:48 +02:00
Jan Nieuwenhuizen
db4a202c6b
hurd: Add _write.
...
* include/gnu/syscall.h (SYS__io_write): Add enum field.
(_hurd_dtable, _hurd_dtable_size): Declare variable.
(fd_get, fd_write, __io_write, __syscall_put): Declare.
* lib/gnu/hurd-start.c (_hurd_dtable, _hurd_dtable_size): Define
variable.
* lib/gnu/_write.c: New file.
* lib/gnu/fd-get.c (fd_get): New file.
* lib/gnu/fd-write.c (fd_write): New file.
* lib/gnu/io-write.c: New file.
* lib/gnu/syscall.c (__syscall_put): New function.
* build-aux/cofnigure-lib.sh (libc_mini_SOURCES): Add write sources.
* lib/tests/mes/30-oputs.c (main): Update.
* lib/tests/mes/30-oputs.stdout: New file.
* lib/tests/mes/30-eputs.c: New test.
* lib/tests/mes/30-eputs.stderr: New file.
* build-aux/check-mescc.sh (TESTS): Add it.
2019-12-13 21:52:30 +01:00
Jan Nieuwenhuizen
784838e368
hurd: Initial support.
...
This adds minimal Hurd support by implementing the _exit function.
* AUTHORS: Update.
* .gitignore: Ignore a.out, core, .config.
* include/sys/wait.h (W_EXITCODE): New define.
* lib/gnu/x86-mes-gcc/crt1.c: New file.
* lib/gnu/x86-mes-gcc/mini.c: New file.
* lib/gnu/hurd-start.c: New file.
* lib/gnu/_exit.c: New file.
* include/gnu/syscall.h: New file.
* include/gnu/hurd.h: New file.
* lib/gnu/_exit.c: New file.
* lib/gnu/exec-startup-get-data.c: New file.
* lib/gnu/hurd-start.c: New file.
* lib/gnu/proc-mark-exit.c: New file.
* lib/gnu/syscall.c: New file.
* lib/gnu/task-get-special-port.c: New file.
* lib/gnu/task-terminate.c: New file.
* lib/gnu/vm-statistics.c: New file.
* build-aux/configure-lib.sh (libc_mini_SOURCES): Add Hurd sources.
* build-aux/build.sh.in (CPPFLAGS): Add lib to includes, to find linux
crt1.c.
* build-aux/test-c.sh: Always use at least -l c+mini for GNU.
* lib/tests/scaffold/30-exit-42.exit: New file.
* lib/tests/scaffold/30-exit-42.c: New test.
* build-aux/check-mescc.sh (TESTS): Add it.
* lib/tests/scaffold/30-exit-0.c (main): Move from 00-exit-0.c; Rewrite,
use _exit.
* include/gnu/hurd-types.h: Import from GNU C Library.
* include/mach/mach-init.h: Likewise.
* lib/mach/mach-init.c: Likewise.
* lib/mach/mach_host_self.S: Likewise.
* lib/mach/mach_msg_trap.S: Likewise.
* lib/mach/mach_reply_port.S: Likewise.
* lib/mach/mach_task_self.S: Likewise.
* lib/mach/mach_thread_self.S: Likewise.
* lib/mach/msg.c: Likewise.
2019-12-13 21:52:29 +01:00
Jan Nieuwenhuizen
92ade63120
build: Clean-out .gitignore.
...
.gitignore: Remove obsolete cross build patterns.
2019-12-13 21:52:29 +01:00
Jan Nieuwenhuizen
d55ca711f1
build: Cater for bootstrap build.
...
* build-aux/build.sh.in: Build bin/mes. Update scripts and users.
* build-aux/bootstrap.sh.in: Update.
* build-aux/install.sh.in: Install all built bin/mes-* flavours.
* configure: Drop SEED, support --bootstrap.
* configure.sh: Likewise.
2019-12-13 21:52:18 +01:00
Jan Nieuwenhuizen
2cc6d5a012
build: Use mesar instead of ar.
...
* scripts/mesar.in: Rename from ar.in. Update users.
* build-aux/build.sh.in (LIBS): Update.
* build-aux/check.sh.in (recheck): Likwise.
* build-aux/install.sh.in (DESTDIR): Likwise.
* configure (main): Likwise.
* configure.sh (mes_system): Likwise.
* .gitignore: Update.
2019-09-09 16:04:16 +02:00
Jan Nieuwenhuizen
9ac6528348
build: Resurrect bootstrap.sh.
...
* build-aux/connfigure-lib.sh: Split from build-lib.sh
* build-aux/build-lib.sh: Include it.
* build-aux/bootstrap.sh.in: New file.
* configure.sh: Substitute it.
2019-07-07 12:17:03 +02:00
Jan Nieuwenhuizen
fbe0b2eef8
porting: Add x86 scaffold: exit and write in assembly.
...
* lib/x86-mes-gcc/exit-42.S: New file.
* lib/x86-mes-gcc/hello-mes.S: New file.
* lib/x86-mes/elf32-0exit-42.hex2: New file.
* lib/x86-mes/elf32-0hello-mes.hex2: New file.
* lib/x86-mes/elf32-body-hello-mes.hex2: New file.
* lib/x86-mes/elf32-body-exit-42.hex2: Rewrite.
* lib/x86-mes/elf32-header.hex2: Fix copyright header.
* lib/x86-mes/elf32-0header.hex2: Likewise.
* lib/x86-mes/elf-0footer.hex2: Remove.
* build-aux/build-scaffold.sh: Build them.
* .dir-locals.el (asm-mode): Allow TABs.
* .gitignore: Reserve .S assembly sources, i.e. manual written
assembly. Update build system.
* module/mescc/mescc.scm: Update.
* build-aux/build-lib.sh: Update.
* scripts/ar.in: Update.
2019-06-13 14:19:59 +02:00
Jan Nieuwenhuizen
5dc245e739
build: Simplify.
...
core: Make mes src/ c files separate compilation units.
* include/mes/constants.h: New file.
* include/mes/macros.h: New file.
* include/mes/mes.h: New file.
* src/gc.c: Update.
* src/hash.c: Update.
* src/lib.c: Update.
* src/math.c: Update.
* src/mes.c: Update.
* src/module.c: Update.
* src/posix.c: Update.
* src/reader.c: Update.
* src/string.c: Update.
* src/struct.c: Update.
* src/vector.c: Update.
mes: Update datadir.
* src/mes.c (g_datadir): New global.
(open_boot): Rename from read_boot.
(read_boot): New function.
* mes/module/mes/boot-0.scm: Move from boot-0.scm.in
* configure: Update.
* configure.sh: Update.
mescc: Create libraries from separate files.
* .gitignore: Update.
* build-aux/bootstrap-mes.sh: Remove.
* build-aux/bootstrap.sh.in: Remove.
* build-aux/build-guile.sh: Update.
* build-aux/build-mes.sh: Update.
* build-aux/build-scaffold.sh: New file.
* build-aux/build.sh.in: Update.
* build-aux/cc.sh: Update.
* build-aux/check-tcc.sh: Remove.
* build-aux/config.sh.in: New file.
* build-aux/config.sh: Remove.
* build-aux/install.sh.in: Update.
* build-aux/test-boot.sh: New file.
* build-aux/test-c.sh: New file.
* build-aux/test-driver: New file.
* build-aux/test-suite.sh: New file.
* build-aux/trace.sh: Update.
* build-aux/uninstall.sh.in: Update.
* configure: Update.
* configure.sh: Update.
* lib/linux/x86-mes-mescc/crt1.c: Move from lib/linux/x86-mes.
* lib/linux/x86-mes-mescc/mini.c: Likewise.
* lib/linux/x86_64-mes-mescc/crt1.c: Move from lib/linux/x86_64-mes.
* lib/linux/x86_64-mes-mescc/mini.c: Likewise.
* lib/linux/x86-mes-gcc/syscall.c: Rename from mes.c.
* lib/linux/x86-mes-mescc/syscall.c: Likewise.
* lib/linux/x86_64-mes-gcc/syscall.c: Likewise.
* lib/linux/x86_64-mes-mescc/syscall.c: Likewise.
* lib/mes/mes_open.c: Include config.h.
* lib/tests/stdio/70-printf-hello.c: Likewise.
* lib/tests/stdio/70-printf-simple.c: Likewise.
* scaffold/gc-test.sh: New file.
* simple.sh: Update.
2019-06-08 15:36:22 +02:00
Jan Nieuwenhuizen
6eaba71161
build: Remove mini-mes.
...
* scaffold/mini-mes.c: Remove.
* build-aux/build-mes.sh: Remove commented build instructions.
* .gitignore: Remove pattern.
2019-02-18 07:21:54 +01:00
Jan Nieuwenhuizen
3480813038
mescc: Mes C Library: Populate with function tests from scaffold.
...
* .gitignore: Update.
* build-aux/bootstrap.sh.in: Update.
* build-aux/build-mes.sh: Update.
* build-aux/check-mescc.sh: Update.
* lib/tests/assert/50-assert.c: Move from scaffold/tests/50-assert.c.
* lib/tests/dirent/90-readdir.c: Move from scaffold/tests/99-readdir.c.
* lib/tests/dirent/readdir.dir: Move from scaffold/tests/readdir.dir.
* lib/tests/io/90-stat.c: Move from scaffold/tests/92-stat.c.
* lib/tests/mes/30-oputs.c: Move from scaffold/tests/31-oputs.c.
* lib/tests/mes/50-itoa.c: Move from scaffold/tests/51-itoa.c.
* lib/tests/posix/90-unsetenv.c: Move from scaffold/tests/94-unsetenv.c.
* lib/tests/setjmp/80-setjmp.c: Move from scaffold/tests/80-setjmp.c.
* lib/tests/signal/90-signal.c: Move from scaffold/tests/95-signal.c.
* lib/tests/stdio/70-printf-hello.c: Move from scaffold/tests/70-printf-hello.c.
* lib/tests/stdio/70-printf-simple.c: Move from scaffold/tests/70-printf-simple.c.
* lib/tests/stdio/70-printf.c: Move from scaffold/tests/70-printf.c.
* lib/tests/stdio/80-sscanf.c: Move from scaffold/tests/87-sscanf.c.
* lib/tests/stdio/90-fopen-append.c: Move from scaffold/tests/98-fopen.c.
* lib/tests/stdio/90-fopen.c: Move from scaffold/tests/97-fopen.c.
* lib/tests/stdio/90-fread-fwrite.c: Move from scaffold/tests/93-fread-fwrite.c.
* lib/tests/stdio/90-fseek.c: Move from scaffold/tests/91-fseek.c.
* lib/tests/stdlib/50-getenv.c: Move from lib/tests/stdlib/getenv.c.
* lib/tests/stdlib/50-malloc.c: Move from lib/tests/stdlib/malloc.c.
* lib/tests/stdlib/70-strtoull.c: Move from scaffold/tests/7j-strtoull.c.
* lib/tests/stdlib/80-qsort-dupes.c: Move from scaffold/tests/81-qsort-dupes.c.
* lib/tests/stdlib/80-qsort.c: Move from scaffold/tests/81-qsort.c.
* lib/tests/stdlib/90-strtol.c: Move from scaffold/tests/96-strto.c.
* lib/tests/string/30-strlen.c: Move from scaffold/tests/30-strlen.c.
* lib/tests/string/50-strcmp.c: Move from scaffold/tests/51-strcmp.c.
* lib/tests/string/50-strcpy.c: Move from scaffold/tests/53-strcpy.c.
* lib/tests/string/50-strncmp.c: Move from scaffold/tests/51-strncmp.c.
* lib/tests/string/70-strchr.c: Move from scaffold/tests/70-strchr.c.
* lib/tests/string/80-strncpy.c: Move from scaffold/tests/86-strncpy.c.
* lib/tests/string/80-strrchr.c: Move from scaffold/tests/88-strrchr.c.
* lib/tests/string/90-snprintf.c: Move from scaffold/tests/9a-snprintf.c.
* lib/tests/string/90-strpbrk.c: Move from scaffold/tests/90-strpbrk.c.
* lib/tests/string/90-strspn.c: Move from scaffold/tests/90-strspn.c.
2019-02-24 17:51:53 +01:00
Jan Nieuwenhuizen
a3d87214ea
mescc: Mes C Library: Start test suite.
...
TODO: move strict libc tests from scaffold/test/* here.
* lib/tests/stdlib/getenv.c: New file.
* lib/tests/stdlib/malloc.c: Move from scaffold.
* build-aux/bootstrap.sh.in: Built them.
* build-aux/build-mes.sh: Likewise.
2019-02-24 09:39:00 +01:00
Jan Nieuwenhuizen
99ac7b59c4
core: Remove struct definitions for builtins, drop snarfing.
...
After making a change to the list of builtin functions, run
cat src/*.i
and move the into
src/mes.c:mes_builtins ()
and, or also after changing the list of fixed symbols in src/mes.c:mes_symbols (), do
cat src/*.h > src/builtins.h
* build-aux/build.sh.in: Remove snarfing.
* build-aux/bootstrap.sh.in: Likewise.
* mes/module/mes/display.mes (display):
* mes/module/mes/type-0.mes (cell:type-alist): Remove <cell:function>.
(function?, builtin?): Remove.
* src/builtins.h: New file.
* src/mes.c (TFUNCTION): Remove.
(struct function): Remove.
(apply_builtin): Rewrite from call.
(mes_builtins): Rewrite.
(init_builtin, make_builtin_type, make_builtin, builtin_name,
builtin_arity, builtin, builtin_p, builtin_printer): New function.
2019-01-04 09:55:16 +01:00
Jan Nieuwenhuizen
8f8852ccff
build: Support building with Gash.
...
* build-aux/install.sh: Replace variables with substitution.
* build-aux/bootstrap.sh: New file.
* configure: Substitute it.
* configure.sh: Likewise. Be friendly to Gash.
* .gitignore: Ignore it.
2018-11-24 21:07:31 +01:00
Jan Nieuwenhuizen
6b841a0cab
mescc: Run without shell.
...
* mes/module/mescc.mes: New file.
* module/mescc.scm: Include it.
* scripts/mescc.scm.in: New file.
* scripts/mescc.in: Use it; Make pure shell.
* configure: Substitute it.
* configure.sh: Substitute it.
* build-aux/install.sh.in: Install it.
2018-11-25 13:21:03 +01:00
Jan Nieuwenhuizen
6b5ac57602
build: Simplify: cater for one compiler at a time.
...
* build-aux/build-cc.sh: Remove.
* build-aux/build-cc32.sh: Remove.
* build-aux/build-cc64.sh: Remove.
* build-aux/build-x86_64-mes.sh: Remove.
* build-aux/cc-mes.sh: Remove.
* build-aux/cc-x86_64-mes.sh: Remove.
* build-aux/cc32-mes.sh: Remove.
* build-aux/cc64-mes.sh: Remove.
* build-aux/test64.sh: Remove.
* build-aux/bootstrap-mes.sh: New file.
* build-aux/config.make.in: New file.
* build-aux/config.status.in: New file.
* build-aux/test-cc.sh: New file.
* .gitignore: Update.
* build-aux/GNUmakefile.in: Update.
* build-aux/build-guile.sh: Update.
* build-aux/build-mes.sh: Update.
* build-aux/build.sh.in: Update.
* build-aux/cc.sh: Update.
* build-aux/check-boot.sh: Update.
* build-aux/check-mes.sh: Update.
* build-aux/check-mescc.sh: Update.
* build-aux/check-tcc.sh: Update.
* build-aux/check.sh.in: Update.
* build-aux/config.sh: Update.
* build-aux/export.make: Update.
* build-aux/install.sh.in: Update.
* build-aux/pre-inst-env.in: Update.
* build-aux/test.sh: Update.
* build-aux/uninstall.sh.in: Update.
* configure: Update.
* configure.sh: Update.
* module/mescc/i386/as.scm: Update.
* module/mescc/preprocess.scm: Update.
* module/mescc/x86_64/as.scm: Update.
* scripts/mescc.in: Update.
* tests/psyntax.test: Update.
2018-11-06 20:29:35 +01:00
Jan Nieuwenhuizen
5484e0ffdf
build: Resurrect make seed.
...
* build-aux/GNUmakefile.in (seed): Resurrect.
* build-aux/build-x86_64-mes.sh: Build from seed.
2018-09-30 12:15:11 +02:00
Jan Nieuwenhuizen
2fac924c33
mescc: x86_64 support: Add tests.
2018-08-15 17:19:50 +02:00
Jan Nieuwenhuizen
3e1a197ed1
mescc: Initial x86_64 support.
...
make all-go && MES=guile ./pre-inst-env scripts/mescc -m64 -c scaffold/main.c
2018-08-14 20:32:56 +02:00
Jan Nieuwenhuizen
50dff52c99
mescc: Mes C Library: Add x86_64 libc+tcc support.
...
* include/linux/x86/syscall.h: Move SYS_ defines from tcc.c.
* include/linux/x86_64/syscall.h: Add SYS_ defines for tcc.
* lib/x86-mes-gcc/setjmp.c: Rename from lib/libc+tcc-gcc.c
* lib/x86-mes/setjmp.c: Rename from lib/libc+tcc-mes.c
* lib/linux/tcc.c: Update.
2018-08-11 18:39:48 +02:00
Jan Nieuwenhuizen
46e0641e9c
mescc: Mes C Library: Add x86_64 libc-mini support.
...
* lib/linux/x86-mes-gcc/mini.c: Rename from lib/linux/mini-gcc.c.
* lib/linux/x86-mes/mini.c: Rename from lib/linux/mini-mes.c.
* lib/linux/x86_64-mes-gcc/crt1.c: Rename from lib/linux/x86_64/crt1.c.
* lib/linux/x86_64-mes-gcc/mini.c: New file.
* build-aux/build-cc.sh: Build libc-mini, scaffold/main, scaffold/hello.
* build-aux/cc64.sh: New file.
2018-08-10 17:05:01 +02:00
Jan Nieuwenhuizen
521f97dfb3
mescc: Initial x86_64-mes scaffold.
...
* build-aux/GNUmakefile.in (x86_64-mes): New target.
* .gitignore: Ignore x86 and x86_64 out files.
* build-aux/build-mes.sh: Resurrect three initial exit42 scaffold tests.
* build-aux/build-x86_64-mes.sh: New file. Add initial exit42
scaffold test.
* lib/x86-mes/elf32-0header.hex2: Fix comment.
* lib/x86-mes/elf32-header.hex2: Likewise.
* lib/x86_64-mes/elf-0footer.hex2: New file.
* lib/x86_64-mes/elf64-0header.hex2: New file.
* lib/x86_64-mes/elf64-body-exit-42.hex2: New file.
* lib/x86_64-mes/exit-42.c: New file.
2018-08-10 11:15:43 +02:00
Jan Nieuwenhuizen
1a970bc78d
build: web: New target.
...
* README: Add bug-mes@gnu.org
* NEWS: Likewise.
* doc/mes.texi: Likewise.
* build-aux/gendocs.sh: New file, from gnulib.
* doc/gendocs_template: New file, from gnulib.
* build-aux/GNUmakefile.in (web): New target.
2018-07-28 11:37:47 +02:00
Jan Nieuwenhuizen
f18e1fea36
build: Make build more autotools-like.
...
* build-aux/build.sh.in: Move from ./build.sh
* build-aux/check.sh.in: Likewise.
* build-aux/GNUmakefile.in: Likewise.
* build-aux/install.sh.in: Likewise.
* build-aux/uninstall.sh.in: Likewise.
* configure: Substitute them.
* configure.sh: Likewise.
* build-aux/build-cc.sh: Update: use ${srcdest} instead of ${top_builddest}.
* build-aux/build-cc32.sh: Likewise.
* build-aux/build-guile.sh: Likewise.
* build-aux/build-mes.sh: Likewise.
* build-aux/cc-mes.sh: Likewise.
* build-aux/cc.sh: Likewise.
* build-aux/cc32-mes.sh: Likewise.
* build-aux/check-boot.sh: Likewise.
* build-aux/check-mes.sh: Likewise.
* build-aux/check-mescc.sh: Likewise.
* build-aux/config.sh: Likewise.
* build-aux/export.make: Likewise.
* build-aux/mes-snarf.scm: Likewise.
* build-aux/pre-inst-env.in: Likewise.
* build-aux/test.sh: Likewise.
* build-aux/trace.sh: Likewise.
* module/mescc/mescc.scm: Likewise.
* scripts/mescc.in: Likewise.
* src/mes.c: Likewise.
* .gitignore: Likewise.
2018-07-25 08:14:13 +02:00
Jan Nieuwenhuizen
06e0dfe9ad
build: Generate gcc-mesboot-graph from .dot.
...
* doc/images/gcc-mesboot-graph.dot: New file.
* doc/images/gcc-mesboot-graph.png: Remove.
* GNUmakefile (${top_builddest}doc/images/gcc-mesboot-graph.png): New target.
* configure (det): Add check.
* build-aux/export.make: Export it.
* doc/mes.texi (The Mes Bootstrap Process): Describe new recipe.
* guix/git/mes.scm (mes): Add graphvis dependency.
2018-07-22 22:27:24 +02:00
Jan Nieuwenhuizen
9e1c618b00
build: Install ChangeLog.
...
* ChangeLog: New file.
* install.sh: Regenerate it, install it.
2018-07-21 23:56:08 +02:00
Jan Nieuwenhuizen
5d3fa50384
build: Prepare for autoconfiscation.
...
Make build system more in alignment with how autotools work. This
will make transition easier.
* mes/module/mes/boot-0.scm.in: Update from module/mes/boot-0.scm.
* scripts/mescc.in: Update from scripts/mescc.
* build-aux/pre-inst-env.in: New file.
* build-aux/cc-mes.sh: Use pre-inst-env.
* configure: Substitute new .in files.
* install.sh: Do not substitute mescc, boot-0.scm.
2018-07-21 18:28:47 +02:00
Jan Nieuwenhuizen
4f2c685753
build: Refactor mes tests.
...
* build-aux/check-mes.sh: New file.
* check.sh: Invoke it for Guile and Mes.
* .gitignore: Ignore new guile logs.
* mes/module/mes/boot-0.scm: Ignore some standard Guile options.
* module/mes/test.scm: Make a module.
* tests/base.test: Use it. Make a module, support invoking with Guile
or Mes alike.
* tests/boot.test: Likewise.
* tests/catch.test: Likewise.
* tests/closure.test: Likewise.
* tests/cwv.test: Likewise.
* tests/display.test: Likewise.
* tests/fluids.test: Likewise.
* tests/getopt-long.test: Likewise.
* tests/guile.test: Likewise.
* tests/let-syntax.test: Likewise.
* tests/let.test: Likewise.
* tests/match.test: Likewise.
* tests/math.test: Likewise.
* tests/module.test: Likewise.
* tests/optargs.test: Likewise.
* tests/peg.test: Likewise.
* tests/pmatch.test: Likewise.
* tests/psyntax.test: Likewise.
* tests/quasiquote.test: Likewise.
* tests/read.test: Likewise.
* tests/scm.test: Likewise.
* tests/srfi-13.test: Likewise.
* tests/srfi-14.test: Likewise.
* tests/srfi-16.test: Likewise.
* tests/srfi-1.test: Likewise.
* tests/srfi-43.test: Likewise.
* tests/srfi-9.test: Likewise.
* tests/syntax.test: Likewise.
* tests/vector.test: Likewise.
* tests/base.test-guile: Remove.
* tests/boot.test-guile: Remove.
* tests/catch.test-guile: Remove.
* tests/closure.test-guile: Remove.
* tests/cwv.test-guile: Remove.
* tests/display.test-guile: Remove.
* tests/fluids.test-guile: Remove.
* tests/getopt-long.test-guile: Remove.
* tests/guile.test-guile: Remove.
* tests/let-syntax.test-guile: Remove.
* tests/let.test-guile: Remove.
* tests/match.test-guile: Remove.
* tests/math.test-guile: Remove.
* tests/module.test-guile: Remove.
* tests/optargs.test-guile: Remove.
* tests/peg.test-guile: Remove.
* tests/pmatch.test-guile: Remove.
* tests/psyntax.test-guile: Remove.
* tests/quasiquote.test-guile: Remove.
* tests/read.test-guile: Remove.
* tests/scm.test-guile: Remove.
* tests/srfi-13.test-guile: Remove.
* tests/srfi-14.test-guile: Remove.
* tests/srfi-16.test-guile: Remove.
* tests/srfi-1.test-guile: Remove.
* tests/srfi-43.test-guile: Remove.
* tests/srfi-9.test-guile: Remove.
* tests/syntax.test-guile: Remove.
* tests/vector.test-guile: Remove.
2018-07-21 13:48:50 +02:00
Jan Nieuwenhuizen
7f6676a4c2
doc: Add html, pdf.
...
* GNUmakefile (html, pdf): New target.
* .gitignore: Ignore html, pdf targets.
2018-07-12 22:30:00 +02:00
Jan Nieuwenhuizen
72e147f53f
build: Build and install manual pages.
...
* build-aux/export.make: New file.
* GNUmakefile (man): New target.
(doc): Depend on man.
include build-aux/export.make, remove exports.
* guix.scm (mes): Add dependency on help2man.
* configure: Check for help2man.
* install.sh: Install manual pages if built.
2018-07-12 22:29:59 +02:00
Jan Nieuwenhuizen
a4770c1eed
doc: Initial version.
...
* doc/mes.texi: New file.
* doc/fdl-1.3.texi: New file.
* AUTHORS: Mention it.
* GNUmakefile (doc, info, install-info): New targets.
* install.sh: Install info if available.
* guix: (mes): Add texinfo to native-inputs.
* configure: Check for makeinfo.
2018-07-12 22:29:59 +02:00
Jan Nieuwenhuizen
350d94aa77
build: Support tcc, create tinycc-seed with tcc.
...
* configure: check for tcc.
* build-aux/cc32-mes.sh: Rename from cc-mes-gcc.sh. Support
tcc. Update users.
* build-aux/build-cc32-mes.sh: Rename from build-mes-gcc.sh. Update users.
* GNUmakefile (mes-tcc): New target.
* .gitignore: Ignore mes-tcc arch output.
* lib/crt1.c (_start): Add "rm" constraint so satisfy tcc.
* lib/linux-gcc.c (_sys_call, _sys_call1 _sys_call2 _sys_call3): Likewise.
2018-06-24 09:28:23 +02:00
Jan Nieuwenhuizen
de964f3e1f
mescc: Support gcc-2.6.3.
...
* TODO
2018-06-02 11:41:06 +02:00
Jan Nieuwenhuizen
272b522962
build: Use arch-dir.
...
* lib/x86-mes: Move from stage0.
* build-aux/build-cc.sh: Create libraries in lib/gcc. Update users.
* build-aux/build-mes.sh: Create libraries in lib/x86-mes. Update users.
* build-aux/build-mes-gcc.sh: Rename from build-mlibc.sh. Create
libraries in lib/x86-mes-gcc. Update callers.
* build-aux/cc-mes-gcc.sh: Rename from cc-mlibc.sh. Update callers.
2018-05-29 20:07:46 +02:00
Jan Nieuwenhuizen
a10c48735d
mescc: Posixify interface.
...
* module/mescc/compile.mes: Move from language/c99/compiler.mes.
* module/mescc: New module..
* module/mescc/M1.scm: Move from mes/M1.mes.
* module/mescc/as.scm: Likewise.
* module/mescc/bytevectors.scm: Likewise.
* module/mescc/mescc.scm: New file.
* scripts/mescc: Update to new layout and posixy interface.
* GNUmakefile: Likewise.
* build-aux/build-cc.sh: Likewise.
* build-aux/build-guile.sh: Likewise.
* build-aux/build-mes.sh: Likewise.
* build-aux/build-mlibc.sh: Likewise.
* build-aux/cc-mes.sh: Likewise.
* build-aux/cc-mlibc.sh: Likewise.
* build-aux/cc.sh: Likewise.
* build-aux/check-mescc.sh: Likewise.
* build-aux/test.sh: Likewise.
* build.sh: Likewise.
* .gitignore: Update for posixy extensions.
2018-05-25 08:05:02 +02:00
Jan Nieuwenhuizen
ba17eeeefe
build: Fixes for Debian and /bin/sh == dash.
...
* build.sh: Use separate export stanzas. Use command -v (WAS: type
-p). Fixes sh, /bin/sh == dash.
* build-aux/build-cc.sh: Likewise.
* build-aux/build-guile.sh: Likewise.
* build-aux/build-mes.sh: Likewise.
* build-aux/build-mlibc.sh: Likewise.
* build-aux/cc-mes.sh: Likewise.
* build-aux/check-mescc.sh: Likewise.
* check.sh: Likewise.
* install.sh: Likewise.
* scripts/mescc: Likewise.
2018-05-03 20:32:06 +02:00
Jan Nieuwenhuizen
98417537a2
test: enable all tests, use expect count, add tinycc tests.
...
* build-aux/check-mescc.sh (tests): Add tinycc tests.
* build-aux/diff.scm: Naive diff for tinycc tests.
* build-aux/test.sh: Run diff when .expect found.
2018-05-01 16:50:29 +02:00
Jan Nieuwenhuizen
a937d18c38
build: Simplify, drop make.scm experiment.
...
* build.sh: Rewrite.
* build-aux/build-cc.sh: New file.
* build-aux/build-mes.sh: New file.
* build-aux/build-mlibc.sh: New file.
* build-aux/cc.sh: New file.
* build-aux/cc-mes.sh: New file.
* build-aux/cc-mlibc.sh: New file.
* install.sh: Update.
* make.scm: Remove.
* guile/guix/make.scm: Remove.
* guile/guix/records.scm: Remove.
* guile/guix/shell-utilsg.scm: Remove.
2018-04-29 18:38:57 +02:00
Jan Nieuwenhuizen
e8884d83e1
mlibc: GNU Gcc support: setjmp, longjmp.
...
* stage0/x86.M1 (jmp____*%ebx): New macro.
(mov____0x8(%ebp),%ebp): New macro.
(mov____0x8(%ebp),%esp): New macro.
* include/setjmp.h (jmp_buf): Redefine as struct.
* lib/libc-mes+tcc.c (longjmp, setjmp): Implement.
* scaffold/tests/80-setjmp.c: Test it.
* make.scm ("80-setjmp"): Build it.
* .gitignore: Ignore *.tcc-guile.
2017-11-26 13:10:46 +01:00
Jan Nieuwenhuizen
7ab279bf7b
bootstrap: Add bootstrap build scripts.
...
* build.sh: New file.
* check-mescc.sh: New file.
* check.sh: New file.
* install.sh: New File.
2017-11-24 19:02:58 +01:00
Jan Nieuwenhuizen
89a9decfff
build: Ignore some files.
...
.gitignore: Update for make.scm.
2017-07-26 11:36:07 +02:00
Jan Nieuwenhuizen
83a43b81b3
mescc: Produce M1 output instead of hex2.
...
Use: ./make.scm [TARGET]
./make.scm check
* stage0/x86.M1: New file.
* mlibc/mini-libc-mes.c (exit, write): Use M1 instead of .byte.
* mlibc/libc-mes.c (_start, exit, read, write, open, access, brk,
fsync, printf): Use M1 instead of .byte.
* module/mes/as-i386.mes: Use M1.
* module/mes/make.scm: New file.
* make.scm: New file.
* guile/guix/records.scm: New File.
* guile/guix/shell-utils.scm: New file.
* module/mes/M1.mes: Rename from hex2.mes.
* module/mes/M1.scm: Rename from hex2.scm.
* scripts/mescc.mes: Update callers.
* guile/mescc.scm: Update callers.
2017-07-02 16:25:14 +02:00
Jan Nieuwenhuizen
9f56b8b102
core: Always include reader.c, drop binary read-0-32.mo dependency.
...
* module/language/c99/compiler.mes (c99-input->full-ast): Remove
obsolete __NYACC__ and MES_FULL defines.
* src/mes.c [!MES_FULL]: Include reader-mes.h.
(mes_builtins) [!MES_FULL]: Include reader.mes.i, reader.me.environment.i.
[!MES_FULL]: Include reader.c.
(main) [!MES_FULL]: By default call load_env, only call bload_env
when --load is supplied. WAS: Always bload read-0-32.mo.
* src/reader.c (__end_of__mes_): Remove.
(dump): Remove option of dumping tiny test program.
* make/mescc-mes.make ($(OUT)/$(TARGET), mescc.mes-ccompile,
mescc.mes.c-compile-E): Depend on $(OUT)/mes, scripts/mes.
* src/src.make (mes.guile): Remove module/mes/read-32-0 dependency.
Do not build $(OUT)/mes.mes.
* module/module.make (module/mes/read-0.mo, module/mes/read-0-32.mo,
module/mes/tiny-0-32.mo): Remove targets.
(CLEAN): Do not add them. Neither install $(OUT)/mes.mes.
* .gitignore: Remove exceptions for them.
* make/install.make (install): Do not install them.
* HACKING: Update info about creating module/mes/read-32-0.mo.
* scaffold/mini-mes.c: Remove.
* scaffold/tiny-mes.c: Remove.
* scaffold/cons-mes.c: Remove.
* scaffold/scaffold.make (tiny-mes.libc, tiny-mes.guile, tiny-mes.mes,
mini-mes.libc, mini-mes.guile, mini-mes.mes): Reemove targets.
2017-05-28 16:03:45 +02:00
Jan Nieuwenhuizen
38d30a3e42
build: Refactor.
...
* GNUmakefile (OUT,QUIET,SUBDIRS): New variables.
include make/common.make
* .gitignore: Remove toplevel targets.
* build-aux/compile-all.scm: Import from GNU Guix.
* configure (gulp-pipe): Check exit status. Actually test for CC,
CC32.
* make/bin.make: New file.
* make/check.make: New file.
* make/clean.make: New file.
* make/common.make: New file.
* make/compile.make: New file.
* make/guile.make: New file.
* make/mescc-guile.make: New file.
* make/mescc-mes.make: New file.
* make/reset.make: New file.
* lib/mlibc.c: Rename from top.
* lib/start.c: Rename from top.
* module/module.make: New file.
* scaffold/scaffold.make: New file.
* scripts/scripts.make: New file.
* src/mes.c: Rename from top.
* src/src.make: New file.
* src/mes.c: Rename from top.
* src/gc..c: Rename from top.
* src/lib.c: Rename from top.
* src/posix.c: Rename from top.
* src/reader.c: Rename from top.
* src/vector.c: Rename from top.
* tests/tests.make: New file.
2017-04-12 21:27:59 +02:00
Jan Nieuwenhuizen
8f09f1a5cf
bootstrap: Regenerate.
...
* mes-mini-mes: First self-hosting binary.
2017-04-02 12:41:33 +02:00