Skip to content

Commit

Permalink
bootstrap: use correct flags to produce a working libtcc1.a
Browse files Browse the repository at this point in the history
We were generating good enough libtcc1.a for building next steps in the
bootstrap.sh program but the last one missed symbols. We didn't detect
this because we didn't build anything after it. Until now: tcc-mob
complained about missing symbols.

With this patch we add the necessary flags to the last libtcc1.a
generation, that were missing.

* bootstrap.sh: Add proper build flags in riscv64 rebuilds
  • Loading branch information
ekaitz-zarraga committed Jan 11, 2024
1 parent 7122d8f commit 11960c0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ if $REBUILD_LIBC; then
fi
if [ $mes_cpu = riscv64 ]; then
rm libtcc1.a libtcc1.o
$CC -c -D HAVE_CONFIG_H=1 -I ${MES_PREFIX}/include -I ${MES_PREFIX}/include/linux/${MES_ARCH} -o libtcc1.o ${MES_PREFIX}/lib/libtcc1.c
$CC -c -D HAVE_CONFIG_H=1 -I ${MES_PREFIX}/include -I ${MES_PREFIX}/include/linux/${MES_ARCH} -o lib-arm64.o lib/lib-arm64.c
$CC -c $CPPFLAGS $CFLAGS $CPP_TARGET_FLAG -o libtcc1.o ${MES_LIB}/libtcc1.c
$CC -c $CPPFLAGS $CFLAGS $CPP_TARGET_FLAG -o lib-arm64.o lib/lib-arm64.c
$AR cr libtcc1.a libtcc1.o lib-arm64.o
fi

Expand Down Expand Up @@ -268,8 +268,8 @@ if true; then
cp -f libtcc1-mes.a $prefix/lib/tcc
fi
if [ $mes_cpu = riscv64 ]; then
$CC -c -g $CPPFLAGS $CFLAGS $CPP_TARGET_FLAG lib/lib-arm64.c
$CC -c -g $CPPFLAGS $CFLAGS $CPP_TARGET_FLAG libtcc1.o $MES_LIB/libtcc1.c
$CC -c -g $CPPFLAGS $CFLAGS $CPP_TARGET_FLAG -o lib-arm64.o lib/lib-arm64.c
$CC -c -g $CPPFLAGS $CFLAGS $CPP_TARGET_FLAG -D HAVE_FLOAT=1 -o libtcc1.o $MES_LIB/libtcc1.c
$AR cr libtcc1.a libtcc1.o lib-arm64.o
fi

Expand Down

0 comments on commit 11960c0

Please sign in to comment.