diff --git a/build-aux/build-mes.sh b/build-aux/build-mes.sh index f4cc4229..4ced2ed0 100755 --- a/build-aux/build-mes.sh +++ b/build-aux/build-mes.sh @@ -1,7 +1,7 @@ #! /bin/sh # GNU Mes --- Maxwell Equations of Software -# Copyright © 2019 Jan (janneke) Nieuwenhuizen +# Copyright © 2019,2021 Jan (janneke) Nieuwenhuizen # # This file is part of GNU Mes. # @@ -60,5 +60,8 @@ then # See . LIBS="${LIBS} -lgcc -lc" fi +if [ "$compiler" = "mescc" ]; then + LIBS="${LIBS} -lc -lmescc" +fi link bin/mes-$compiler cp bin/mes-$compiler bin/mes diff --git a/module/mescc/mescc.scm b/module/mescc/mescc.scm index bb2bd6ae..265215e9 100644 --- a/module/mescc/mescc.scm +++ b/module/mescc/mescc.scm @@ -1,5 +1,5 @@ ;;; GNU Mes --- Maxwell Equations of Software -;;; Copyright © 2016,2017,2018,2019,2020 Jan (janneke) Nieuwenhuizen +;;; Copyright © 2016,2017,2018,2019,2020,2021 Jan (janneke) Nieuwenhuizen ;;; ;;; This file is part of GNU Mes. ;;; @@ -359,10 +359,11 @@ (define (arch-get-machine options) (let* ((machine (option-ref options 'machine #f)) - (arch (option-ref options 'arch #f))) - (or machine - (if (member arch '("x86_64")) "64" - "32")))) + (arch (option-ref options 'arch #f)) + (machine (or machine arch "32"))) + (cond ((member machine '("x86_64")) "64") + ((member machine '("arm")) "32") + (else "32")))) (define (arch-get-m1-macros options) (let ((arch (arch-get options)))