mescc: Refactor libc.
authorJan Nieuwenhuizen <janneke@gnu.org>
Sun, 2 Apr 2017 10:29:09 +0000 (12:29 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Sun, 2 Apr 2017 10:29:09 +0000 (12:29 +0200)
commit4e12e14b852b4d7cf74c7504a0fdecfb6daf8336
treeb0a9249bb0bbce3b98dd06b486e3191c1895582a
parent124352e087a0bc677b8f219e7d8d6452973d60b4
mescc: Refactor libc.

* GNUmakefile (mini-mes): Add include.
* mlibc.c: New file: libc bits for GNUC -nostdlib.
* mstart.c: New file: _start for GNUC -nostdlib.
* scaffold/cons-mes.c: Remove GNUC libc bits.
* scaffold/m.c: Likewise.
* scaffold/mini-mes.c: Likewise.
* scaffold/t.c: Likewise.
* scaffold/tiny-mes.c: Litkewise.
* module/language/c99/compiler.mes (libc, i386:libc): Remove.
* module/language/c99/compiler.scm
* module/mes/libc-i386.mes: Remove assembly bits.
  (_start): New function.
* module/mes/libc-i386.scm: Export it, remove assembly exports.
* module/mes/as-i386.mes: New file: assembly bits from libc-i386.mes.
* module/mes/as-i386.scm: New file: export them.
* module/mes/libc.mes (libc,_start): New functions from compiler.mes.
* module/mes/libc.scm: Export them.
19 files changed:
GNUmakefile
doc/examples/main.c
mlibc.c [new file with mode: 0644]
module/language/c/compiler.mes
module/language/c99/compiler.mes
module/language/c99/compiler.scm
module/mes/as-i386.mes [new file with mode: 0644]
module/mes/as-i386.scm [new file with mode: 0644]
module/mes/libc-i386.mes
module/mes/libc-i386.scm
module/mes/libc.mes [new file with mode: 0644]
module/mes/libc.scm [new file with mode: 0644]
mstart.c [new file with mode: 0644]
scaffold/cons-mes.c
scaffold/m.c
scaffold/micro-mes.c
scaffold/mini-mes.c
scaffold/t.c
scaffold/tiny-mes.c