commit: 70fdbebd9c3c78c7412dd22a728b36f7e6cfd815 parent 281f6e44d9beb8919405d2122c69b6385c685b0a Author: Gábor Stefanik <netrolller.3d@gmail.com> Date: Mon, 18 Dec 2023 08:00:31 +0100 Upgrade mes to 0.26 This can successfully build a working tcc-mes, but then fails creating unified-libc.c for subsequent tcc bootstrapping.Diffstat:
M | seed/seed.kaem | 2 | +- |
M | steps/manifest | 2 | +- |
D | steps/mes-0.25/files/config.h | 7 | ------- |
D | steps/mes-0.25/pass1.kaem | 376 | ------------------------------------------------------------------------------- |
D | steps/mes-0.25/sources | 2 | -- |
A | steps/mes-0.26/files/config.h | 7 | +++++++ |
R | steps/mes-0.25/mes-0.25.amd64.checksums -> steps/mes-0.26/mes-0.26.amd64.checksums | 0 | |
R | steps/mes-0.25/mes-0.25.riscv64.checksums -> steps/mes-0.26/mes-0.26.riscv64.checksums | 0 | |
R | steps/mes-0.25/mes-0.25.x86.checksums -> steps/mes-0.26/mes-0.26.x86.checksums | 0 | |
A | steps/mes-0.26/pass1.kaem | 400 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
A | steps/mes-0.26/sources | 2 | ++ |
M | steps/tcc-0.9.26/pass1.kaem | 2 | +- |
M | steps/tcc-0.9.27/pass1.kaem | 2 | +- |
13 files changed, 413 insertions(+), 389 deletions(-)diff --git a/seed/seed.kaem b/seed/seed.kaem
@@ -60,7 +60,7 @@ M2LIBC_PATH=/M2libc # mes envars NYACC_PKG=nyacc-1.00.2 -MES_PKG=mes-0.25 +MES_PKG=mes-0.26 MES_PREFIX=${SRCDIR}/${MES_PKG}/build/${MES_PKG} GUILE_LOAD_PATH=${MES_PREFIX}/mes/module:${MES_PREFIX}/module:${SRCDIR}/${MES_PKG}/build/${NYACC_PKG}/modulediff --git a/steps/manifest b/steps/manifest
@@ -33,7 +33,7 @@ build: checksum-transcriber-1.0 build: simple-patch-1.0 -build: mes-0.25 +build: mes-0.26 build: tcc-0.9.26 build: tcc-0.9.27 define: BUILD_FIWIX = ( KERNEL_BOOTSTRAP == True || BUILD_KERNELS == True )diff --git a/steps/mes-0.25/files/config.h b/steps/mes-0.25/files/config.h
@@ -1,7 +0,0 @@ -// SPDX-FileCopyrightText: 2020 fosslinux <fosslinux@aussies.space> -// SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu> -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#undef SYSTEM_LIBC -#define MES_VERSION "0.25"diff --git a/steps/mes-0.25/pass1.kaem b/steps/mes-0.25/pass1.kaem
@@ -1,376 +0,0 @@ -#!/bin/sh - -# SPDX-FileCopyrightText: 2020-2023 Andrius Štikonas <andrius@stikonas.eu> -# SPDX-FileCopyrightText: 2020-2022 fosslinux <fosslinux@aussies.space> -# -# SPDX-License-Identifier: GPL-3.0-or-later - -set -ex - -# Variables -MES_ARENA=20000000 -MES_MAX_ARENA=20000000 -MES_STACK=6000000 -MES=${BINDIR}/mes-m2 -LIBDIR=${MES_PREFIX}/lib - -if match ${ARCH} x86; then - MES_ARCH=x86 - ARCH_BITS=32 -fi -if match ${ARCH} amd64; then - MES_ARCH=x86_64 - ARCH_BITS=64 -fi -if match ${ARCH} riscv64; then - MES_ARCH=riscv64 - ARCH_BITS=64 -fi - -# Check tarball checksums -checksum-transcriber sources -sha256sum -c sources.SHA256SUM - -# Unpack -mkdir build -cd build -ungz --file ${DISTFILES}/${NYACC_PKG}.tar.gz --output ${NYACC_PKG}.tar -ungz --file ${DISTFILES}/${MES_PKG}.tar.gz --output ${MES_PKG}.tar -untar --file ${NYACC_PKG}.tar -untar --non-strict --file ${MES_PKG}.tar # ignore symlinks -mes_run=${MES_PREFIX}/kaem.run -replace --file ${mes_run} --output ${mes_run} --match-on 0x1000000 --replace-with 0x8048000 - -rm ${NYACC_PKG}.tar ${MES_PKG}.tar - -cp ../files/config.h ${MES_PREFIX}/include/mes - -cd ${MES_PREFIX} -mkdir include/arch -cp include/linux/${MES_ARCH}/syscall.h include/arch/syscall.h -cp include/linux/${MES_ARCH}/kernel-stat.h include/arch/kernel-stat.h - -# Remove pregenerated files -rm mes/module/mes/psyntax.pp mes/module/mes/psyntax.pp.header - -# These files are symlinked in the repo -cp mes/module/srfi/srfi-9-struct.mes mes/module/srfi/srfi-9.mes -cp mes/module/srfi/srfi-9/gnu-struct.mes mes/module/srfi/srfi-9/gnu.mes - -# Build mes-m2 -kaem --verbose --strict --file kaem.${MES_ARCH} -cp bin/mes-m2 ${BINDIR}/mes-m2 -chmod 755 ${BINDIR}/mes-m2 - -# Create mescc.scm -mescc_in=scripts/mescc.scm.in -replace --file ${mescc_in} --output ${mescc_in} --match-on @prefix@ --replace-with ${PREFIX} -replace --file ${mescc_in} --output ${mescc_in} --match-on @VERSION@ --replace-with ${MES_VERSION} -replace --file ${mescc_in} --output ${mescc_in} --match-on @mes_cpu@ --replace-with ${MES_ARCH} -replace --file ${mescc_in} --output ${mescc_in} --match-on @mes_kernel@ --replace-with linux - -mescc_scm=${BINDIR}/mescc.scm -cp ${mescc_in} ${mescc_scm} -chmod 755 ${mescc_scm} - - -# Recompile Mes and Mes C library using mes-m2 bootstrapped Mes - -alias mescc="${MES} -e main ${BINDIR}/mescc.scm -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -c" - -# Start with crt1.o -mescc lib/linux/${MES_ARCH}-mes-mescc/crt1.c -o lib/${MES_ARCH}-mes/crt1.o - -# Now for libc-mini.a -mescc lib/mes/__init_io.c -mescc lib/mes/eputs.c -mescc lib/mes/oputs.c -mescc lib/mes/globals.c -mescc lib/stdlib/exit.c -mescc lib/linux/${MES_ARCH}-mes-mescc/_exit.c -mescc lib/linux/${MES_ARCH}-mes-mescc/_write.c -mescc lib/stdlib/puts.c -mescc lib/string/strlen.c -catm ${LIBDIR}/${MES_ARCH}-mes/libc-mini.a __init_io.o eputs.o oputs.o globals.o exit.o _exit.o _write.o puts.o strlen.o -catm ${LIBDIR}/${MES_ARCH}-mes/libc-mini.s __init_io.s eputs.s oputs.s globals.s exit.s _exit.s _write.s puts.s strlen.s - -# libmescc.a -mescc lib/linux/${MES_ARCH}-mes-mescc/syscall-internal.c -catm ${LIBDIR}/${MES_ARCH}-mes/libmescc.a globals.o syscall-internal.o -catm ${LIBDIR}/${MES_ARCH}-mes/libmescc.s globals.s syscall-internal.s - -# libc.a -mescc lib/ctype/isnumber.c -mescc lib/mes/abtol.c -mescc lib/mes/cast.c -mescc lib/mes/eputc.c -mescc lib/mes/fdgetc.c -mescc lib/mes/fdputc.c -mescc lib/mes/fdputs.c -mescc lib/mes/fdungetc.c -mescc lib/mes/itoa.c -mescc lib/mes/ltoa.c -mescc lib/mes/ltoab.c -mescc lib/mes/mes_open.c -mescc lib/mes/ntoab.c -mescc lib/mes/oputc.c -mescc lib/mes/ultoa.c -mescc lib/mes/utoa.c -mescc lib/ctype/isdigit.c -mescc lib/ctype/isspace.c -mescc lib/ctype/isxdigit.c -mescc lib/mes/assert_msg.c -mescc lib/posix/write.c -mescc lib/stdlib/atoi.c -mescc lib/linux/lseek.c -mescc lib/mes/__assert_fail.c -mescc lib/mes/__buffered_read.c -mescc lib/mes/__mes_debug.c -mescc lib/posix/execv.c -mescc lib/posix/getcwd.c -mescc lib/posix/getenv.c -mescc lib/posix/isatty.c -mescc lib/posix/open.c -mescc lib/posix/buffered-read.c -mescc lib/posix/setenv.c -mescc lib/posix/wait.c -mescc lib/stdio/fgetc.c -mescc lib/stdio/fputc.c -mescc lib/stdio/fputs.c -mescc lib/stdio/getc.c -mescc lib/stdio/getchar.c -mescc lib/stdio/putc.c -mescc lib/stdio/putchar.c -mescc lib/stdio/ungetc.c -mescc lib/stdlib/free.c -mescc lib/stdlib/realloc.c -mescc lib/string/memchr.c -mescc lib/string/memcmp.c -mescc lib/string/memcpy.c -mescc lib/string/memmove.c -mescc lib/string/memset.c -mescc lib/string/strcmp.c -mescc lib/string/strcpy.c -mescc lib/string/strncmp.c -mescc lib/posix/raise.c -mescc lib/linux/access.c -mescc lib/linux/brk.c -mescc lib/linux/chmod.c -mescc lib/linux/clock_gettime.c -mescc lib/linux/dup.c -mescc lib/linux/dup2.c -mescc lib/linux/execve.c -mescc lib/linux/fork.c -mescc lib/linux/fsync.c -mescc lib/linux/_getcwd.c -mescc lib/linux/gettimeofday.c -mescc lib/linux/ioctl3.c -mescc lib/linux/malloc.c -mescc lib/linux/_open3.c -mescc lib/linux/_read.c -mescc lib/linux/time.c -mescc lib/linux/unlink.c -mescc lib/linux/wait4.c -mescc lib/linux/waitpid.c -mescc lib/linux/${MES_ARCH}-mes-mescc/syscall.c -mescc lib/linux/getpid.c -mescc lib/linux/kill.c -catm ${LIBDIR}/${MES_ARCH}-mes/libc.a __init_io.o eputs.o oputs.o globals.o exit.o _exit.o _write.o puts.o strlen.o isnumber.o abtol.o cast.o eputc.o fdgetc.o fdputc.o fdputs.o fdungetc.o itoa.o ltoa.o ltoab.o mes_open.o ntoab.o oputc.o ultoa.o utoa.o isdigit.o isspace.o isxdigit.o assert_msg.o write.o atoi.o lseek.o __assert_fail.o __buffered_read.o __mes_debug.o execv.o getcwd.o getenv.o isatty.o open.o buffered-read.o setenv.o wait.o fgetc.o fputc.o fputs.o getc.o getchar.o putc.o putchar.o ungetc.o free.o malloc.o realloc.o memchr.o memcmp.o memcpy.o memmove.o memset.o strcmp.o strcpy.o strncmp.o raise.o access.o brk.o chmod.o clock_gettime.o dup.o dup2.o execve.o fork.o fsync.o _getcwd.o gettimeofday.o ioctl3.o _open3.o _read.o time.o unlink.o wait4.o waitpid.o syscall.o getpid.o kill.o -catm ${LIBDIR}/${MES_ARCH}-mes/libc.s __init_io.s eputs.s oputs.s globals.s exit.s _exit.s _write.s puts.s strlen.s isnumber.s abtol.s cast.s eputc.s fdgetc.s fdputc.s fdputs.s fdungetc.s itoa.s ltoa.s ltoab.s mes_open.s ntoab.s oputc.s ultoa.s utoa.s isdigit.s isspace.s isxdigit.s assert_msg.s write.s atoi.s lseek.s __assert_fail.s __buffered_read.s __mes_debug.s execv.s getcwd.s getenv.s isatty.s open.s buffered-read.s setenv.s wait.s fgetc.s fputc.s fputs.s getc.s getchar.s putc.s putchar.s ungetc.s free.s malloc.s realloc.s memchr.s memcmp.s memcpy.s memmove.s memset.s strcmp.s strcpy.s strncmp.s raise.s access.s brk.s chmod.s clock_gettime.s dup.s dup2.s execve.s fork.s fsync.s _getcwd.s gettimeofday.s ioctl3.s _open3.s _read.s time.s unlink.s wait4.s waitpid.s syscall.s getpid.s kill.s - -# Build mes itself -mescc src/builtins.c -mescc src/cc.c -mescc src/core.c -mescc src/display.c -mescc src/eval-apply.c -mescc src/gc.c -mescc src/globals.c -mescc src/hash.c -mescc src/lib.c -mescc src/math.c -mescc src/mes.c -mescc src/module.c -mescc src/posix.c -mescc src/reader.c -mescc src/stack.c -mescc src/string.c -mescc src/struct.c -mescc src/symbol.c -mescc src/vector.c - -# Link everything into new mes executable -${MES} -e main ${mescc_scm} -- --base-address 0x08048000 -L ${LIBDIR} -o ${BINDIR}/mes builtins.o cc.o core.o display.o eval-apply.o gc.o globals.o hash.o lib.o math.o mes.o module.o posix.o reader.o stack.o string.o struct.o symbol.o vector.o -lc -lmescc - -# libc+tcc.a -alias mescc="${BINDIR}/mes -e main ${BINDIR}/mescc.scm -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -c" -mescc lib/ctype/islower.c -mescc lib/ctype/isupper.c -mescc lib/ctype/tolower.c -mescc lib/ctype/toupper.c -mescc lib/mes/abtod.c -mescc lib/mes/dtoab.c -mescc lib/mes/search-path.c -mescc lib/posix/execvp.c -mescc lib/stdio/fclose.c -mescc lib/stdio/fdopen.c -mescc lib/stdio/ferror.c -mescc lib/stdio/fflush.c -mescc lib/stdio/fopen.c -mescc lib/stdio/fprintf.c -mescc lib/stdio/fread.c -mescc lib/stdio/fseek.c -mescc lib/stdio/ftell.c -mescc lib/stdio/fwrite.c -mescc lib/stdio/printf.c -mescc lib/stdio/remove.c -mescc lib/stdio/snprintf.c -mescc lib/stdio/sprintf.c -mescc lib/stdio/sscanf.c -mescc lib/stdio/vfprintf.c -mescc lib/stdio/vprintf.c -mescc lib/stdio/vsnprintf.c -mescc lib/stdio/vsprintf.c -mescc lib/stdio/vsscanf.c -mescc lib/stdlib/abort.c -mescc lib/stdlib/calloc.c -mescc lib/stdlib/qsort.c -mescc lib/stdlib/strtod.c -mescc lib/stdlib/strtof.c -mescc lib/stdlib/strtol.c -mescc lib/stdlib/strtold.c -mescc lib/stdlib/strtoll.c -mescc lib/stdlib/strtoul.c -mescc lib/stdlib/strtoull.c -mescc lib/string/memmem.c -mescc lib/string/strcat.c -mescc lib/string/strchr.c -mescc lib/string/strlwr.c -mescc lib/string/strncpy.c -mescc lib/string/strrchr.c -mescc lib/string/strstr.c -mescc lib/string/strupr.c -mescc lib/stub/sigaction.c -mescc lib/stub/ldexp.c -mescc lib/stub/mprotect.c -mescc lib/stub/localtime.c -mescc lib/stub/sigemptyset.c -mescc lib/${MES_ARCH}-mes-mescc/setjmp.c -mescc lib/linux/close.c -mescc lib/linux/rmdir.c -mescc lib/linux/stat.c -catm ${LIBDIR}/${MES_ARCH}-mes/libc+tcc.a ${LIBDIR}/${MES_ARCH}-mes/libc.a islower.o isupper.o tolower.o toupper.o abtod.o dtoab.o search-path.o execvp.o fclose.o fdopen.o ferror.o fflush.o fopen.o fprintf.o fread.o fseek.o ftell.o fwrite.o printf.o remove.o snprintf.o sprintf.o sscanf.o vfprintf.o vprintf.o vsnprintf.o vsprintf.o vsscanf.o abort.o calloc.o qsort.o strtod.o strtof.o strtol.o strtold.o strtoll.o strtoul.o strtoull.o memmem.o strcat.o strchr.o strlwr.o strncpy.o strrchr.o strstr.o strupr.o sigaction.o ldexp.o mprotect.o localtime.o sigemptyset.o setjmp.o close.o rmdir.o stat.o -catm ${LIBDIR}/${MES_ARCH}-mes/libc+tcc.s ${LIBDIR}/${MES_ARCH}-mes/libc.s islower.s isupper.s tolower.s toupper.s abtod.s dtoab.s search-path.s execvp.s fclose.s fdopen.s ferror.s fflush.s fopen.s fprintf.s fread.s fseek.s ftell.s fwrite.s printf.s remove.s snprintf.s sprintf.s sscanf.s vfprintf.s vprintf.s vsnprintf.s vsprintf.s vsscanf.s abort.s calloc.s qsort.s strtod.s strtof.s strtol.s strtold.s strtoll.s strtoul.s strtoull.s memmem.s strcat.s strchr.s strlwr.s strncpy.s strrchr.s strstr.s strupr.s sigaction.s ldexp.s mprotect.s localtime.s sigemptyset.s setjmp.s close.s rmdir.s stat.s - -# Make directories -mkdir ${PREFIX}/lib/linux ${INCDIR}/mes ${INCDIR}/sys ${INCDIR}/linux ${INCDIR}/arch -mkdir ${PREFIX}/lib/${MES_ARCH}-mes ${PREFIX}/lib/linux/${MES_ARCH}-mes ${INCDIR}/linux/${MES_ARCH} - -# Install libraries -cp ${LIBDIR}/${MES_ARCH}-mes/libc.a ${PREFIX}/lib/${MES_ARCH}-mes/ -cp ${LIBDIR}/${MES_ARCH}-mes/libc+tcc.a ${PREFIX}/lib/${MES_ARCH}-mes/ -cp ${LIBDIR}/${MES_ARCH}-mes/libmescc.a ${PREFIX}/lib/${MES_ARCH}-mes/ -cp ${LIBDIR}/${MES_ARCH}-mes/libc.s ${PREFIX}/lib/${MES_ARCH}-mes/ -cp ${LIBDIR}/${MES_ARCH}-mes/libc+tcc.s ${PREFIX}/lib/${MES_ARCH}-mes/ -cp ${LIBDIR}/${MES_ARCH}-mes/libmescc.s ${PREFIX}/lib/${MES_ARCH}-mes/ -cp ${LIBDIR}/${MES_ARCH}-mes/${MES_ARCH}.M1 ${PREFIX}/lib/${MES_ARCH}-mes/ -cp ${LIBDIR}/${MES_ARCH}-mes/crt1.o ${PREFIX}/lib/${MES_ARCH}-mes/ -cp ${LIBDIR}/${MES_ARCH}-mes/crt1.s ${PREFIX}/lib/${MES_ARCH}-mes/ -cp ${LIBDIR}/linux/${MES_ARCH}-mes/elf${ARCH_BITS}-footer-single-main.hex2 ${PREFIX}/lib/linux/${MES_ARCH}-mes/ -cp ${LIBDIR}/linux/${MES_ARCH}-mes/elf${ARCH_BITS}-header.hex2 ${PREFIX}/lib/linux/${MES_ARCH}-mes/ - -# Install header files -cp include/alloca.h ${INCDIR}/alloca.h -cp include/argz.h ${INCDIR}/argz.h -cp include/ar.h ${INCDIR}/ar.h -cp include/assert.h ${INCDIR}/assert.h -cp include/ctype.h ${INCDIR}/ctype.h -cp include/dirent.h ${INCDIR}/dirent.h -cp include/dirstream.h ${INCDIR}/dirstream.h -cp include/dlfcn.h ${INCDIR}/dlfcn.h -cp include/endian.h ${INCDIR}/endian.h -cp include/errno.h ${INCDIR}/errno.h -cp include/fcntl.h ${INCDIR}/fcntl.h -cp include/features.h ${INCDIR}/features.h -cp include/float.h ${INCDIR}/float.h -cp include/getopt.h ${INCDIR}/getopt.h -cp include/grp.h ${INCDIR}/grp.h -cp include/inttypes.h ${INCDIR}/inttypes.h -cp include/libgen.h ${INCDIR}/libgen.h -cp include/limits.h ${INCDIR}/limits.h -cp include/locale.h ${INCDIR}/locale.h -cp include/math.h ${INCDIR}/math.h -cp include/memory.h ${INCDIR}/memory.h -cp include/pwd.h ${INCDIR}/pwd.h -cp include/setjmp.h ${INCDIR}/setjmp.h -cp include/signal.h ${INCDIR}/signal.h -cp include/stdarg.h ${INCDIR}/stdarg.h -cp include/stdbool.h ${INCDIR}/stdbool.h -cp include/stddef.h ${INCDIR}/stddef.h -cp include/stdint.h ${INCDIR}/stdint.h -cp include/stdio.h ${INCDIR}/stdio.h -cp include/stdlib.h ${INCDIR}/stdlib.h -cp include/stdnoreturn.h ${INCDIR}/stdnoreturn.h -cp include/string.h ${INCDIR}/string.h -cp include/strings.h ${INCDIR}/strings.h -cp include/termio.h ${INCDIR}/termio.h -cp include/time.h ${INCDIR}/time.h -cp include/unistd.h ${INCDIR}/unistd.h - -cp include/arch/kernel-stat.h ${INCDIR}/arch/kernel-stat.h -cp include/arch/syscall.h ${INCDIR}/arch/syscall.h - -cp include/linux/syscall.h ${INCDIR}/linux/syscall.h -cp include/linux/${MES_ARCH}/syscall.h ${INCDIR}/linux/${MES_ARCH}/syscall.h - -cp include/mes/builtins.h ${INCDIR}/mes/builtins.h -cp include/mes/cc.h ${INCDIR}/mes/cc.h -catm ${INCDIR}/mes/config.h -cp include/mes/constants.h ${INCDIR}/mes/constants.h -cp include/mes/lib.h ${INCDIR}/mes/lib.h -cp include/mes/lib-cc.h ${INCDIR}/mes/lib-cc.h -cp include/mes/lib-mini.h ${INCDIR}/mes/lib-mini.h -cp include/mes/mes.h ${INCDIR}/mes/mes.h -cp include/mes/symbols.h ${INCDIR}/mes/symbols.h - -cp include/sys/cdefs.h ${INCDIR}/sys/cdefs.h -cp include/sys/dir.h ${INCDIR}/sys/dir.h -cp include/sys/file.h ${INCDIR}/sys/file.h -cp include/sys/ioctl.h ${INCDIR}/sys/ioctl.h -cp include/sys/mman.h ${INCDIR}/sys/mman.h -cp include/sys/param.h ${INCDIR}/sys/param.h -cp include/sys/resource.h ${INCDIR}/sys/resource.h -cp include/sys/select.h ${INCDIR}/sys/select.h -cp include/sys/stat.h ${INCDIR}/sys/stat.h -cp include/sys/timeb.h ${INCDIR}/sys/timeb.h -cp include/sys/time.h ${INCDIR}/sys/time.h -cp include/sys/times.h ${INCDIR}/sys/times.h -cp include/sys/types.h ${INCDIR}/sys/types.h -cp include/sys/ucontext.h ${INCDIR}/sys/ucontext.h -cp include/sys/user.h ${INCDIR}/sys/user.h -cp include/sys/wait.h ${INCDIR}/sys/wait.h - -cd ../.. - -# Checksums -if match x${UPDATE_CHECKSUMS} xTrue; then - sha256sum -o ${pkg}.${ARCH}.checksums \ - /usr/bin/mes \ - /usr/bin/mes-m2 \ - /usr/bin/mescc.scm \ - /usr/lib/${MES_ARCH}-mes/crt1.s \ - /usr/lib/${MES_ARCH}-mes/crt1.o \ - /usr/lib/${MES_ARCH}-mes/${MES_ARCH}.M1 \ - /usr/lib/${MES_ARCH}-mes/libmescc.s \ - /usr/lib/${MES_ARCH}-mes/libc+tcc.s \ - /usr/lib/${MES_ARCH}-mes/libc.s \ - /usr/lib/${MES_ARCH}-mes/libmescc.a \ - /usr/lib/${MES_ARCH}-mes/libc+tcc.a \ - /usr/lib/${MES_ARCH}-mes/libc.a \ - /usr/lib/linux/${MES_ARCH}-mes/elf${ARCH_BITS}-header.hex2 \ - /usr/lib/linux/${MES_ARCH}-mes/elf${ARCH_BITS}-footer-single-main.hex2 - - cp ${pkg}.${ARCH}.checksums ${SRCDIR} -else - sha256sum -c ${pkg}.${ARCH}.checksums -fidiff --git a/steps/mes-0.25/sources b/steps/mes-0.25/sources
@@ -1,2 +0,0 @@ -https://mirrors.kernel.org/gnu/mes/mes-0.25.tar.gz 325250b3567ed9203ba70161c835af01079e73ebed97b4b5bb77ca500b828940 -https://download.savannah.gnu.org/releases/nyacc/nyacc-1.00.2.tar.gz f36e4fb7dd524dc3f4b354d3d5313f69e7ce5a6ae93711e8cf6d51eaa8d2b318diff --git a/steps/mes-0.26/files/config.h b/steps/mes-0.26/files/config.h
@@ -0,0 +1,7 @@ +// SPDX-FileCopyrightText: 2020 fosslinux <fosslinux@aussies.space> +// SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu> +// +// SPDX-License-Identifier: GPL-3.0-or-later + +#undef SYSTEM_LIBC +#define MES_VERSION "0.26"diff --git a/steps/mes-0.25/mes-0.25.amd64.checksums b/steps/mes-0.26/mes-0.26.amd64.checksums
diff --git a/steps/mes-0.25/mes-0.25.riscv64.checksums b/steps/mes-0.26/mes-0.26.riscv64.checksums
diff --git a/steps/mes-0.25/mes-0.25.x86.checksums b/steps/mes-0.26/mes-0.26.x86.checksums
diff --git a/steps/mes-0.26/pass1.kaem b/steps/mes-0.26/pass1.kaem
@@ -0,0 +1,400 @@ +#!/bin/sh + +# SPDX-FileCopyrightText: 2020-2023 Andrius Štikonas <andrius@stikonas.eu> +# SPDX-FileCopyrightText: 2020-2022 fosslinux <fosslinux@aussies.space> +# +# SPDX-License-Identifier: GPL-3.0-or-later + +set -ex + +# Variables +MES_ARENA=20000000 +MES_MAX_ARENA=20000000 +MES_STACK=6000000 +MES=${BINDIR}/mes-m2 +LIBDIR=${MES_PREFIX}/lib + +if match ${ARCH} x86; then + MES_ARCH=x86 + ARCH_BITS=32 +fi +if match ${ARCH} amd64; then + MES_ARCH=x86_64 + ARCH_BITS=64 +fi +if match ${ARCH} riscv64; then + MES_ARCH=riscv64 + ARCH_BITS=64 +fi + +# Check tarball checksums +checksum-transcriber sources +sha256sum -c sources.SHA256SUM + +# Unpack +mkdir build +cd build +ungz --file ${DISTFILES}/${NYACC_PKG}.tar.gz --output ${NYACC_PKG}.tar +ungz --file ${DISTFILES}/${MES_PKG}.tar.gz --output ${MES_PKG}.tar +untar --file ${NYACC_PKG}.tar +untar --non-strict --file ${MES_PKG}.tar # ignore symlinks +mes_run=${MES_PREFIX}/kaem.run +replace --file ${mes_run} --output ${mes_run} --match-on 0x1000000 --replace-with 0x8048000 + +rm ${NYACC_PKG}.tar ${MES_PKG}.tar + +cp ../files/config.h ${MES_PREFIX}/include/mes + +cd ${MES_PREFIX} +mkdir include/arch +cp include/linux/${MES_ARCH}/syscall.h include/arch/syscall.h +cp include/linux/${MES_ARCH}/kernel-stat.h include/arch/kernel-stat.h + +# Remove pregenerated files +rm mes/module/mes/psyntax.pp mes/module/mes/psyntax.pp.header + +# These files are symlinked in the repo +cp mes/module/srfi/srfi-9-struct.mes mes/module/srfi/srfi-9.mes +cp mes/module/srfi/srfi-9/gnu-struct.mes mes/module/srfi/srfi-9/gnu.mes + +# Build mes-m2 +kaem --verbose --strict --file kaem.${MES_ARCH} +cp bin/mes-m2 ${BINDIR}/mes-m2 +chmod 755 ${BINDIR}/mes-m2 + +# Create mescc.scm +mescc_in=scripts/mescc.scm.in +replace --file ${mescc_in} --output ${mescc_in} --match-on @prefix@ --replace-with ${PREFIX} +replace --file ${mescc_in} --output ${mescc_in} --match-on @VERSION@ --replace-with ${MES_VERSION} +replace --file ${mescc_in} --output ${mescc_in} --match-on @mes_cpu@ --replace-with ${MES_ARCH} +replace --file ${mescc_in} --output ${mescc_in} --match-on @mes_kernel@ --replace-with linux + +# Patch out double compilation bug +replace --file ${mescc_in} --output ${mescc_in} --match-on "(mescc:main (command-line))" --replace-with ");" + +mescc_scm=${BINDIR}/mescc.scm +cp ${mescc_in} ${mescc_scm} +chmod 755 ${mescc_scm} + + +# Recompile Mes and Mes C library using mes-m2 bootstrapped Mes + +alias mescc="${MES} -e main ${BINDIR}/mescc.scm -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -c" + +# Start with crt1.o +mescc lib/linux/${MES_ARCH}-mes-mescc/crt1.c -o lib/${MES_ARCH}-mes/crt1.o + +# Now for libc-mini.a +mescc lib/mes/__init_io.c +mescc lib/mes/eputs.c +mescc lib/mes/oputs.c +mescc lib/mes/globals.c +mescc lib/stdlib/exit.c +mescc lib/linux/${MES_ARCH}-mes-mescc/_exit.c +mescc lib/linux/${MES_ARCH}-mes-mescc/_write.c +mescc lib/stdlib/puts.c +mescc lib/string/strlen.c +catm ${LIBDIR}/${MES_ARCH}-mes/libc-mini.a __init_io.o eputs.o oputs.o globals.o exit.o _exit.o _write.o puts.o strlen.o +catm ${LIBDIR}/${MES_ARCH}-mes/libc-mini.s __init_io.s eputs.s oputs.s globals.s exit.s _exit.s _write.s puts.s strlen.s + +# libmescc.a +mescc lib/linux/${MES_ARCH}-mes-mescc/syscall-internal.c +catm ${LIBDIR}/${MES_ARCH}-mes/libmescc.a globals.o syscall-internal.o +catm ${LIBDIR}/${MES_ARCH}-mes/libmescc.s globals.s syscall-internal.s + +# libc.a +mescc lib/ctype/isnumber.c +mescc lib/mes/abtol.c +mescc lib/mes/cast.c +mescc lib/mes/eputc.c +mescc lib/mes/fdgetc.c +mescc lib/mes/fdputc.c +mescc lib/mes/fdputs.c +mescc lib/mes/fdungetc.c +mescc lib/mes/itoa.c +mescc lib/mes/ltoa.c +mescc lib/mes/ltoab.c +mescc lib/mes/mes_open.c +mescc lib/mes/ntoab.c +mescc lib/mes/oputc.c +mescc lib/mes/ultoa.c +mescc lib/mes/utoa.c +mescc lib/ctype/isdigit.c +mescc lib/ctype/isspace.c +mescc lib/ctype/isxdigit.c +mescc lib/mes/assert_msg.c +mescc lib/posix/write.c +mescc lib/stdlib/atoi.c +mescc lib/linux/lseek.c +mescc lib/mes/__assert_fail.c +mescc lib/mes/__buffered_read.c +mescc lib/mes/__mes_debug.c +mescc lib/posix/execv.c +mescc lib/posix/getcwd.c +mescc lib/posix/getenv.c +mescc lib/posix/isatty.c +mescc lib/posix/open.c +mescc lib/posix/buffered-read.c +mescc lib/posix/setenv.c +mescc lib/posix/wait.c +mescc lib/dirent/closedir.c +mescc lib/dirent/opendir.c +mescc lib/stdio/fgetc.c +mescc lib/stdio/fputc.c +mescc lib/stdio/fputs.c +mescc lib/stdio/getc.c +mescc lib/stdio/getchar.c +mescc lib/stdio/putc.c +mescc lib/stdio/putchar.c +mescc lib/stdio/ungetc.c +mescc lib/stdlib/calloc.c +mescc lib/stdlib/free.c +mescc lib/stdlib/realloc.c +mescc lib/string/memchr.c +mescc lib/string/memcmp.c +mescc lib/string/memcpy.c +mescc lib/string/memmove.c +mescc lib/string/memset.c +mescc lib/string/strcmp.c +mescc lib/string/strcpy.c +mescc lib/string/strncmp.c +mescc lib/posix/raise.c +mescc lib/linux/access.c +mescc lib/linux/brk.c +mescc lib/linux/chdir.c +mescc lib/linux/chmod.c +mescc lib/linux/clock_gettime.c +mescc lib/linux/dup.c +mescc lib/linux/dup2.c +mescc lib/linux/execve.c +mescc lib/linux/fork.c +mescc lib/linux/fsync.c +mescc lib/linux/_getcwd.c +mescc lib/linux/gettimeofday.c +mescc lib/linux/ioctl3.c +mescc lib/linux/malloc.c +mescc lib/linux/_open3.c +mescc lib/linux/_read.c +mescc lib/linux/readdir.c +mescc lib/linux/rename.c +mescc lib/linux/time.c +mescc lib/linux/umask.c +mescc lib/linux/uname.c +mescc lib/linux/unlink.c +mescc lib/linux/utimensat.c +mescc lib/linux/wait4.c +mescc lib/linux/waitpid.c +mescc lib/linux/${MES_ARCH}-mes-mescc/syscall.c +mescc lib/linux/getpid.c +mescc lib/linux/kill.c +mescc lib/linux/pipe.c +mescc lib/linux/stat.c +mescc lib/linux/lstat.c +mescc lib/linux/mkdir.c +mescc lib/linux/rmdir.c +mescc lib/linux/link.c +mescc lib/linux/symlink.c +mescc lib/linux/close.c +mescc lib/linux/nanosleep.c +mescc lib/linux/fcntl.c +mescc lib/linux/fstat.c +mescc lib/linux/getdents.c +catm ${LIBDIR}/${MES_ARCH}-mes/libc.a __init_io.o eputs.o oputs.o globals.o exit.o _exit.o _write.o puts.o strlen.o isnumber.o abtol.o cast.o eputc.o fdgetc.o fdputc.o fdputs.o fdungetc.o itoa.o ltoa.o ltoab.o mes_open.o ntoab.o oputc.o ultoa.o utoa.o isdigit.o isspace.o isxdigit.o assert_msg.o write.o atoi.o lseek.o __assert_fail.o __buffered_read.o __mes_debug.o execv.o getcwd.o getenv.o isatty.o open.o buffered-read.o setenv.o wait.o closedir.o opendir.o fgetc.o fputc.o fputs.o getc.o getchar.o putc.o putchar.o ungetc.o calloc.o free.o malloc.o realloc.o memchr.o memcmp.o memcpy.o memmove.o memset.o strcmp.o strcpy.o strncmp.o raise.o access.o brk.o chdir.o chmod.o clock_gettime.o dup.o dup2.o execve.o fork.o fsync.o _getcwd.o gettimeofday.o ioctl3.o _open3.o _read.o readdir.o rename.o time.o umask.o uname.o unlink.o utimensat.o wait4.o waitpid.o syscall.o getpid.o kill.o pipe.o stat.o lstat.o mkdir.o rmdir.o link.o symlink.o close.o nanosleep.o fcntl.o fstat.o getdents.o +catm ${LIBDIR}/${MES_ARCH}-mes/libc.s __init_io.s eputs.s oputs.s globals.s exit.s _exit.s _write.s puts.s strlen.s isnumber.s abtol.s cast.s eputc.s fdgetc.s fdputc.s fdputs.s fdungetc.s itoa.s ltoa.s ltoab.s mes_open.s ntoab.s oputc.s ultoa.s utoa.s isdigit.s isspace.s isxdigit.s assert_msg.s write.s atoi.s lseek.s __assert_fail.s __buffered_read.s __mes_debug.s execv.s getcwd.s getenv.s isatty.s open.s buffered-read.s setenv.s wait.s closedir.s opendir.s fgetc.s fputc.s fputs.s getc.s getchar.s putc.s putchar.s ungetc.s calloc.s free.s malloc.s realloc.s memchr.s memcmp.s memcpy.s memmove.s memset.s strcmp.s strcpy.s strncmp.s raise.s access.s brk.s chdir.s chmod.s clock_gettime.s dup.s dup2.s execve.s fork.s fsync.s _getcwd.s gettimeofday.s ioctl3.s _open3.s _read.s readdir.s rename.s time.s umask.s uname.s unlink.s utimensat.s wait4.s waitpid.s syscall.s getpid.s kill.s pipe.s stat.s lstat.s mkdir.s rmdir.s link.s symlink.s close.s nanosleep.s fcntl.s fstat.s getdents.s + +# Build mes itself +mescc src/builtins.c +mescc src/cc.c +mescc src/core.c +mescc src/display.c +mescc src/eval-apply.c +mescc src/gc.c +mescc src/globals.c +mescc src/hash.c +mescc src/lib.c +mescc src/math.c +mescc src/mes.c +mescc src/module.c +mescc src/posix.c +mescc src/reader.c +mescc src/stack.c +mescc src/string.c +mescc src/struct.c +mescc src/symbol.c +mescc src/variable.c +mescc src/vector.c + +# Link everything into new mes executable +${MES} -e main ${mescc_scm} -- --base-address 0x08048000 -L ${LIBDIR} -o ${BINDIR}/mes builtins.o cc.o core.o display.o eval-apply.o gc.o globals.o hash.o lib.o math.o mes.o module.o posix.o reader.o stack.o string.o struct.o symbol.o variable.o vector.o -lc -lmescc + +# libc+tcc.a +alias mescc="${BINDIR}/mes -e main ${BINDIR}/mescc.scm -D HAVE_CONFIG_H=1 -I include -I include/linux/${MES_ARCH} -c" +mescc lib/ctype/islower.c +mescc lib/ctype/isupper.c +mescc lib/ctype/tolower.c +mescc lib/ctype/toupper.c +mescc lib/mes/abtod.c +mescc lib/mes/dtoab.c +mescc lib/mes/search-path.c +mescc lib/posix/execvp.c +mescc lib/stdio/fclose.c +mescc lib/stdio/fdopen.c +mescc lib/stdio/ferror.c +mescc lib/stdio/fflush.c +mescc lib/stdio/fopen.c +mescc lib/stdio/fprintf.c +mescc lib/stdio/fread.c +mescc lib/stdio/fseek.c +mescc lib/stdio/ftell.c +mescc lib/stdio/fwrite.c +mescc lib/stdio/printf.c +mescc lib/stdio/remove.c +mescc lib/stdio/snprintf.c +mescc lib/stdio/sprintf.c +mescc lib/stdio/sscanf.c +mescc lib/stdio/vfprintf.c +mescc lib/stdio/vprintf.c +mescc lib/stdio/vsnprintf.c +mescc lib/stdio/vsprintf.c +mescc lib/stdio/vsscanf.c +mescc lib/stdlib/abort.c +mescc lib/stdlib/qsort.c +mescc lib/stdlib/strtod.c +mescc lib/stdlib/strtof.c +mescc lib/stdlib/strtol.c +mescc lib/stdlib/strtold.c +mescc lib/stdlib/strtoll.c +mescc lib/stdlib/strtoul.c +mescc lib/stdlib/strtoull.c +mescc lib/string/memmem.c +mescc lib/string/strcat.c +mescc lib/string/strchr.c +mescc lib/string/strlwr.c +mescc lib/string/strncpy.c +mescc lib/string/strrchr.c +mescc lib/string/strstr.c +mescc lib/string/strupr.c +mescc lib/stub/sigaction.c +mescc lib/stub/ldexp.c +mescc lib/stub/mprotect.c +mescc lib/stub/localtime.c +mescc lib/stub/sigemptyset.c +mescc lib/${MES_ARCH}-mes-mescc/setjmp.c +mescc lib/linux/close.c +mescc lib/linux/rmdir.c +mescc lib/linux/stat.c +catm ${LIBDIR}/${MES_ARCH}-mes/libc+tcc.a ${LIBDIR}/${MES_ARCH}-mes/libc.a islower.o isupper.o tolower.o toupper.o abtod.o dtoab.o search-path.o execvp.o fclose.o fdopen.o ferror.o fflush.o fopen.o fprintf.o fread.o fseek.o ftell.o fwrite.o printf.o remove.o snprintf.o sprintf.o sscanf.o vfprintf.o vprintf.o vsnprintf.o vsprintf.o vsscanf.o abort.o qsort.o strtod.o strtof.o strtol.o strtold.o strtoll.o strtoul.o strtoull.o memmem.o strcat.o strchr.o strlwr.o strncpy.o strrchr.o strstr.o strupr.o sigaction.o ldexp.o mprotect.o localtime.o sigemptyset.o setjmp.o close.o rmdir.o stat.o +catm ${LIBDIR}/${MES_ARCH}-mes/libc+tcc.s ${LIBDIR}/${MES_ARCH}-mes/libc.s islower.s isupper.s tolower.s toupper.s abtod.s dtoab.s search-path.s execvp.s fclose.s fdopen.s ferror.s fflush.s fopen.s fprintf.s fread.s fseek.s ftell.s fwrite.s printf.s remove.s snprintf.s sprintf.s sscanf.s vfprintf.s vprintf.s vsnprintf.s vsprintf.s vsscanf.s abort.s qsort.s strtod.s strtof.s strtol.s strtold.s strtoll.s strtoul.s strtoull.s memmem.s strcat.s strchr.s strlwr.s strncpy.s strrchr.s strstr.s strupr.s sigaction.s ldexp.s mprotect.s localtime.s sigemptyset.s setjmp.s close.s rmdir.s stat.s + +# Make directories +mkdir ${PREFIX}/lib/linux ${INCDIR}/mes ${INCDIR}/sys ${INCDIR}/linux ${INCDIR}/arch +mkdir ${PREFIX}/lib/${MES_ARCH}-mes ${PREFIX}/lib/linux/${MES_ARCH}-mes ${INCDIR}/linux/${MES_ARCH} + +# Install libraries +cp ${LIBDIR}/${MES_ARCH}-mes/libc.a ${PREFIX}/lib/${MES_ARCH}-mes/ +cp ${LIBDIR}/${MES_ARCH}-mes/libc+tcc.a ${PREFIX}/lib/${MES_ARCH}-mes/ +cp ${LIBDIR}/${MES_ARCH}-mes/libmescc.a ${PREFIX}/lib/${MES_ARCH}-mes/ +cp ${LIBDIR}/${MES_ARCH}-mes/libc.s ${PREFIX}/lib/${MES_ARCH}-mes/ +cp ${LIBDIR}/${MES_ARCH}-mes/libc+tcc.s ${PREFIX}/lib/${MES_ARCH}-mes/ +cp ${LIBDIR}/${MES_ARCH}-mes/libmescc.s ${PREFIX}/lib/${MES_ARCH}-mes/ +cp ${LIBDIR}/${MES_ARCH}-mes/${MES_ARCH}.M1 ${PREFIX}/lib/${MES_ARCH}-mes/ +cp ${LIBDIR}/${MES_ARCH}-mes/crt1.o ${PREFIX}/lib/${MES_ARCH}-mes/ +cp ${LIBDIR}/${MES_ARCH}-mes/crt1.s ${PREFIX}/lib/${MES_ARCH}-mes/ +cp ${LIBDIR}/linux/${MES_ARCH}-mes/elf${ARCH_BITS}-footer-single-main.hex2 ${PREFIX}/lib/linux/${MES_ARCH}-mes/ +cp ${LIBDIR}/linux/${MES_ARCH}-mes/elf${ARCH_BITS}-header.hex2 ${PREFIX}/lib/linux/${MES_ARCH}-mes/ + +# Install header files +cp include/alloca.h ${INCDIR}/alloca.h +cp include/argz.h ${INCDIR}/argz.h +cp include/ar.h ${INCDIR}/ar.h +cp include/assert.h ${INCDIR}/assert.h +cp include/ctype.h ${INCDIR}/ctype.h +cp include/dirent.h ${INCDIR}/dirent.h +cp include/dirstream.h ${INCDIR}/dirstream.h +cp include/dlfcn.h ${INCDIR}/dlfcn.h +cp include/endian.h ${INCDIR}/endian.h +cp include/errno.h ${INCDIR}/errno.h +cp include/fcntl.h ${INCDIR}/fcntl.h +cp include/features.h ${INCDIR}/features.h +cp include/float.h ${INCDIR}/float.h +cp include/getopt.h ${INCDIR}/getopt.h +cp include/grp.h ${INCDIR}/grp.h +cp include/inttypes.h ${INCDIR}/inttypes.h +cp include/libgen.h ${INCDIR}/libgen.h +cp include/limits.h ${INCDIR}/limits.h +cp include/locale.h ${INCDIR}/locale.h +cp include/math.h ${INCDIR}/math.h +cp include/memory.h ${INCDIR}/memory.h +cp include/pwd.h ${INCDIR}/pwd.h +cp include/setjmp.h ${INCDIR}/setjmp.h +cp include/signal.h ${INCDIR}/signal.h +cp include/stdarg.h ${INCDIR}/stdarg.h +cp include/stdbool.h ${INCDIR}/stdbool.h +cp include/stddef.h ${INCDIR}/stddef.h +cp include/stdint.h ${INCDIR}/stdint.h +cp include/stdio.h ${INCDIR}/stdio.h +cp include/stdlib.h ${INCDIR}/stdlib.h +cp include/stdnoreturn.h ${INCDIR}/stdnoreturn.h +cp include/string.h ${INCDIR}/string.h +cp include/strings.h ${INCDIR}/strings.h +cp include/termio.h ${INCDIR}/termio.h +cp include/time.h ${INCDIR}/time.h +cp include/unistd.h ${INCDIR}/unistd.h + +cp include/arch/kernel-stat.h ${INCDIR}/arch/kernel-stat.h +cp include/arch/syscall.h ${INCDIR}/arch/syscall.h + +cp include/linux/syscall.h ${INCDIR}/linux/syscall.h +cp include/linux/${MES_ARCH}/syscall.h ${INCDIR}/linux/${MES_ARCH}/syscall.h + +cp include/mes/builtins.h ${INCDIR}/mes/builtins.h +cp include/mes/cc.h ${INCDIR}/mes/cc.h +catm ${INCDIR}/mes/config.h +cp include/mes/constants.h ${INCDIR}/mes/constants.h +cp include/mes/lib.h ${INCDIR}/mes/lib.h +cp include/mes/lib-cc.h ${INCDIR}/mes/lib-cc.h +cp include/mes/lib-mini.h ${INCDIR}/mes/lib-mini.h +cp include/mes/mes.h ${INCDIR}/mes/mes.h +cp include/mes/symbols.h ${INCDIR}/mes/symbols.h + +cp include/sys/cdefs.h ${INCDIR}/sys/cdefs.h +cp include/sys/dir.h ${INCDIR}/sys/dir.h +cp include/sys/file.h ${INCDIR}/sys/file.h +cp include/sys/ioctl.h ${INCDIR}/sys/ioctl.h +cp include/sys/mman.h ${INCDIR}/sys/mman.h +cp include/sys/param.h ${INCDIR}/sys/param.h +cp include/sys/resource.h ${INCDIR}/sys/resource.h +cp include/sys/select.h ${INCDIR}/sys/select.h +cp include/sys/stat.h ${INCDIR}/sys/stat.h +cp include/sys/timeb.h ${INCDIR}/sys/timeb.h +cp include/sys/time.h ${INCDIR}/sys/time.h +cp include/sys/times.h ${INCDIR}/sys/times.h +cp include/sys/types.h ${INCDIR}/sys/types.h +cp include/sys/ucontext.h ${INCDIR}/sys/ucontext.h +cp include/sys/user.h ${INCDIR}/sys/user.h +cp include/sys/wait.h ${INCDIR}/sys/wait.h + +cd ../.. + +# Checksums +if match x${UPDATE_CHECKSUMS} xTrue; then + sha256sum -o ${pkg}.${ARCH}.checksums \ + /usr/bin/mes \ + /usr/bin/mes-m2 \ + /usr/bin/mescc.scm \ + /usr/lib/${MES_ARCH}-mes/crt1.s \ + /usr/lib/${MES_ARCH}-mes/crt1.o \ + /usr/lib/${MES_ARCH}-mes/${MES_ARCH}.M1 \ + /usr/lib/${MES_ARCH}-mes/libmescc.s \ + /usr/lib/${MES_ARCH}-mes/libc+tcc.s \ + /usr/lib/${MES_ARCH}-mes/libc.s \ + /usr/lib/${MES_ARCH}-mes/libmescc.a \ + /usr/lib/${MES_ARCH}-mes/libc+tcc.a \ + /usr/lib/${MES_ARCH}-mes/libc.a \ + /usr/lib/linux/${MES_ARCH}-mes/elf${ARCH_BITS}-header.hex2 \ + /usr/lib/linux/${MES_ARCH}-mes/elf${ARCH_BITS}-footer-single-main.hex2 + + cp ${pkg}.${ARCH}.checksums ${SRCDIR} +else + sha256sum -c ${pkg}.${ARCH}.checksums +fidiff --git a/steps/mes-0.26/sources b/steps/mes-0.26/sources
@@ -0,0 +1,2 @@ +https://mirrors.kernel.org/gnu/mes/mes-0.26.tar.gz 0f2210ad5896249466a0fc9a509e86c9a16db2b722741c6dfb5e8f7b33e385d4 +https://download.savannah.gnu.org/releases/nyacc/nyacc-1.00.2.tar.gz f36e4fb7dd524dc3f4b354d3d5313f69e7ce5a6ae93711e8cf6d51eaa8d2b318diff --git a/steps/tcc-0.9.26/pass1.kaem b/steps/tcc-0.9.26/pass1.kaem
@@ -99,7 +99,7 @@ cd ../${MES_PKG} # Create unified libc file cd lib -catm ../unified-libc.c ctype/isalnum.c ctype/isalpha.c ctype/isascii.c ctype/iscntrl.c ctype/isdigit.c ctype/isgraph.c ctype/islower.c ctype/isnumber.c ctype/isprint.c ctype/ispunct.c ctype/isspace.c ctype/isupper.c ctype/isxdigit.c ctype/tolower.c ctype/toupper.c dirent/closedir.c dirent/__getdirentries.c dirent/opendir.c dirent/readdir.c linux/access.c linux/brk.c linux/chdir.c linux/chmod.c linux/clock_gettime.c linux/close.c linux/dup2.c linux/dup.c linux/execve.c linux/fcntl.c linux/fork.c linux/fsync.c linux/fstat.c linux/_getcwd.c linux/getdents.c linux/getegid.c linux/geteuid.c linux/getgid.c linux/getpid.c linux/getppid.c linux/getrusage.c linux/gettimeofday.c linux/getuid.c linux/ioctl.c linux/ioctl3.c linux/kill.c linux/link.c linux/lseek.c linux/lstat.c linux/malloc.c linux/mkdir.c linux/mknod.c linux/nanosleep.c linux/_open3.c linux/pipe.c linux/_read.c linux/readlink.c linux/rename.c linux/rmdir.c linux/setgid.c linux/settimer.c linux/setuid.c linux/signal.c linux/sigprogmask.c linux/symlink.c linux/stat.c linux/time.c linux/unlink.c linux/waitpid.c linux/wait4.c linux/${MES_ARCH}-mes-${MES_LIBC_SUFFIX}/_exit.c linux/${MES_ARCH}-mes-${MES_LIBC_SUFFIX}/syscall.c linux/${MES_ARCH}-mes-${MES_LIBC_SUFFIX}/_write.c math/ceil.c math/fabs.c math/floor.c mes/abtod.c mes/abtol.c mes/__assert_fail.c mes/assert_msg.c mes/__buffered_read.c mes/__init_io.c mes/cast.c mes/dtoab.c mes/eputc.c mes/eputs.c mes/fdgetc.c mes/fdgets.c mes/fdputc.c mes/fdputs.c mes/fdungetc.c mes/globals.c mes/itoa.c mes/ltoab.c mes/ltoa.c mes/__mes_debug.c mes/mes_open.c mes/ntoab.c mes/oputc.c mes/oputs.c mes/search-path.c mes/ultoa.c mes/utoa.c posix/alarm.c posix/buffered-read.c posix/execl.c posix/execlp.c posix/execv.c posix/execvp.c posix/getcwd.c posix/getenv.c posix/isatty.c posix/mktemp.c posix/open.c posix/raise.c posix/sbrk.c posix/setenv.c posix/sleep.c posix/unsetenv.c posix/wait.c posix/write.c stdio/clearerr.c stdio/fclose.c stdio/fdopen.c stdio/feof.c stdio/ferror.c stdio/fflush.c stdio/fgetc.c stdio/fgets.c stdio/fileno.c stdio/fopen.c stdio/fprintf.c stdio/fputc.c stdio/fputs.c stdio/fread.c stdio/freopen.c stdio/fscanf.c stdio/fseek.c stdio/ftell.c stdio/fwrite.c stdio/getc.c stdio/getchar.c stdio/perror.c stdio/printf.c stdio/putc.c stdio/putchar.c stdio/remove.c stdio/snprintf.c stdio/sprintf.c stdio/sscanf.c stdio/ungetc.c stdio/vfprintf.c stdio/vfscanf.c stdio/vprintf.c stdio/vsnprintf.c stdio/vsprintf.c stdio/vsscanf.c stdlib/abort.c stdlib/abs.c stdlib/alloca.c stdlib/atexit.c stdlib/atof.c stdlib/atoi.c stdlib/atol.c stdlib/calloc.c stdlib/__exit.c stdlib/exit.c stdlib/free.c stdlib/mbstowcs.c stdlib/puts.c stdlib/qsort.c stdlib/realloc.c stdlib/strtod.c stdlib/strtof.c stdlib/strtol.c stdlib/strtold.c stdlib/strtoll.c stdlib/strtoul.c stdlib/strtoull.c string/bcmp.c string/bcopy.c string/bzero.c string/index.c string/memchr.c string/memcmp.c string/memcpy.c string/memmem.c string/memmove.c string/memset.c string/rindex.c string/strcat.c string/strchr.c string/strcmp.c string/strcpy.c string/strcspn.c string/strdup.c string/strerror.c string/strlen.c string/strlwr.c string/strncat.c string/strncmp.c string/strncpy.c string/strpbrk.c string/strrchr.c string/strspn.c string/strstr.c string/strupr.c stub/atan2.c stub/bsearch.c stub/chown.c stub/__cleanup.c stub/cos.c stub/ctime.c stub/exp.c stub/fpurge.c stub/freadahead.c stub/frexp.c stub/getgrgid.c stub/getgrnam.c stub/getlogin.c stub/getpgid.c stub/getpgrp.c stub/getpwnam.c stub/getpwuid.c stub/gmtime.c stub/ldexp.c stub/localtime.c stub/log.c stub/mktime.c stub/modf.c stub/mprotect.c stub/pclose.c stub/popen.c stub/pow.c stub/rand.c stub/rewind.c stub/setbuf.c stub/setgrent.c stub/setlocale.c stub/setvbuf.c stub/sigaction.c stub/sigaddset.c stub/sigblock.c stub/sigdelset.c stub/sigemptyset.c stub/sigsetmask.c stub/sin.c stub/sys_siglist.c stub/system.c stub/sqrt.c stub/strftime.c stub/times.c stub/ttyname.c stub/umask.c stub/utime.c ${MES_ARCH}-mes-${MES_LIBC_SUFFIX}/setjmp.c +catm ../unified-libc.c ctype/isalnum.c ctype/isalpha.c ctype/isascii.c ctype/iscntrl.c ctype/isdigit.c ctype/isgraph.c ctype/islower.c ctype/isnumber.c ctype/isprint.c ctype/ispunct.c ctype/isspace.c ctype/isupper.c ctype/isxdigit.c ctype/tolower.c ctype/toupper.c dirent/closedir.c dirent/__getdirentries.c dirent/opendir.c linux/readdir.c linux/access.c linux/brk.c linux/chdir.c linux/chmod.c linux/clock_gettime.c linux/close.c linux/dup2.c linux/dup.c linux/execve.c linux/fcntl.c linux/fork.c linux/fsync.c linux/fstat.c linux/_getcwd.c linux/getdents.c linux/getegid.c linux/geteuid.c linux/getgid.c linux/getpid.c linux/getppid.c linux/getrusage.c linux/gettimeofday.c linux/getuid.c linux/ioctl.c linux/ioctl3.c linux/kill.c linux/link.c linux/lseek.c linux/lstat.c linux/malloc.c linux/mkdir.c linux/mknod.c linux/nanosleep.c linux/_open3.c linux/pipe.c linux/_read.c linux/readlink.c linux/rename.c linux/rmdir.c linux/setgid.c linux/settimer.c linux/setuid.c linux/signal.c linux/sigprogmask.c linux/symlink.c linux/stat.c linux/time.c linux/unlink.c linux/waitpid.c linux/wait4.c linux/${MES_ARCH}-mes-${MES_LIBC_SUFFIX}/_exit.c linux/${MES_ARCH}-mes-${MES_LIBC_SUFFIX}/syscall.c linux/${MES_ARCH}-mes-${MES_LIBC_SUFFIX}/_write.c math/ceil.c math/fabs.c math/floor.c mes/abtod.c mes/abtol.c mes/__assert_fail.c mes/assert_msg.c mes/__buffered_read.c mes/__init_io.c mes/cast.c mes/dtoab.c mes/eputc.c mes/eputs.c mes/fdgetc.c mes/fdgets.c mes/fdputc.c mes/fdputs.c mes/fdungetc.c mes/globals.c mes/itoa.c mes/ltoab.c mes/ltoa.c mes/__mes_debug.c mes/mes_open.c mes/ntoab.c mes/oputc.c mes/oputs.c mes/search-path.c mes/ultoa.c mes/utoa.c posix/alarm.c posix/buffered-read.c posix/execl.c posix/execlp.c posix/execv.c posix/execvp.c posix/getcwd.c posix/getenv.c posix/isatty.c posix/mktemp.c posix/open.c posix/raise.c posix/sbrk.c posix/setenv.c posix/sleep.c posix/unsetenv.c posix/wait.c posix/write.c stdio/clearerr.c stdio/fclose.c stdio/fdopen.c stdio/feof.c stdio/ferror.c stdio/fflush.c stdio/fgetc.c stdio/fgets.c stdio/fileno.c stdio/fopen.c stdio/fprintf.c stdio/fputc.c stdio/fputs.c stdio/fread.c stdio/freopen.c stdio/fscanf.c stdio/fseek.c stdio/ftell.c stdio/fwrite.c stdio/getc.c stdio/getchar.c stdio/perror.c stdio/printf.c stdio/putc.c stdio/putchar.c stdio/remove.c stdio/snprintf.c stdio/sprintf.c stdio/sscanf.c stdio/ungetc.c stdio/vfprintf.c stdio/vfscanf.c stdio/vprintf.c stdio/vsnprintf.c stdio/vsprintf.c stdio/vsscanf.c stdlib/abort.c stdlib/abs.c stdlib/alloca.c stdlib/atexit.c stdlib/atof.c stdlib/atoi.c stdlib/atol.c stdlib/calloc.c stdlib/__exit.c stdlib/exit.c stdlib/free.c stdlib/mbstowcs.c stdlib/puts.c stdlib/qsort.c stdlib/realloc.c stdlib/strtod.c stdlib/strtof.c stdlib/strtol.c stdlib/strtold.c stdlib/strtoll.c stdlib/strtoul.c stdlib/strtoull.c string/bcmp.c string/bcopy.c string/bzero.c string/index.c string/memchr.c string/memcmp.c string/memcpy.c string/memmem.c string/memmove.c string/memset.c string/rindex.c string/strcat.c string/strchr.c string/strcmp.c string/strcpy.c string/strcspn.c string/strdup.c string/strerror.c string/strlen.c string/strlwr.c string/strncat.c string/strncmp.c string/strncpy.c string/strpbrk.c string/strrchr.c string/strspn.c string/strstr.c string/strupr.c stub/atan2.c stub/bsearch.c stub/chown.c stub/__cleanup.c stub/cos.c stub/ctime.c stub/exp.c stub/fpurge.c stub/freadahead.c stub/frexp.c stub/getgrgid.c stub/getgrnam.c stub/getlogin.c stub/getpgid.c stub/getpgrp.c stub/getpwnam.c stub/getpwuid.c stub/gmtime.c stub/ldexp.c stub/localtime.c stub/log.c stub/mktime.c stub/modf.c stub/mprotect.c stub/pclose.c stub/popen.c stub/pow.c stub/rand.c stub/rewind.c stub/setbuf.c stub/setgrent.c stub/setlocale.c stub/setvbuf.c stub/sigaction.c stub/sigaddset.c stub/sigblock.c stub/sigdelset.c stub/sigemptyset.c stub/sigsetmask.c stub/sin.c stub/sys_siglist.c stub/system.c stub/sqrt.c stub/strftime.c stub/times.c stub/ttyname.c stub/umask.c stub/utime.c ${MES_ARCH}-mes-${MES_LIBC_SUFFIX}/setjmp.c cd .. # crt1.odiff --git a/steps/tcc-0.9.27/pass1.kaem b/steps/tcc-0.9.27/pass1.kaem
@@ -55,7 +55,7 @@ cd ../${MES_PKG} # Create unified libc file cd lib -catm ../unified-libc.c ctype/isalnum.c ctype/isalpha.c ctype/isascii.c ctype/iscntrl.c ctype/isdigit.c ctype/isgraph.c ctype/islower.c ctype/isnumber.c ctype/isprint.c ctype/ispunct.c ctype/isspace.c ctype/isupper.c ctype/isxdigit.c ctype/tolower.c ctype/toupper.c dirent/closedir.c dirent/__getdirentries.c dirent/opendir.c dirent/readdir.c linux/access.c linux/brk.c linux/chdir.c linux/chmod.c linux/clock_gettime.c linux/close.c linux/dup2.c linux/dup.c linux/execve.c linux/fcntl.c linux/fork.c linux/fsync.c linux/fstat.c linux/_getcwd.c linux/getdents.c linux/getegid.c linux/geteuid.c linux/getgid.c linux/getpid.c linux/getppid.c linux/getrusage.c linux/gettimeofday.c linux/getuid.c linux/ioctl.c linux/ioctl3.c linux/kill.c linux/link.c linux/lseek.c linux/lstat.c linux/malloc.c linux/mkdir.c linux/mknod.c linux/nanosleep.c linux/_open3.c linux/pipe.c linux/_read.c linux/readlink.c linux/rename.c linux/rmdir.c linux/setgid.c linux/settimer.c linux/setuid.c linux/signal.c linux/sigprogmask.c linux/symlink.c linux/stat.c linux/time.c linux/unlink.c linux/waitpid.c linux/x86-mes-gcc/_exit.c linux/x86-mes-gcc/syscall.c linux/x86-mes-gcc/_write.c math/ceil.c math/fabs.c math/floor.c mes/abtod.c mes/abtol.c mes/__assert_fail.c mes/assert_msg.c mes/__buffered_read.c mes/__init_io.c mes/cast.c mes/dtoab.c mes/eputc.c mes/eputs.c mes/fdgetc.c mes/fdgets.c mes/fdputc.c mes/fdputs.c mes/fdungetc.c mes/globals.c mes/itoa.c mes/ltoab.c mes/ltoa.c mes/__mes_debug.c mes/mes_open.c mes/ntoab.c mes/oputc.c mes/oputs.c mes/search-path.c mes/ultoa.c mes/utoa.c posix/alarm.c posix/buffered-read.c posix/execl.c posix/execlp.c posix/execv.c posix/execvp.c posix/getcwd.c posix/getenv.c posix/isatty.c posix/mktemp.c posix/open.c posix/raise.c posix/sbrk.c posix/setenv.c posix/sleep.c posix/unsetenv.c posix/wait.c posix/write.c stdio/clearerr.c stdio/fclose.c stdio/fdopen.c stdio/feof.c stdio/ferror.c stdio/fflush.c stdio/fgetc.c stdio/fgets.c stdio/fileno.c stdio/fopen.c stdio/fprintf.c stdio/fputc.c stdio/fputs.c stdio/fread.c stdio/freopen.c stdio/fscanf.c stdio/fseek.c stdio/ftell.c stdio/fwrite.c stdio/getc.c stdio/getchar.c stdio/perror.c stdio/printf.c stdio/putc.c stdio/putchar.c stdio/remove.c stdio/snprintf.c stdio/sprintf.c stdio/sscanf.c stdio/ungetc.c stdio/vfprintf.c stdio/vfscanf.c stdio/vprintf.c stdio/vsnprintf.c stdio/vsprintf.c stdio/vsscanf.c stdlib/abort.c stdlib/abs.c stdlib/alloca.c stdlib/atexit.c stdlib/atof.c stdlib/atoi.c stdlib/atol.c stdlib/calloc.c stdlib/__exit.c stdlib/exit.c stdlib/free.c stdlib/mbstowcs.c stdlib/puts.c stdlib/qsort.c stdlib/realloc.c stdlib/strtod.c stdlib/strtof.c stdlib/strtol.c stdlib/strtold.c stdlib/strtoll.c stdlib/strtoul.c stdlib/strtoull.c string/bcmp.c string/bcopy.c string/bzero.c string/index.c string/memchr.c string/memcmp.c string/memcpy.c string/memmem.c string/memmove.c string/memset.c string/rindex.c string/strcat.c string/strchr.c string/strcmp.c string/strcpy.c string/strcspn.c string/strdup.c string/strerror.c string/strlen.c string/strlwr.c string/strncat.c string/strncmp.c string/strncpy.c string/strpbrk.c string/strrchr.c string/strspn.c string/strstr.c string/strupr.c stub/atan2.c stub/bsearch.c stub/chown.c stub/__cleanup.c stub/cos.c stub/ctime.c stub/exp.c stub/fpurge.c stub/freadahead.c stub/frexp.c stub/getgrgid.c stub/getgrnam.c stub/getlogin.c stub/getpgid.c stub/getpgrp.c stub/getpwnam.c stub/getpwuid.c stub/gmtime.c stub/ldexp.c stub/localtime.c stub/log.c stub/mktime.c stub/modf.c stub/mprotect.c stub/pclose.c stub/popen.c stub/pow.c stub/rand.c stub/rewind.c stub/setbuf.c stub/setgrent.c stub/setlocale.c stub/setvbuf.c stub/sigaction.c stub/sigaddset.c stub/sigblock.c stub/sigdelset.c stub/sigemptyset.c stub/sigsetmask.c stub/sin.c stub/sys_siglist.c stub/system.c stub/sqrt.c stub/strftime.c stub/times.c stub/ttyname.c stub/umask.c stub/utime.c x86-mes-gcc/setjmp.c +catm ../unified-libc.c ctype/isalnum.c ctype/isalpha.c ctype/isascii.c ctype/iscntrl.c ctype/isdigit.c ctype/isgraph.c ctype/islower.c ctype/isnumber.c ctype/isprint.c ctype/ispunct.c ctype/isspace.c ctype/isupper.c ctype/isxdigit.c ctype/tolower.c ctype/toupper.c dirent/closedir.c dirent/__getdirentries.c dirent/opendir.c linux/readdir.c linux/access.c linux/brk.c linux/chdir.c linux/chmod.c linux/clock_gettime.c linux/close.c linux/dup2.c linux/dup.c linux/execve.c linux/fcntl.c linux/fork.c linux/fsync.c linux/fstat.c linux/_getcwd.c linux/getdents.c linux/getegid.c linux/geteuid.c linux/getgid.c linux/getpid.c linux/getppid.c linux/getrusage.c linux/gettimeofday.c linux/getuid.c linux/ioctl.c linux/ioctl3.c linux/kill.c linux/link.c linux/lseek.c linux/lstat.c linux/malloc.c linux/mkdir.c linux/mknod.c linux/nanosleep.c linux/_open3.c linux/pipe.c linux/_read.c linux/readlink.c linux/rename.c linux/rmdir.c linux/setgid.c linux/settimer.c linux/setuid.c linux/signal.c linux/sigprogmask.c linux/symlink.c linux/stat.c linux/time.c linux/unlink.c linux/waitpid.c linux/x86-mes-gcc/_exit.c linux/x86-mes-gcc/syscall.c linux/x86-mes-gcc/_write.c math/ceil.c math/fabs.c math/floor.c mes/abtod.c mes/abtol.c mes/__assert_fail.c mes/assert_msg.c mes/__buffered_read.c mes/__init_io.c mes/cast.c mes/dtoab.c mes/eputc.c mes/eputs.c mes/fdgetc.c mes/fdgets.c mes/fdputc.c mes/fdputs.c mes/fdungetc.c mes/globals.c mes/itoa.c mes/ltoab.c mes/ltoa.c mes/__mes_debug.c mes/mes_open.c mes/ntoab.c mes/oputc.c mes/oputs.c mes/search-path.c mes/ultoa.c mes/utoa.c posix/alarm.c posix/buffered-read.c posix/execl.c posix/execlp.c posix/execv.c posix/execvp.c posix/getcwd.c posix/getenv.c posix/isatty.c posix/mktemp.c posix/open.c posix/raise.c posix/sbrk.c posix/setenv.c posix/sleep.c posix/unsetenv.c posix/wait.c posix/write.c stdio/clearerr.c stdio/fclose.c stdio/fdopen.c stdio/feof.c stdio/ferror.c stdio/fflush.c stdio/fgetc.c stdio/fgets.c stdio/fileno.c stdio/fopen.c stdio/fprintf.c stdio/fputc.c stdio/fputs.c stdio/fread.c stdio/freopen.c stdio/fscanf.c stdio/fseek.c stdio/ftell.c stdio/fwrite.c stdio/getc.c stdio/getchar.c stdio/perror.c stdio/printf.c stdio/putc.c stdio/putchar.c stdio/remove.c stdio/snprintf.c stdio/sprintf.c stdio/sscanf.c stdio/ungetc.c stdio/vfprintf.c stdio/vfscanf.c stdio/vprintf.c stdio/vsnprintf.c stdio/vsprintf.c stdio/vsscanf.c stdlib/abort.c stdlib/abs.c stdlib/alloca.c stdlib/atexit.c stdlib/atof.c stdlib/atoi.c stdlib/atol.c stdlib/calloc.c stdlib/__exit.c stdlib/exit.c stdlib/free.c stdlib/mbstowcs.c stdlib/puts.c stdlib/qsort.c stdlib/realloc.c stdlib/strtod.c stdlib/strtof.c stdlib/strtol.c stdlib/strtold.c stdlib/strtoll.c stdlib/strtoul.c stdlib/strtoull.c string/bcmp.c string/bcopy.c string/bzero.c string/index.c string/memchr.c string/memcmp.c string/memcpy.c string/memmem.c string/memmove.c string/memset.c string/rindex.c string/strcat.c string/strchr.c string/strcmp.c string/strcpy.c string/strcspn.c string/strdup.c string/strerror.c string/strlen.c string/strlwr.c string/strncat.c string/strncmp.c string/strncpy.c string/strpbrk.c string/strrchr.c string/strspn.c string/strstr.c string/strupr.c stub/atan2.c stub/bsearch.c stub/chown.c stub/__cleanup.c stub/cos.c stub/ctime.c stub/exp.c stub/fpurge.c stub/freadahead.c stub/frexp.c stub/getgrgid.c stub/getgrnam.c stub/getlogin.c stub/getpgid.c stub/getpgrp.c stub/getpwnam.c stub/getpwuid.c stub/gmtime.c stub/ldexp.c stub/localtime.c stub/log.c stub/mktime.c stub/modf.c stub/mprotect.c stub/pclose.c stub/popen.c stub/pow.c stub/rand.c stub/rewind.c stub/setbuf.c stub/setgrent.c stub/setlocale.c stub/setvbuf.c stub/sigaction.c stub/sigaddset.c stub/sigblock.c stub/sigdelset.c stub/sigemptyset.c stub/sigsetmask.c stub/sin.c stub/sys_siglist.c stub/system.c stub/sqrt.c stub/strftime.c stub/times.c stub/ttyname.c stub/umask.c stub/utime.c x86-mes-gcc/setjmp.c cd .. # Recompile libc: crt{1,n,i}, libtcc.a, libc.a