build: Split-off x86_mes-gcc build.

* build-aux/build-cc64.sh: New file.
* build-aux/build.sh.in[CC64]: Invoke it.
* build-aux/build-cc.sh: Remove x86_64-mes-gcc build.
* build-aux/GNUmakefile.in (x86_64-mes-gcc): New target.
* build-aux/build-x86_64-mes.sh: Build all scafffold files.
This commit is contained in:
Jan Nieuwenhuizen 2018-10-06 07:08:20 +02:00
parent fed5929f80
commit 6078fa5083
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273
5 changed files with 77 additions and 46 deletions

View file

@ -90,6 +90,9 @@ gcc:
mes-gcc: mes-gcc:
${srcdest}build-aux/build-cc32.sh ${srcdest}build-aux/build-cc32.sh
x86_64-mes-gcc:
${srcdest}build-aux/build-cc64.sh
mes-tcc: mes-tcc:
ifdef TCC ifdef TCC
CC32=$(TCC) ${srcdest}build-aux/build-cc32.sh CC32=$(TCC) ${srcdest}build-aux/build-cc32.sh

View file

@ -23,9 +23,6 @@ set -e
. ${srcdest}build-aux/config.sh . ${srcdest}build-aux/config.sh
. ${srcdest}build-aux/trace.sh . ${srcdest}build-aux/trace.sh
# cc64
LIBC=${LIBC-c}
# native # native
trace "SNARF gc.c" ${srcdest}build-aux/mes-snarf.scm src/gc.c trace "SNARF gc.c" ${srcdest}build-aux/mes-snarf.scm src/gc.c
trace "SNARF lib.c" ${srcdest}build-aux/mes-snarf.scm src/lib.c trace "SNARF lib.c" ${srcdest}build-aux/mes-snarf.scm src/lib.c
@ -35,39 +32,6 @@ trace "SNARF posix.c" ${srcdest}build-aux/mes-snarf.scm src/posix.c
trace "SNARF reader.c" ${srcdest}build-aux/mes-snarf.scm src/reader.c trace "SNARF reader.c" ${srcdest}build-aux/mes-snarf.scm src/reader.c
trace "SNARF vector.c" ${srcdest}build-aux/mes-snarf.scm src/vector.c trace "SNARF vector.c" ${srcdest}build-aux/mes-snarf.scm src/vector.c
# cc64-mes
trace "SNARF.mes gc.c" ${srcdest}build-aux/mes-snarf.scm --mes src/gc.c
trace "SNARF.mes lib.c" ${srcdest}build-aux/mes-snarf.scm --mes src/lib.c
trace "SNARF.mes math.c" ${srcdest}build-aux/mes-snarf.scm --mes src/math.c
trace "SNARF.mes mes.c" ${srcdest}build-aux/mes-snarf.scm --mes src/mes.c
trace "SNARF.mes posix.c" ${srcdest}build-aux/mes-snarf.scm --mes src/posix.c
trace "SNARF.mes reader.c" ${srcdest}build-aux/mes-snarf.scm --mes src/reader.c
trace "SNARF.mes vector.c" ${srcdest}build-aux/mes-snarf.scm --mes src/vector.c
ARCHDIR=1 NOLINK=1 sh ${srcdest}build-aux/cc.sh lib/libmes ARCHDIR=1 NOLINK=1 sh ${srcdest}build-aux/cc.sh lib/libmes
sh ${srcdest}build-aux/cc.sh src/mes sh ${srcdest}build-aux/cc.sh src/mes
ARCHDIR=1 NOLINK=1 sh ${srcdest}build-aux/cc64-mes.sh lib/linux/x86_64-mes-gcc/crt0
ARCHDIR=1 NOLINK=1 sh ${srcdest}build-aux/cc64-mes.sh lib/linux/x86_64-mes-gcc/crt1
ARCHDIR=1 NOLINK=1 sh ${srcdest}build-aux/cc64-mes.sh lib/linux/x86_64-mes-gcc/crti
ARCHDIR=1 NOLINK=1 sh ${srcdest}build-aux/cc64-mes.sh lib/linux/x86_64-mes-gcc/crtn
ARCHDIR=1 NOLINK=1 sh ${srcdest}build-aux/cc64-mes.sh lib/libc-mini
ARCHDIR=1 NOLINK=1 sh ${srcdest}build-aux/cc64-mes.sh lib/libc
ARCHDIR=1 NOLINK=1 sh ${srcdest}build-aux/cc64-mes.sh lib/libc+tcc
ARCHDIR=1 NOLINK=1 sh ${srcdest}build-aux/cc64-mes.sh lib/libtcc1
ARCHDIR=1 NOLINK=1 sh ${srcdest}build-aux/cc64-mes.sh lib/libc+gnu
ARCHDIR=1 NOLINK=1 sh ${srcdest}build-aux/cc64-mes.sh lib/libg
ARCHDIR=1 NOLINK=1 sh ${srcdest}build-aux/cc64-mes.sh lib/libgetopt
LIBC= sh ${srcdest}build-aux/cc64-mes.sh scaffold/main
LIBC=c-mini sh ${srcdest}build-aux/cc64-mes.sh scaffold/hello
LIBC=c-mini sh ${srcdest}build-aux/cc64-mes.sh scaffold/argv
sh ${srcdest}build-aux/cc64-mes.sh scaffold/read
sh ${srcdest}build-aux/cc64-mes.sh scaffold/malloc
sh ${srcdest}build-aux/cc64-mes.sh scaffold/micro-mes
sh ${srcdest}build-aux/cc64-mes.sh scaffold/tiny-mes
# sh ${srcdest}build-aux/cc64-mes.sh scaffold/cons-mes
sh ${srcdest}build-aux/cc64-mes.sh scaffold/mini-mes
sh ${srcdest}build-aux/cc64-mes.sh src/mes
cp src/mes.gcc-out src/mes cp src/mes.gcc-out src/mes

60
build-aux/build-cc64.sh Executable file
View file

@ -0,0 +1,60 @@
#! /bin/sh
# GNU Mes --- Maxwell Equations of Software
# Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
#
# This file is part of GNU Mes.
#
# GNU Mes is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or (at
# your option) any later version.
#
# GNU Mes is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
set -e
. ${srcdest}build-aux/config.sh
. ${srcdest}build-aux/trace.sh
LIBC=${LIBC-c}
# cc64-mes
trace "SNARF.mes gc.c" ${srcdest}build-aux/mes-snarf.scm --mes src/gc.c
trace "SNARF.mes lib.c" ${srcdest}build-aux/mes-snarf.scm --mes src/lib.c
trace "SNARF.mes math.c" ${srcdest}build-aux/mes-snarf.scm --mes src/math.c
trace "SNARF.mes mes.c" ${srcdest}build-aux/mes-snarf.scm --mes src/mes.c
trace "SNARF.mes posix.c" ${srcdest}build-aux/mes-snarf.scm --mes src/posix.c
trace "SNARF.mes reader.c" ${srcdest}build-aux/mes-snarf.scm --mes src/reader.c
trace "SNARF.mes vector.c" ${srcdest}build-aux/mes-snarf.scm --mes src/vector.c
ARCHDIR=1 NOLINK=1 sh ${srcdest}build-aux/cc64-mes.sh lib/linux/x86_64-mes-gcc/crt0
ARCHDIR=1 NOLINK=1 sh ${srcdest}build-aux/cc64-mes.sh lib/linux/x86_64-mes-gcc/crt1
ARCHDIR=1 NOLINK=1 sh ${srcdest}build-aux/cc64-mes.sh lib/linux/x86_64-mes-gcc/crti
ARCHDIR=1 NOLINK=1 sh ${srcdest}build-aux/cc64-mes.sh lib/linux/x86_64-mes-gcc/crtn
ARCHDIR=1 NOLINK=1 sh ${srcdest}build-aux/cc64-mes.sh lib/libc-mini
ARCHDIR=1 NOLINK=1 sh ${srcdest}build-aux/cc64-mes.sh lib/libc
ARCHDIR=1 NOLINK=1 sh ${srcdest}build-aux/cc64-mes.sh lib/libc+tcc
ARCHDIR=1 NOLINK=1 sh ${srcdest}build-aux/cc64-mes.sh lib/libtcc1
ARCHDIR=1 NOLINK=1 sh ${srcdest}build-aux/cc64-mes.sh lib/libc+gnu
ARCHDIR=1 NOLINK=1 sh ${srcdest}build-aux/cc64-mes.sh lib/libg
ARCHDIR=1 NOLINK=1 sh ${srcdest}build-aux/cc64-mes.sh lib/libgetopt
LIBC= sh ${srcdest}build-aux/cc64-mes.sh scaffold/main
LIBC=c-mini sh ${srcdest}build-aux/cc64-mes.sh scaffold/hello
LIBC=c-mini sh ${srcdest}build-aux/cc64-mes.sh scaffold/argv
sh ${srcdest}build-aux/cc64-mes.sh scaffold/read
sh ${srcdest}build-aux/cc64-mes.sh scaffold/malloc
sh ${srcdest}build-aux/cc64-mes.sh scaffold/micro-mes
sh ${srcdest}build-aux/cc64-mes.sh scaffold/tiny-mes
# sh ${srcdest}build-aux/cc64-mes.sh scaffold/cons-mes
sh ${srcdest}build-aux/cc64-mes.sh scaffold/mini-mes
sh ${srcdest}build-aux/cc64-mes.sh src/mes
cp src/mes.x86_64-mes-gcc-out src/mes

View file

@ -133,13 +133,13 @@ ARCHDIR=1 NOLINK=1 bash ${srcdest}build-aux/cc-x86_64-mes.sh lib/libgetopt
[ -n "$SEED" ] && exit 0 [ -n "$SEED" ] && exit 0
MES_ARENA=${MES_ARENA-100000000} MES_ARENA=${MES_ARENA-100000000}
trace "MSNARF gc.c" ./pre-inst-env bash ${srcdest}build-aux/mes-snarf.scm --mes src/gc.c trace "SNARF.mes gc.c" ./pre-inst-env bash ${srcdest}build-aux/mes-snarf.scm --mes src/gc.c
trace "MSNARF lib.c" ./pre-inst-env bash ${srcdest}build-aux/mes-snarf.scm --mes src/lib.c trace "SNARF.mes lib.c" ./pre-inst-env bash ${srcdest}build-aux/mes-snarf.scm --mes src/lib.c
trace "MSNARF math.c" ./pre-inst-env bash ${srcdest}build-aux/mes-snarf.scm --mes src/math.c trace "SNARF.mes math.c" ./pre-inst-env bash ${srcdest}build-aux/mes-snarf.scm --mes src/math.c
trace "MSNARF mes.c" ./pre-inst-env bash ${srcdest}build-aux/mes-snarf.scm --mes src/mes.c trace "SNARF.mes mes.c" ./pre-inst-env bash ${srcdest}build-aux/mes-snarf.scm --mes src/mes.c
trace "MSNARF posix.c" ./pre-inst-env bash ${srcdest}build-aux/mes-snarf.scm --mes src/posix.c trace "SNARF.mes posix.c" ./pre-inst-env bash ${srcdest}build-aux/mes-snarf.scm --mes src/posix.c
trace "MSNARF reader.c" ./pre-inst-env bash ${srcdest}build-aux/mes-snarf.scm --mes src/reader.c trace "SNARF.mes reader.c" ./pre-inst-env bash ${srcdest}build-aux/mes-snarf.scm --mes src/reader.c
trace "MSNARF vector.c" ./pre-inst-env bash ${srcdest}build-aux/mes-snarf.scm --mes src/vector.c trace "SNARF.mes vector.c" ./pre-inst-env bash ${srcdest}build-aux/mes-snarf.scm --mes src/vector.c
echo MES_ARENA=$MES_ARENA echo MES_ARENA=$MES_ARENA
bash ${srcdest}build-aux/cc-x86_64-mes.sh scaffold/main bash ${srcdest}build-aux/cc-x86_64-mes.sh scaffold/main
@ -153,9 +153,9 @@ trace "TEST scaffold/main.x86_64-mes-out" echo scaffold/main.x86_64-mes-ou
MES_LIBS='-l c-mini' bash ${srcdest}build-aux/cc-x86_64-mes.sh scaffold/hello MES_LIBS='-l c-mini' bash ${srcdest}build-aux/cc-x86_64-mes.sh scaffold/hello
MES_LIBS='-l c-mini' bash ${srcdest}build-aux/cc-x86_64-mes.sh scaffold/argv MES_LIBS='-l c-mini' bash ${srcdest}build-aux/cc-x86_64-mes.sh scaffold/argv
bash ${srcdest}build-aux/cc-x86_64-mes.sh scaffold/malloc bash ${srcdest}build-aux/cc-x86_64-mes.sh scaffold/malloc
##sh ${srcdest}build-aux/cc-x86_64-mes.sh scaffold/micro-mes sh ${srcdest}build-aux/cc-x86_64-mes.sh scaffold/micro-mes
##sh ${srcdest}build-aux/cc-x86_64-mes.sh scaffold/tiny-mes sh ${srcdest}build-aux/cc-x86_64-mes.sh scaffold/tiny-mes
# bash ${srcdest}build-aux/cc-x86_64-mes.sh scaffold/mini-mes bash ${srcdest}build-aux/cc-x86_64-mes.sh scaffold/mini-mes
bash ${srcdest}build-aux/cc-x86_64-mes.sh src/mes bash ${srcdest}build-aux/cc-x86_64-mes.sh src/mes
# not yet, broken # not yet, broken
# cp src/mes.x86_64-mes-out src/mes # cp src/mes.x86_64-mes-out src/mes

View file

@ -44,6 +44,10 @@ if [ -n "$CC32" ]; then
sh ${srcdest}build-aux/build-cc32.sh sh ${srcdest}build-aux/build-cc32.sh
fi fi
if [ -n "$CC64" ]; then
sh ${srcdest}build-aux/build-cc64.sh
fi
if [ -n "$TCC" ]; then if [ -n "$TCC" ]; then
CC32=$TCC sh ${srcdest}build-aux/build-cc32.sh CC32=$TCC sh ${srcdest}build-aux/build-cc32.sh
fi fi