build: Support bootstrapping using build.sh.

* build-aux/build.sh.in: Oops, use $compiler = bootstrap concept does
not exist yet.  Gash cp does not support -p; drop it.
* configure.sh: Oops, set bootstrap to `true' instead of yes.
This commit is contained in:
Jan Nieuwenhuizen 2019-12-19 07:13:06 +01:00
parent 3abd3e0bcc
commit 62193aa1db
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273
2 changed files with 9 additions and 6 deletions

View file

@ -97,7 +97,7 @@ fi
-I ${srcdest}include -I ${srcdest}include
-I ${srcdest}include/$mes_kernel/$mes_cpu -I ${srcdest}include/$mes_kernel/$mes_cpu
" "
if test "$compiler" != bootstrap; then if test $compiler = gcc; then
${SHELL} ${srcdest}build-aux/build-mes.sh ${SHELL} ${srcdest}build-aux/build-mes.sh
fi fi
) )
@ -108,13 +108,16 @@ fi
cd mescc-lib cd mescc-lib
sed -i s,mes_libc=system,mes_libc=mes, config.sh sed -i s,mes_libc=system,mes_libc=mes, config.sh
mkdir -p include/mes mkdir -p include/mes
cp -p ../include/mes/config.h include/mes/config.h cp ../include/mes/config.h include/mes/config.h
sed -i 's,#define SYSTEM_LIBC 1,#undef SYSTEM_LIBC,' include/mes/config.h sed -i 's,#define SYSTEM_LIBC 1,#undef SYSTEM_LIBC,' include/mes/config.h
if test -z "$srcdest"; then if test -z "$srcdest"; then
srcdest=../ srcdest=../
srcdir=../ srcdir=../
fi fi
AM_CPPFLAGS=" ln -sf ${srcdest}mes .
ln -sf ${srcdest}module .
ln -sf ${srcdest}src .
AM_CPPFLAGS="
-D HAVE_CONFIG_H=1 -D HAVE_CONFIG_H=1
-I ${srcdest}lib -I ${srcdest}lib
-I include -I include
@ -122,8 +125,8 @@ fi
-I ${srcdest}include/$mes_kernel/$mes_cpu -I ${srcdest}include/$mes_kernel/$mes_cpu
" "
compiler=mescc compiler=mescc
AR="${srcdest}pre-inst-env mesar" AR=${MESAR-"${srcdest}pre-inst-env mesar"}
CC="${srcdest}pre-inst-env mescc -m $mes_bits" CC=${MESCC-"${srcdest}pre-inst-env mescc -m $mes_bits"}
# No user overrides for MesCC, they are probably intended for GCC # No user overrides for MesCC, they are probably intended for GCC
CFLAGS= CFLAGS=
CPPFLAGS= CPPFLAGS=

View file

@ -122,7 +122,7 @@ subst () {
-e s,"@PACKAGE_NAME@,$PACKAGE_NAME,"\ -e s,"@PACKAGE_NAME@,$PACKAGE_NAME,"\
-e s,"@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,"\ -e s,"@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,"\
-e s,"@VERSION@,$VERSION,"\ -e s,"@VERSION@,$VERSION,"\
-e s,"@bootstrap@,yes,"\ -e s,"@bootstrap@,true,"\
-e s,"@build@,$build,"\ -e s,"@build@,$build,"\
-e s,"@host@,$host,"\ -e s,"@host@,$host,"\
-e s,"@compiler@,$compiler,"\ -e s,"@compiler@,$compiler,"\