build: Update for mes-0.21.

This commit is contained in:
Jan Nieuwenhuizen 2019-09-21 21:28:51 +02:00
parent f90808b155
commit 0585122eb1
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
3 changed files with 30 additions and 2 deletions

10
boot.sh
View File

@ -151,4 +151,14 @@ echo $TCC\
tcc.c\
$LIBTCC1
for i in 1 i n; do
rm -f crt$i.o;
./${PROGRAM_PREFIX}tcc -c crt$i.c
done
rm -f libtcc1.a
./${PROGRAM_PREFIX}tcc -c -g -D TCC_TARGET_I386=1 -o libtcc1.o lib/libtcc1.c
./${PROGRAM_PREFIX}tcc -ar rc libtcc1.a libtcc1.o
cp -f libtcc1.a $prefix/lib/tcc
echo "boot.sh: done"

View File

@ -146,18 +146,29 @@ cp -f libc.a $prefix/lib
cp -f libtcc1.a $prefix/lib/tcc
cp -f libgetopt.a $prefix/lib
export prefix
export CPPFLAGS
TCC=./mes-tcc sh boot.sh
TCC=./boot0-tcc sh boot.sh
TCC=./boot1-tcc sh boot.sh
TCC=./boot2-tcc sh boot.sh
TCC=./boot3-tcc sh boot.sh
TCC=./boot4-tcc sh boot.sh
cmp boot4-tcc boot5-tcc
cp -f boot4-tcc tcc
TCC=./boot5-tcc sh boot.sh
cmp boot5-tcc boot6-tcc
cp -f boot5-tcc tcc
CC=./tcc
AR='./tcc -ar'
if true; then
for i in 1 i n; do
rm -f crt$i.o;
cp -f $MES_PREFIX/lib/crt$i.c .
##cp -f $MES_PREFIX/gcc-lib/x86-mes/crt$i.c .
$CC $CPPFLAGS $CFLAGS -static -nostdlib -nostdinc -c crt$i.c
done
rm -f libc.a
$CC -c $CPPFLAGS $CFLAGS libc.c
$AR cr libc.a libc.o

View File

@ -173,6 +173,13 @@ ln -f boot4-tcc tcc
CC=./tcc
AR='./tcc -ar'
if true; then
for i in 1 i n; do
rm -f crt$i.o;
cp -f $MES_PREFIX/lib/crt$i.c .
##cp -f $MES_PREFIX/gcc-lib/x86-mes/crt$i.c .
$CC $CPPFLAGS $CFLAGS -static -nostdlib -nostdinc -c crt$i.c
done
rm -f libc.a
$CC -c $CPPFLAGS $CFLAGS libc.c
$AR cr libc.a libc.o