From 62193aa1db030c83276b53781ab3226ae328b2f1 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Thu, 19 Dec 2019 07:13:06 +0100 Subject: [PATCH] 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. --- build-aux/build.sh.in | 13 ++++++++----- configure.sh | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/build-aux/build.sh.in b/build-aux/build.sh.in index 05a520ba..db6184b5 100644 --- a/build-aux/build.sh.in +++ b/build-aux/build.sh.in @@ -97,7 +97,7 @@ fi -I ${srcdest}include -I ${srcdest}include/$mes_kernel/$mes_cpu " - if test "$compiler" != bootstrap; then + if test $compiler = gcc; then ${SHELL} ${srcdest}build-aux/build-mes.sh fi ) @@ -108,13 +108,16 @@ fi cd mescc-lib sed -i s,mes_libc=system,mes_libc=mes, config.sh 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 if test -z "$srcdest"; then srcdest=../ srcdir=../ fi - AM_CPPFLAGS=" + ln -sf ${srcdest}mes . + ln -sf ${srcdest}module . + ln -sf ${srcdest}src . + AM_CPPFLAGS=" -D HAVE_CONFIG_H=1 -I ${srcdest}lib -I include @@ -122,8 +125,8 @@ fi -I ${srcdest}include/$mes_kernel/$mes_cpu " compiler=mescc - AR="${srcdest}pre-inst-env mesar" - CC="${srcdest}pre-inst-env mescc -m $mes_bits" + AR=${MESAR-"${srcdest}pre-inst-env mesar"} + CC=${MESCC-"${srcdest}pre-inst-env mescc -m $mes_bits"} # No user overrides for MesCC, they are probably intended for GCC CFLAGS= CPPFLAGS= diff --git a/configure.sh b/configure.sh index 086c18e2..0fe9bad3 100755 --- a/configure.sh +++ b/configure.sh @@ -122,7 +122,7 @@ subst () { -e s,"@PACKAGE_NAME@,$PACKAGE_NAME,"\ -e s,"@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,"\ -e s,"@VERSION@,$VERSION,"\ - -e s,"@bootstrap@,yes,"\ + -e s,"@bootstrap@,true,"\ -e s,"@build@,$build,"\ -e s,"@host@,$host,"\ -e s,"@compiler@,$compiler,"\