build: Also use stage0_cpu detection in bootstrap.sh build.

* build-aux/build-scaffold.sh: Include cflags.sh.
(stage0_cpu): Move to...
* build-aux/cflags.sh (stage0_cpu): ...here.
* build-aux/build.sh.in (stage0_cpu): Remove.
This commit is contained in:
Jan (janneke) Nieuwenhuizen 2022-05-21 14:13:18 +02:00
parent adb232edd9
commit 06453020e6
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273
3 changed files with 22 additions and 40 deletions

View file

@ -1,7 +1,7 @@
#! /bin/sh #! /bin/sh
# GNU Mes --- Maxwell Equations of Software # GNU Mes --- Maxwell Equations of Software
# Copyright © 2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> # Copyright © 2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
# #
# This file is part of GNU Mes. # This file is part of GNU Mes.
# #
@ -29,6 +29,7 @@ fi
. ./config.sh . ./config.sh
. ${srcdest}build-aux/trace.sh . ${srcdest}build-aux/trace.sh
. ${srcdest}build-aux/cflags.sh
if $courageous; then if $courageous; then
set +e set +e
@ -42,25 +43,6 @@ else
} }
fi fi
case "$mes_cpu" in
arm)
stage0_arch=40
stage0_cpu=armv7l
;;
x86_64)
stage0_arch=2
stage0_cpu=amd64
;;
x86)
stage0_arch=1
stage0_cpu=x86
;;
*)
stage0_arch=1
stage0_cpu=$mes_cpu
;;
esac
trace "CCLD ${srcdest}lib/$mes_kernel/$mes_cpu-mes-$compiler/exit-42.S" $CC\ trace "CCLD ${srcdest}lib/$mes_kernel/$mes_cpu-mes-$compiler/exit-42.S" $CC\
-nostdlib\ -nostdlib\
-g\ -g\

View file

@ -38,25 +38,6 @@ set -u
. ./config.sh . ./config.sh
. ${srcdest}build-aux/cflags.sh . ${srcdest}build-aux/cflags.sh
case "$mes_cpu" in
arm)
stage0_arch=40
stage0_cpu=armv7l
;;
x86_64)
stage0_arch=2
stage0_cpu=amd64
;;
x86)
stage0_arch=1
stage0_cpu=x86
;;
*)
stage0_arch=1
stage0_cpu=$mes_cpu
;;
esac
if $courageous; then if $courageous; then
echo "Applying courage" echo "Applying courage"
set +e set +e

View file

@ -1,5 +1,5 @@
# GNU Mes --- Maxwell Equations of Software # GNU Mes --- Maxwell Equations of Software
# Copyright © 2018,2019,2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> # Copyright © 2018,2019,2020,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
# #
# This file is part of GNU Mes. # This file is part of GNU Mes.
# #
@ -16,6 +16,25 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. # along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
case "$mes_cpu" in
arm)
stage0_arch=40
stage0_cpu=armv7l
;;
x86_64)
stage0_arch=2
stage0_cpu=amd64
;;
x86)
stage0_arch=1
stage0_cpu=x86
;;
*)
stage0_arch=1
stage0_cpu=$mes_cpu
;;
esac
AM_CPPFLAGS=" AM_CPPFLAGS="
-D HAVE_CONFIG_H=1 -D HAVE_CONFIG_H=1
-I ${srcdest}include -I ${srcdest}include