2019-03-23 21:05:35 +00:00
|
|
|
#! /bin/sh
|
|
|
|
|
|
|
|
# GNU Mes --- Maxwell Equations of Software
|
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 11:17:58 +00:00
|
|
|
# Copyright © 2019,2020,2022,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
2019-03-23 21:05:35 +00:00
|
|
|
#
|
|
|
|
# This file is part of GNU Mes.
|
|
|
|
#
|
|
|
|
# GNU Mes is free software; you can redistribute it and/or modify it
|
|
|
|
# under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 3 of the License, or (at
|
|
|
|
# your option) any later version.
|
|
|
|
#
|
|
|
|
# GNU Mes is distributed in the hope that it will be useful, but
|
|
|
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
set -ex
|
|
|
|
|
2019-06-08 13:36:22 +00:00
|
|
|
################################################################################
|
|
|
|
# SYSTEM_LIBC build
|
2019-03-23 21:05:35 +00:00
|
|
|
|
2019-06-08 13:36:22 +00:00
|
|
|
## Clean ##
|
|
|
|
rm -rf out-system-libc
|
|
|
|
mkdir out-system-libc
|
2019-03-23 21:05:35 +00:00
|
|
|
|
2019-06-08 13:36:22 +00:00
|
|
|
## Configure ##
|
|
|
|
mes_cpu=x86_64
|
|
|
|
mes_bits=64
|
|
|
|
cat > include/mes/config.h <<EOF
|
|
|
|
#define SYSTEM_LIBC 1
|
2019-07-26 16:20:32 +00:00
|
|
|
#define MES_VERSION "git"
|
2019-06-08 13:36:22 +00:00
|
|
|
EOF
|
|
|
|
|
|
|
|
## Build ##
|
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 11:17:58 +00:00
|
|
|
gcc -g -D HAVE_CONFIG_H=1 \
|
|
|
|
-I include \
|
|
|
|
-I include/$mes_kernel/$mes_cpu \
|
2022-05-03 21:06:41 +00:00
|
|
|
-o out-system-libc/mes \
|
|
|
|
\
|
|
|
|
lib/mes/eputs.c \
|
|
|
|
lib/mes/oputs.c \
|
|
|
|
\
|
|
|
|
lib/mes/cast.c \
|
|
|
|
lib/mes/itoa.c \
|
|
|
|
lib/mes/ltoa.c \
|
|
|
|
lib/mes/ltoab.c \
|
|
|
|
lib/mes/ultoa.c \
|
|
|
|
lib/mes/utoa.c \
|
|
|
|
lib/mes/eputc.c \
|
|
|
|
lib/mes/fdgetc.c \
|
|
|
|
lib/mes/fdputc.c \
|
|
|
|
lib/mes/fdputs.c \
|
|
|
|
lib/mes/fdungetc.c \
|
|
|
|
lib/mes/mes_open.c \
|
|
|
|
lib/mes/ntoab.c \
|
|
|
|
lib/mes/oputc.c \
|
|
|
|
\
|
|
|
|
lib/mes/__assert_fail.c \
|
|
|
|
lib/mes/assert_msg.c \
|
|
|
|
\
|
|
|
|
src/builtins.c \
|
|
|
|
src/cc.c \
|
|
|
|
src/core.c \
|
|
|
|
src/display.c \
|
|
|
|
src/eval-apply.c \
|
|
|
|
src/gc.c \
|
|
|
|
src/globals.c \
|
|
|
|
src/hash.c \
|
|
|
|
src/lib.c \
|
|
|
|
src/math.c \
|
|
|
|
src/mes.c \
|
|
|
|
src/module.c \
|
|
|
|
src/posix.c \
|
|
|
|
src/reader.c \
|
|
|
|
src/stack.c \
|
|
|
|
src/string.c \
|
|
|
|
src/struct.c \
|
|
|
|
src/symbol.c \
|
2019-06-08 13:36:22 +00:00
|
|
|
src/vector.c
|
|
|
|
|
|
|
|
## Check ##
|
|
|
|
|
|
|
|
# Any light?
|
|
|
|
out-system-libc/mes --help
|
|
|
|
|
|
|
|
# Simplest of tests
|
|
|
|
echo '(display "hello\n")' | MES_BOOT=boot-01.scm out-system-libc/mes
|
|
|
|
|
|
|
|
# Basic test. We should be safe, but there are ~30 more in tests/*.test.
|
|
|
|
MES_DEBUG=4 MES=out-system-libc/mes tests/base.test
|
|
|
|
|
|
|
|
# GC test
|
2020-12-29 14:39:19 +00:00
|
|
|
MES_DEBUG=3 MES_ARENA=10000 MES_MAX_ARENA=10000 MES_BOOT=tests/gc.test out-system-libc/mes
|
2019-03-23 21:05:35 +00:00
|
|
|
|
2019-06-08 13:36:22 +00:00
|
|
|
# MesCC test
|
2020-12-29 14:39:19 +00:00
|
|
|
# Interesting, but compiling multiple C files is not supported (yet).
|
|
|
|
# MES_DEBUG=2 MES=out-system-libc/mes sh -x scripts/mescc -L lib -m $mes_bits -nostdlib\
|
|
|
|
# -I include -I include/$mes_kernel/$mes_cpu\
|
|
|
|
# -o out-system-libc/hello\
|
|
|
|
# lib/linux/$mes_cpu-mes-mescc/crt1.c\
|
|
|
|
# \
|
|
|
|
# lib/mes/eputs.c\
|
|
|
|
# \
|
|
|
|
# lib/linux/$mes_cpu-mes-mescc/_exit.c\
|
|
|
|
# lib/linux/$mes_cpu-mes-mescc/_write.c\
|
|
|
|
# \
|
|
|
|
# lib/mes/globals.c\
|
2022-11-04 19:00:47 +00:00
|
|
|
# lib/mes/write.c\
|
2020-12-29 14:39:19 +00:00
|
|
|
# lib/string/strlen.c\
|
|
|
|
# \
|
|
|
|
# scaffold/hello.c
|
|
|
|
|
|
|
|
cat \
|
|
|
|
lib/linux/$mes_cpu-mes-mescc/crt1.c \
|
|
|
|
\
|
|
|
|
lib/mes/eputs.c \
|
|
|
|
\
|
|
|
|
lib/linux/$mes_cpu-mes-mescc/_exit.c \
|
|
|
|
lib/linux/$mes_cpu-mes-mescc/_write.c \
|
|
|
|
\
|
|
|
|
lib/mes/globals.c \
|
2022-11-04 19:00:47 +00:00
|
|
|
lib/mes/write.c \
|
2020-12-29 14:39:19 +00:00
|
|
|
lib/string/strlen.c \
|
|
|
|
\
|
|
|
|
scaffold/hello.c \
|
|
|
|
> out-system-libc/hello.c
|
|
|
|
|
|
|
|
MES_DEBUG=2 MES=out-system-libc/mes sh -x scripts/mescc -L lib -m $mes_bits -nostdlib \
|
|
|
|
-I include -I include/$mes_kernel/$mes_cpu \
|
|
|
|
-o out-system-libc/hello \
|
|
|
|
out-system-libc/hello.c
|
|
|
|
|
2019-06-08 13:36:22 +00:00
|
|
|
set +e
|
|
|
|
out-system-libc/hello
|
|
|
|
r=$?
|
|
|
|
if [ $r != 42 ]; then
|
|
|
|
exit 1
|
|
|
|
fi
|
2020-12-29 14:39:19 +00:00
|
|
|
set -e
|
2019-03-23 21:05:35 +00:00
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Mes C lib build
|
|
|
|
|
|
|
|
# To get a i686-unknown-linux-gnu-gcc, you may do:
|
2022-04-30 07:44:57 +00:00
|
|
|
# guix shell
|
2019-03-23 21:05:35 +00:00
|
|
|
# or
|
2022-04-30 07:44:57 +00:00
|
|
|
# guix shell -e '(begin (use-modules (gnu packages cross-base)) (list (cross-binutils "i686-unknown-linux-gnu") (cross-gcc "i686-unknown-linux-gnu")))'
|
2019-03-23 21:05:35 +00:00
|
|
|
|
2019-06-08 13:36:22 +00:00
|
|
|
## Clean ##
|
2019-03-23 21:05:35 +00:00
|
|
|
rm -rf out-mes
|
|
|
|
mkdir out-mes
|
|
|
|
|
2019-06-08 13:36:22 +00:00
|
|
|
## Configure ##
|
|
|
|
mes_kernel=linux
|
|
|
|
CC=gcc
|
|
|
|
mes_cpu=x86_64
|
|
|
|
#CC=i686-unknown-linux-gnu-gcc
|
|
|
|
#mes_cpu=x86
|
|
|
|
cat > include/mes/config.h <<EOF
|
|
|
|
// #define SYSTEM_LIBC 0
|
2019-07-26 16:20:32 +00:00
|
|
|
#define MES_VERSION "git"
|
2019-06-08 13:36:22 +00:00
|
|
|
EOF
|
2019-03-23 21:05:35 +00:00
|
|
|
|
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 11:17:58 +00:00
|
|
|
mkdir -p include/arch
|
|
|
|
cp -f include/$mes_kernel/$mes_cpu/kernel-stat.h include/arch
|
|
|
|
cp -f include/$mes_kernel/$mes_cpu/syscall.h include/arch
|
|
|
|
|
2019-06-08 13:36:22 +00:00
|
|
|
## Build ##
|
|
|
|
compiler=gcc # not configurable
|
2022-05-03 21:06:41 +00:00
|
|
|
$CC -g -D HAVE_CONFIG_H=1 \
|
|
|
|
-I include -I include/$mes_kernel/$mes_cpu \
|
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 11:17:58 +00:00
|
|
|
-nostdinc -nostdlib \
|
2022-05-03 21:06:41 +00:00
|
|
|
-fno-builtin -fno-stack-protector \
|
|
|
|
-o out-mes/mes \
|
|
|
|
\
|
|
|
|
lib/linux/$mes_cpu-mes-gcc/crt1.c \
|
|
|
|
\
|
|
|
|
lib/mes/globals.c \
|
|
|
|
lib/mes/eputs.c \
|
|
|
|
lib/mes/oputs.c \
|
|
|
|
\
|
|
|
|
lib/posix/write.c \
|
|
|
|
lib/string/strlen.c \
|
|
|
|
lib/stdlib/puts.c \
|
|
|
|
lib/stdlib/exit.c \
|
|
|
|
lib/$mes_kernel/$mes_cpu-mes-$compiler/_exit.c \
|
|
|
|
lib/$mes_kernel/$mes_cpu-mes-$compiler/_write.c \
|
|
|
|
\
|
|
|
|
lib/mes/cast.c \
|
|
|
|
lib/mes/itoa.c \
|
|
|
|
lib/mes/ltoa.c \
|
|
|
|
lib/mes/ltoab.c \
|
|
|
|
lib/mes/ultoa.c \
|
|
|
|
lib/mes/utoa.c \
|
|
|
|
lib/mes/eputc.c \
|
|
|
|
lib/mes/fdgetc.c \
|
|
|
|
lib/mes/fdputc.c \
|
|
|
|
lib/mes/fdputs.c \
|
|
|
|
lib/mes/fdungetc.c \
|
|
|
|
lib/mes/mes_open.c \
|
|
|
|
lib/mes/ntoab.c \
|
|
|
|
lib/mes/oputc.c \
|
|
|
|
\
|
|
|
|
lib/stdlib/atoi.c \
|
|
|
|
lib/mes/abtol.c \
|
|
|
|
lib/ctype/isdigit.c \
|
|
|
|
lib/ctype/isnumber.c \
|
|
|
|
lib/ctype/isspace.c \
|
|
|
|
lib/ctype/isxdigit.c \
|
|
|
|
\
|
|
|
|
lib/stub/__raise.c \
|
|
|
|
lib/mes/__assert_fail.c \
|
|
|
|
lib/mes/assert_msg.c \
|
|
|
|
lib/mes/__buffered_read.c \
|
|
|
|
lib/mes/__mes_debug.c \
|
|
|
|
lib/posix/execv.c \
|
|
|
|
lib/posix/getcwd.c \
|
|
|
|
lib/posix/getenv.c \
|
|
|
|
lib/posix/isatty.c \
|
|
|
|
lib/posix/open.c \
|
|
|
|
lib/posix/setenv.c \
|
|
|
|
lib/posix/wait.c \
|
|
|
|
lib/stdio/fgetc.c \
|
|
|
|
lib/stdio/fputc.c \
|
|
|
|
lib/stdio/fputs.c \
|
|
|
|
lib/stdio/getc.c \
|
|
|
|
lib/stdio/getchar.c \
|
|
|
|
lib/stdio/putc.c \
|
|
|
|
lib/stdio/putchar.c \
|
|
|
|
lib/stdio/ungetc.c \
|
|
|
|
lib/stdlib/free.c \
|
|
|
|
lib/linux/malloc.c \
|
|
|
|
lib/stdlib/realloc.c \
|
|
|
|
lib/string/memchr.c \
|
|
|
|
lib/string/memcmp.c \
|
|
|
|
lib/string/memcpy.c \
|
|
|
|
lib/string/memmove.c \
|
|
|
|
lib/string/memset.c \
|
|
|
|
lib/string/strcmp.c \
|
|
|
|
lib/string/strcpy.c \
|
|
|
|
lib/string/strncmp.c \
|
|
|
|
\
|
|
|
|
lib/linux/lseek.c \
|
|
|
|
\
|
|
|
|
lib/linux/access.c \
|
|
|
|
lib/linux/brk.c \
|
|
|
|
lib/linux/chmod.c \
|
|
|
|
lib/linux/clock_gettime.c \
|
|
|
|
lib/linux/dup.c \
|
|
|
|
lib/linux/dup2.c \
|
|
|
|
lib/linux/execve.c \
|
|
|
|
lib/linux/fork.c \
|
|
|
|
lib/linux/fsync.c \
|
|
|
|
lib/linux/_getcwd.c \
|
|
|
|
lib/linux/gettimeofday.c \
|
|
|
|
lib/linux/ioctl3.c \
|
|
|
|
lib/linux/_open3.c \
|
|
|
|
lib/linux/read.c \
|
|
|
|
lib/linux/_read.c \
|
|
|
|
lib/linux/time.c \
|
|
|
|
lib/linux/unlink.c \
|
2022-11-15 05:36:07 +00:00
|
|
|
include/sys/resource.h \
|
|
|
|
lib/linux/wait4.c \
|
2022-05-03 21:06:41 +00:00
|
|
|
lib/linux/waitpid.c \
|
|
|
|
lib/linux/$mes_cpu-mes-$compiler/syscall.c \
|
|
|
|
\
|
|
|
|
src/builtins.c \
|
|
|
|
src/cc.c \
|
|
|
|
src/core.c \
|
|
|
|
src/display.c \
|
|
|
|
src/eval-apply.c \
|
|
|
|
src/gc.c \
|
|
|
|
src/globals.c \
|
|
|
|
src/hash.c \
|
|
|
|
src/lib.c \
|
|
|
|
src/math.c \
|
|
|
|
src/mes.c \
|
|
|
|
src/module.c \
|
|
|
|
src/posix.c \
|
|
|
|
src/reader.c \
|
|
|
|
src/stack.c \
|
|
|
|
src/string.c \
|
|
|
|
src/struct.c \
|
|
|
|
src/symbol.c \
|
2019-06-08 13:36:22 +00:00
|
|
|
src/vector.c
|
|
|
|
|
|
|
|
## Check ##
|
|
|
|
|
|
|
|
# Any light?
|
|
|
|
out-mes/mes --help
|
|
|
|
|
|
|
|
# Simplest of tests
|
|
|
|
echo '(display "hello\n")' | MES_BOOT=boot-01.scm out-mes/mes
|
|
|
|
|
|
|
|
# Basic test. We should be safe, but there are ~30 more in tests/*.test.
|
|
|
|
MES_DEBUG=4 MES=out-mes/mes tests/base.test
|
|
|
|
|
|
|
|
# GC test
|
2020-12-29 14:39:19 +00:00
|
|
|
MES_DEBUG=3 MES_ARENA=10000 MES_MAX_ARENA=10000 MES_BOOT=tests/gc.test out-mes/mes
|
2019-06-08 13:36:22 +00:00
|
|
|
|
|
|
|
# MesCC test
|
2020-12-29 14:39:19 +00:00
|
|
|
# Interesting, but compiling multiple C files is not supported (yet).
|
|
|
|
# MES_DEBUG=2 MES=out-mes/mes sh -x scripts/mescc -L lib -m $mes_bits -nostdlib\
|
|
|
|
# -I include -I include/$mes_kernel/$mes_cpu\
|
|
|
|
# -o out-mes/hello\
|
|
|
|
# lib/linux/$mes_cpu-mes-mescc/crt1.c\
|
|
|
|
# \
|
|
|
|
# lib/mes/eputs.c\
|
|
|
|
# \
|
|
|
|
# lib/linux/$mes_cpu-mes-mescc/_exit.c\
|
|
|
|
# lib/linux/$mes_cpu-mes-mescc/_write.c\
|
|
|
|
# \
|
|
|
|
# lib/mes/globals.c\
|
2022-11-04 19:00:47 +00:00
|
|
|
# lib/mes/write.c\
|
2020-12-29 14:39:19 +00:00
|
|
|
# lib/string/strlen.c\
|
|
|
|
# \
|
|
|
|
# scaffold/hello.c
|
|
|
|
|
|
|
|
cat \
|
|
|
|
lib/linux/$mes_cpu-mes-mescc/crt1.c \
|
|
|
|
\
|
|
|
|
lib/mes/eputs.c \
|
|
|
|
\
|
|
|
|
lib/linux/$mes_cpu-mes-mescc/_exit.c \
|
|
|
|
lib/linux/$mes_cpu-mes-mescc/_write.c \
|
|
|
|
\
|
|
|
|
lib/mes/globals.c \
|
2022-11-04 19:00:47 +00:00
|
|
|
lib/mes/write.c \
|
2020-12-29 14:39:19 +00:00
|
|
|
lib/string/strlen.c \
|
|
|
|
\
|
|
|
|
scaffold/hello.c \
|
|
|
|
> out-mes/hello.c
|
|
|
|
|
|
|
|
MES_DEBUG=2 MES=out-mes/mes sh -x scripts/mescc -L lib -m $mes_bits -nostdlib \
|
|
|
|
-I include -I include/$mes_kernel/$mes_cpu \
|
|
|
|
-o out-mes/hello \
|
|
|
|
out-mes/hello.c
|
|
|
|
|
2019-06-08 13:36:22 +00:00
|
|
|
set +e
|
|
|
|
out-mes/hello
|
|
|
|
r=$?
|
|
|
|
if [ $r != 42 ]; then
|
|
|
|
exit 1
|
|
|
|
fi
|
2020-12-29 14:39:19 +00:00
|
|
|
set -e
|