#! /bin/sh # GNU Mes --- Maxwell Equations of Software # Copyright © 2019,2020,2022,2023 Jan (janneke) Nieuwenhuizen # # 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 . set -ex ################################################################################ # SYSTEM_LIBC build ## Clean ## rm -rf out-system-libc mkdir out-system-libc ## Configure ## mes_cpu=x86_64 mes_bits=64 cat > include/mes/config.h < out-system-libc/hello.c MES_DEBUG=2 MES=out-system-libc/mes sh -x scripts/mescc -L lib -m $mes_bits -nostdlib \ -I include -I include/$mes_kernel/$mes_cpu \ -o out-system-libc/hello \ out-system-libc/hello.c set +e out-system-libc/hello r=$? if [ $r != 42 ]; then exit 1 fi set -e ################################################################################ # Mes C lib build # To get a i686-unknown-linux-gnu-gcc, you may do: # guix shell # or # guix shell -e '(begin (use-modules (gnu packages cross-base)) (list (cross-binutils "i686-unknown-linux-gnu") (cross-gcc "i686-unknown-linux-gnu")))' ## Clean ## rm -rf out-mes mkdir out-mes ## Configure ## mes_kernel=linux CC=gcc mes_cpu=x86_64 #CC=i686-unknown-linux-gnu-gcc #mes_cpu=x86 cat > include/mes/config.h < out-mes/hello.c MES_DEBUG=2 MES=out-mes/mes sh -x scripts/mescc -L lib -m $mes_bits -nostdlib \ -I include -I include/$mes_kernel/$mes_cpu \ -o out-mes/hello \ out-mes/hello.c set +e out-mes/hello r=$? if [ $r != 42 ]; then exit 1 fi set -e