mes/build-aux/bootstrap.sh.in
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

71 lines
6.4 KiB
Bash

#! @SHELL@
set -e
if [ "$V" = 1 -o "$V" = 2 ]; then
set -x
fi
MES_ARENA=${MES_ARENA-100000000}
MES_MAX_ARENA=${MES_MAX_ARENA-100000000}
MES_STACK=${MES_STACK-500000}
hex2 --LittleEndian --Architecture 1 --BaseAddress 0x1000000 -f lib/x86-mes/elf32-0header.hex2 -f lib/x86-mes/elf32-body-exit-42.hex2 -f lib/x86-mes/elf-0footer.hex2 --exec_enable -o lib/x86-mes/0exit-42
hex2 --LittleEndian --Architecture 1 --BaseAddress 0x1000000 -f lib/x86-mes/elf32-header.hex2 -f lib/x86-mes/elf32-body-exit-42.hex2 -f lib/x86-mes/elf32-footer-single-main.hex2 --exec_enable -o lib/x86-mes/exit-42
M1 --LittleEndian --Architecture 1 -f lib/x86-mes/x86.M1 -f @MES_SEED@/x86-mes/crt1.S -o lib/x86-mes/crt1.o
M1 --LittleEndian --Architecture 1 -f lib/x86-mes/x86.M1 -f @MES_SEED@/x86-mes/libc.S -o lib/x86-mes/libc.o
M1 --LittleEndian --Architecture 1 -f lib/x86-mes/x86.M1 -f @MES_SEED@/x86-mes/mes.S -o src/mes.o
blood-elf -f lib/x86-mes/x86.M1 -f @MES_SEED@/x86-mes/mes.S -f @MES_SEED@/x86-mes/libc.S -o src/mes.S.blood-elf
M1 --LittleEndian --Architecture 1 -f src/mes.S.blood-elf -o src/mes.o.blood-elf
hex2 --LittleEndian --Architecture 1 --BaseAddress 0x1000000 -f lib/x86-mes/elf32-header.hex2 -f lib/x86-mes/crt1.o -f lib/x86-mes/libc.o -f src/mes.o -f src/mes.o.blood-elf --exec_enable -o src/mes
M1 --LittleEndian --Architecture 1 -f lib/x86-mes/x86.M1 -f @MES_SEED@/x86-mes/libc+tcc.S -o lib/x86-mes/libc+tcc.o
M1 --LittleEndian --Architecture 1 -f lib/x86-mes/x86.M1 -f @MES_SEED@/x86-mes/libc+gnu.S -o lib/x86-mes/libc+gnu.o
@GUILE@ -e main -L module scripts/mescc.scm -c -D 'VERSION="@VERSION@"' -D 'MODULEDIR="@moduledir@"' -D 'PREFIX="@prefix@"' -I . -I lib -I include -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o lib/linux/x86-mes/crt1.o lib/linux/x86-mes/crt1.c
@GUILE@ -e main -L module scripts/mescc.scm -c -D 'VERSION="@VERSION@"' -D 'MODULEDIR="@moduledir@"' -D 'PREFIX="@prefix@"' -I . -I lib -I include -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o lib/libc-mini.x86-mes-o lib/libc-mini.c
mv lib/libc-mini.x86-mes-S lib/x86-mes/libc-mini.S
mv lib/libc-mini.x86-mes-o lib/x86-mes/libc-mini.o
@GUILE@ -e main -L module scripts/mescc.scm -c -D 'VERSION="@VERSION@"' -D 'MODULEDIR="@moduledir@"' -D 'PREFIX="@prefix@"' -I . -I lib -I include -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o lib/libc.x86-mes-o lib/libc.c
mv lib/libc.x86-mes-S lib/x86-mes/libc.S
mv lib/libc.x86-mes-o lib/x86-mes/libc.o
@GUILE@ -e main -L module scripts/mescc.scm -c -D 'VERSION="@VERSION@"' -D 'MODULEDIR="@moduledir@"' -D 'PREFIX="@prefix@"' -I . -I lib -I include -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o lib/libc+tcc.x86-mes-o lib/libc+tcc.c
mv lib/libc+tcc.x86-mes-S lib/x86-mes/libc+tcc.S
mv lib/libc+tcc.x86-mes-o lib/x86-mes/libc+tcc.o
@GUILE@ -e main -L module scripts/mescc.scm -c -D 'VERSION="@VERSION@"' -D 'MODULEDIR="@moduledir@"' -D 'PREFIX="@prefix@"' -I . -I lib -I include -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o lib/libc+gnu.x86-mes-o lib/libc+gnu.c
mv lib/libc+gnu.x86-mes-S lib/x86-mes/libc+gnu.S
mv lib/libc+gnu.x86-mes-o lib/x86-mes/libc+gnu.o
@GUILE@ -e main -L module scripts/mescc.scm -c -D 'VERSION="@VERSION@"' -D 'MODULEDIR="@moduledir@"' -D 'PREFIX="@prefix@"' -I . -I lib -I include -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o scaffold/main.x86-mes-o scaffold/main.c
@GUILE@ -e main -L module scripts/mescc.scm -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o scaffold/x86-mes-main scaffold/main.x86-mes-o
@GUILE@ -e main -L module scripts/mescc.scm -c -D 'VERSION="@VERSION@"' -D 'MODULEDIR="@moduledir@"' -D 'PREFIX="@prefix@"' -I . -I lib -I include -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o scaffold/hello.x86-mes-o scaffold/hello.c
@GUILE@ -e main -L module scripts/mescc.scm -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o scaffold/x86-mes-hello scaffold/hello.x86-mes-o -l c-mini
@GUILE@ -e main -L module scripts/mescc.scm -c -D 'VERSION="@VERSION@"' -D 'MODULEDIR="@moduledir@"' -D 'PREFIX="@prefix@"' -I . -I lib -I include -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o scaffold/argv.x86-mes-o scaffold/argv.c
@GUILE@ -e main -L module scripts/mescc.scm -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o scaffold/x86-mes-argv scaffold/argv.x86-mes-o -l c-mini
@GUILE@ -e main -L module scripts/mescc.scm -c -D 'VERSION="@VERSION@"' -D 'MODULEDIR="@moduledir@"' -D 'PREFIX="@prefix@"' -I . -I lib -I include -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o lib/tests/stdlib/50-malloc.x86-mes-o lib/tests/stdlib/50-malloc.c
@GUILE@ -e main -L module scripts/mescc.scm -c -D 'VERSION="@VERSION@"' -D 'MODULEDIR="@moduledir@"' -D 'PREFIX="@prefix@"' -I . -I lib -I include -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o lib/tests/posix/50-getenv.x86-mes-o lib/tests/posix/50-getenv.c
@GUILE@ -e main -L module scripts/mescc.scm -c -D 'VERSION="@VERSION@"' -D 'MODULEDIR="@moduledir@"' -D 'PREFIX="@prefix@"' -I . -I lib -I include -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o scaffold/micro-mes.x86-mes-o scaffold/micro-mes.c
@GUILE@ -e main -L module scripts/mescc.scm -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o scaffold/x86-mes-micro-mes scaffold/micro-mes.x86-mes-o -l c
@GUILE@ -e main -L module scripts/mescc.scm -c -D 'VERSION="@VERSION@"' -D 'MODULEDIR="@moduledir@"' -D 'PREFIX="@prefix@"' -I . -I lib -I include -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o scaffold/tiny-mes.x86-mes-o scaffold/tiny-mes.c
@GUILE@ -e main -L module scripts/mescc.scm -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o scaffold/x86-mes-tiny-mes scaffold/tiny-mes.x86-mes-o -l c
@GUILE@ -e main -L module scripts/mescc.scm -c -D 'VERSION="@VERSION@"' -D 'MODULEDIR="@moduledir@"' -D 'PREFIX="@prefix@"' -I . -I lib -I include -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o src/mes.x86-mes-o src/mes.c
cp src/mes.x86-mes-S src/mes.S
@GUILE@ -e main -L module scripts/mescc.scm -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o src/x86-mes-mes src/mes.x86-mes-o -l c
cp src/x86-mes-mes src/mes