diff --git a/check-boot.sh b/check-boot.sh
index 801a4e92..380611a0 100755
--- a/check-boot.sh
+++ b/check-boot.sh
@@ -110,7 +110,7 @@ for i in $tests; do
echo ' [SKIP]'
continue;
fi
- guile -L guile -L . <(echo '(use-modules (mes guile))'; cat scaffold/boot/$i) >& /dev/null
+ $GUILE -L guile -L . <(echo '(use-modules (mes guile))'; cat scaffold/boot/$i) >& /dev/null
x=$(
if [ -z "${i/5[0-9]-*/}" ]; then
cat scaffold/boot/$i | MES_BOOT=boot-00.scm $MES 2>&1;
diff --git a/check-mescc.sh b/check-mescc.sh
index 42b783a0..598a7464 100755
--- a/check-mescc.sh
+++ b/check-mescc.sh
@@ -19,14 +19,13 @@
# along with Mes. If not, see .
export MES=${MES-src/mes}
-export MESCC=${MESCC-scripts/mescc.mes}
+export MESCC=${MESCC-scripts/mescc}
#export MES_ARENA=${MES_ARENA-200000000} > 12GB mem
GUILE=${GUILE-guile}
MES=${MES-src/mes}
M1=${M1-M1}
HEX2=${HEX2-hex2}
-MESCC=${MESCC-guile/mescc.scm}
MES_PREFIX=${MES_PREFIX-.}
# $MESCC -E -o lib/crt1.E lib/crt1.c
diff --git a/guile/guix/make.scm b/guile/guix/make.scm
index 724da3b6..470c920c 100644
--- a/guile/guix/make.scm
+++ b/guile/guix/make.scm
@@ -385,16 +385,18 @@
"-o" ,(target-file-name t)
,@input-files)))))))
-(define %MESCC "guile/mescc.scm")
+(define %MESCC "scripts/mescc")
(define* (CC.mescc #:key (cc %MESCC))
(method (name "CC.mescc")
(build (lambda (o t)
(let ((input-files (map target-file-name (target-inputs t))))
(format #t " ~a\t ~a -> ~a\n" (method-name o) (string-join input-files) (target-file-name t))
+ (setenv "MES" "guile")
(apply system**
- `("guile/mescc.scm" "-c"
+ `("scripts/mescc" "-c"
"-o" ,(target-file-name t)
- ,@input-files)))))
+ ,@input-files))
+ (unsetenv "MES"))))
(inputs (list (store #:add-file "guile/language/c99/info.go")
(store #:add-file "guile/language/c99/compiler.go")
(store #:add-file "guile/mes/as-i386.go")
diff --git a/guile/mescc.scm b/guile/mescc.scm
deleted file mode 100755
index e96cb800..00000000
--- a/guile/mescc.scm
+++ /dev/null
@@ -1,158 +0,0 @@
-#! /bin/sh
-# -*-scheme-*-
-GODIR=${GODIR-@GODIR@}
-GUILEDIR=${GUILEDIR-@GUILEDIR@}
-[ "$GODIR" = @"GODIR"@ ] && GODIR=$(dirname $0)
-[ "$GUILEDIR" = @"GUILEDIR"@ ] && GUILEDIR=$(dirname $0)
-export GUILE_AUTO_COMPILE=${GUILE_AUTO_COMPILE-0}
-GUILE_LOAD_COMPILED_PATH=$GODIR:$GUILE_LOAD_COMPILED_PATH
-exec ${GUILE-guile} -L $GUILEDIR -e '(mescc)' -s "$0" "$@"
-!#
-
-;;; Mes --- The Maxwell Equations of Software
-;;; Copyright © 2016,2017,2018 Jan (janneke) Nieuwenhuizen
-;;;
-;;; This file is part of GNU Guix.
-;;;
-;;; 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.
-;;;
-;;; 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 Mes. If not, see .
-
-;; The Maxwell Equations of Software -- John McCarthy page 13
-;; http://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf
-
-#!
-Run with Guile-1.8:
-GUILE='~/src/guile-1.8/build/pre-inst-guile --debug -q' guile/mescc.scm
-!#
-
-(define-module (mescc)
- #:use-module (language c99 info)
- #:use-module (language c99 compiler)
- #:use-module (mes elf)
- #:use-module (mes M1)
- #:use-module (ice-9 getopt-long)
- #:use-module (ice-9 pretty-print)
- #:use-module (srfi srfi-1)
- #:use-module (srfi srfi-26)
- #:export (main))
-
-(cond-expand
- (guile-2)
- (guile
- (use-modules (ice-9 syncase))))
-
-(define %prefix (if (string-prefix? "@PREFIX" "@PREFIX@") (or (getenv "MES_PREFIX") "") "@PREFIX@"))
-(module-define! (resolve-module '(language c99 compiler)) '%prefix %prefix)
-
-(define (parse-opts args)
- (let* ((option-spec
- '((c (single-char #\c))
- (define (single-char #\D) (value #t))
- (E (single-char #\E))
- (g (single-char #\g))
- (help (single-char #\h))
- (include (single-char #\I) (value #t))
- (o (single-char #\o) (value #t))
- (version (single-char #\V) (value #t))))
- (options (getopt-long args option-spec))
- (help? (option-ref options 'help #f))
- (files (option-ref options '() '()))
- (usage? (and (not help?) (null? files)))
- (version? (option-ref options 'version #f)))
- (or
- (and version?
- (format (current-output-port) "mescc.scm (mes) ~a\n" %version))
- (and (or help? usage?)
- (format (or (and usage? (current-error-port)) (current-output-port)) "\
-Usage: mescc.scm [OPTION]... FILE...
- -c compile and assemble, but do not link
- -D DEFINE define DEFINE
- -E preprocess only; do not compile, assemble or link
- -g add debug info [GDB, objdump] TODO: hex2 footer
- -h, --help display this help and exit
- -I DIR append DIR to include path
- -o FILE write output to FILE
- -v, --version display version and exit
-")
- (exit (or (and usage? 2) 0)))
- options)))
-
-(define (read-object file)
- (let ((char (with-input-from-file file read-char)))
- (if (eq? char #\#) (error "hex2 format not supported:" file)))
- (with-input-from-file file read))
-
-(define (main:ast->info file)
- (let ((ast (with-input-from-file file read)))
- (c99-ast->info ast)))
-
-(define (source->ast defines includes)
- (lambda (file)
- (with-input-from-file file
- (lambda ()
- (pretty-print (c99-input->ast #:defines defines #:includes includes))))))
-
-(define (source->info defines includes)
- (lambda (file)
- (with-input-from-file file
- (lambda ()
- ((c99-input->info #:defines defines #:includes includes))))))
-
-(define (ast? o)
- (or (string-suffix? ".E" o)
- (string-suffix? ".guile-E" o)))
-
-(define (object? o)
- (or (string-suffix? ".o" o)
- (string-suffix? ".guile-o" o)))
-
-(define (main args)
- (let* ((options (parse-opts args))
- (files (option-ref options '() '()))
- (file (car files))
- (preprocess? (option-ref options 'E #f))
- (compile? (option-ref options 'c #f))
- (debug-info? (option-ref options 'g #f))
- (asts (filter ast? files))
- (objects (filter object? files))
- (sources (filter (cut string-suffix? ".c" <>) files))
- (base (substring file (1+ (or (string-rindex file #\/) -1)) (- (string-length file) 2)))
- (out (option-ref options 'o (cond (compile? (string-append base ".o"))
- (preprocess? (string-append base ".E"))
- (else "a.out"))))
- (multi-opt (lambda (option) (lambda (o) (and (eq? (car o) option) (cdr o)))))
- (defines (reverse (filter-map (multi-opt 'define) options)))
- (includes (reverse (filter-map (multi-opt 'include) options))))
- (setenv "NYACC_TRACE" "yes")
- (when (getenv "MES_DEBUG") (format (current-error-port) "options=~s\n" options)
- (format (current-error-port) "output: ~a\n" out))
- (if (and (pair? sources) (pair? objects)) (error "cannot mix source and object files:" files))
- (with-output-to-file out
- (lambda ()
- (if (and (not compile?)
- (not preprocess?)) (set-port-encoding! (current-output-port) "ISO-8859-1"))
- (cond ((pair? objects) (let ((objects (map read-object objects)))
- (if compile? (objects->M1 objects)
- (objects->elf objects))))
- ((pair? asts) (let* ((infos (map main:ast->info asts))
- (objects (map info->object infos)))
- (if compile? (objects->M1 objects)
- (objects->elf objects))))
- ((pair? sources) (if preprocess? (map (source->ast defines includes) sources)
- (let* ((infos (map (source->info defines includes) sources))
- (objects (map info->object infos)))
- (if compile? (objects->M1 objects)
- (objects->elf objects))))))))
- (if (and (not compile?)
- (not preprocess?))
- (chmod out #o755))))
diff --git a/install.sh b/install.sh
index 6f5f4063..9e60e044 100755
--- a/install.sh
+++ b/install.sh
@@ -20,11 +20,9 @@ cp crt1.hex2 $MES_PREFIX/lib/crt1.hex2
cp libc-mes.hex2 $MES_PREFIX/lib/libc-mes.hex2
cp libc+tcc-mes.hex2 $MES_PREFIX/lib/libc+tcc-mes.hex2
-cp scripts/mescc.mes $PREFIX/bin/mescc.mes
+cp scripts/mescc $PREFIX/bin/mescc
sed -e "s,@PREFIX@,$MES_PREFIX,g" \
- scripts/mescc.mes > $PREFIX/bin/mescc.mes
-sed -e "s,@PREFIX@,$MES_PREFIX,g" \
- guile/mescc.scm > $PREFIX/bin/mescc.scm
+ scripts/mescc > $PREFIX/bin/mescc
mkdir -p $MES_PREFIX
tar -cf- doc guile include lib module scaffold stage0 | tar -xf- -C $MES_PREFIX
diff --git a/make.scm b/make.scm
index 6bb41654..20a3ff28 100755
--- a/make.scm
+++ b/make.scm
@@ -507,11 +507,7 @@ exec ${GUILE-guile} --no-auto-compile -L . -L guile -C . -C guile -s "$0" ${1+"$
(add-target (group "check-tests" #:dependencies (filter (target-prefix? "check-tests/") %targets)))
-;; FIXME: run tests/base.test
-(setenv "MES" "src/mes.guile")
-
-(add-target (install "guile/mescc.scm" #:dir "bin" #:substitutes #t))
-(add-target (install "scripts/mescc.mes" #:dir "bin" #:substitutes #t))
+(add-target (install "scripts/mescc" #:dir "bin" #:substitutes #t))
(define bootstrap? #f)
(if bootstrap?
(add-target (install "src/mes.mes" #:dir "bin" #:installed-name "mes"))
@@ -539,7 +535,7 @@ exec ${GUILE-guile} --no-auto-compile -L . -L guile -C . -C guile -s "$0" ${1+"$
"module/mes/as.mes"
"module/mes/as.scm"
"module/mes/base.mes"
- "module/mes/boot-0.scm"
+ ;;"module/mes/boot-0.scm"
"module/mes/boot-00.scm"
"module/mes/boot-01.scm"
"module/mes/boot-02.scm"
diff --git a/scripts/mes b/scripts/mes
new file mode 120000
index 00000000..2e8dd05b
--- /dev/null
+++ b/scripts/mes
@@ -0,0 +1 @@
+../src/mes.gcc
\ No newline at end of file
diff --git a/scripts/mescc.mes b/scripts/mescc
similarity index 63%
rename from scripts/mescc.mes
rename to scripts/mescc
index 66ce1e5a..eb7d4b9b 100755
--- a/scripts/mescc.mes
+++ b/scripts/mescc
@@ -1,17 +1,28 @@
#! /bin/sh
# -*-scheme-*-
-MES=${MES-$(dirname $0)/mes}
-PREFIX=${PREFIX-@PREFIX@}
-MES_PREFIX=${MES_PREFIX-$PREFIX}
-if [ "$MES_PREFIX" = @PREFIX""@ ]
-then
- MES_PREFIX=$(cd $(dirname $0)/.. && pwd)
- export MES_PREFIX
+mes_p=$(type -p mes)
+if [ '(' -z "$mes_p" -a -z "$MES" ')' -o "$MES" = "guile" -o "$MES" = "mes.guile" ]; then
+ GODIR=${GODIR-@GODIR@}
+ GUILEDIR=${GUILEDIR-@GUILEDIR@}
+ [ "$GODIR" = @"GODIR"@ ] && GODIR=$(dirname $0)
+ [ "$GUILEDIR" = @"GUILEDIR"@ ] && GUILEDIR=$(dirname $0)/../guile
+ export GUILE_AUTO_COMPILE=${GUILE_AUTO_COMPILE-0}
+ GUILE_LOAD_COMPILED_PATH=$GODIR:$GUILE_LOAD_COMPILED_PATH
+ exec ${GUILE-guile} -L $GUILEDIR -e '(mescc)' -s "$0" "$@"
+else
+ MES=${MES-$(dirname $0)/mes}
+ PREFIX=${PREFIX-@PREFIX@}
+ MES_PREFIX=${MES_PREFIX-$PREFIX}
+ if [ "$MES_PREFIX" = @PREFIX""@ ]
+ then
+ MES_PREFIX=$(cd $(dirname $0)/.. && pwd)
+ export MES_PREFIX
+ fi
+ MES_MODULEDIR=${MES_MODULEDIR-$MES_PREFIX/"module"}
+ export MES_MODULEDIR
+ $MES -s $0 "$@"
+ exit $?
fi
-MES_MODULEDIR=${MES_MODULEDIR-$MES_PREFIX/"module"}
-export MES_MODULEDIR
-$MES -s $0 "$@"
-exit $?
!#
;;; Mes --- Maxwell Equations of Software
@@ -32,15 +43,38 @@ exit $?
;;; You should have received a copy of the GNU General Public License
;;; along with Mes. If not, see .
-;;; Commentary:
+#!
+Run with Guile-1.8:
+GUILE='~/src/guile-1.8/build/pre-inst-guile --debug -q' scripts/mescc
+!#
-;;; mescc.mes is a proof-of-concept simplistic C compiler and linker
+(define-module (mescc)
+ #:use-module (language c99 info)
+ #:use-module (language c99 compiler)
+ #:use-module (mes elf)
+ #:use-module (mes M1)
+ #:use-module (ice-9 getopt-long)
+ #:use-module (ice-9 pretty-print)
+ #:use-module (srfi srfi-1)
+ #:use-module (srfi srfi-26)
+ #:export (main))
-;;; Code:
+(define %prefix (if (string-prefix? "@PREFIX" "@PREFIX@") (or (getenv "MES_PREFIX") "") "@PREFIX@"))
-;;LALR
-;;(mes-use-module (language c compiler))
-;;Nyacc
+(cond-expand
+ (mes
+ (define %scheme "mes"))
+ (guile-2
+ (define %scheme "guile")
+ (define-macro (mes-use-module . rest) #t)
+ (module-define! (resolve-module '(language c99 compiler)) '%prefix %prefix))
+ (guile
+ (use-modules (ice-9 syncase))
+ (define %scheme "guile")
+ (define-macro (mes-use-module . rest) #t)
+ (module-define! (resolve-module '(language c99 compiler)) '%prefix %prefix)))
+
+(define guile? (equal? %scheme "guile"))
(mes-use-module (mes guile))
(mes-use-module (mes getopt-long))
@@ -53,9 +87,7 @@ exit $?
(mes-use-module (srfi srfi-1))
(mes-use-module (srfi srfi-26))
-(format (current-error-port) "mescc.mes...\n")
-
-(define %prefix (if (string-prefix? "@PREFIX" "@PREFIX@") (or (getenv "MES_PREFIX") "") "@PREFIX@"))
+(format (current-error-port) "mescc[~a]...\n" %scheme)
(define (parse-opts args)
(let* ((option-spec
@@ -66,7 +98,8 @@ exit $?
(help (single-char #\h))
(include (single-char #\I) (value #t))
(o (single-char #\o) (value #t))
- (version (single-char #\V))))
+ (version (single-char #\V))
+ (write (single-char #\w) (value #t))))
(options (getopt-long args option-spec))
(help? (option-ref options 'help #f))
(files (option-ref options '() '()))
@@ -74,10 +107,10 @@ exit $?
(version? (option-ref options 'version #f)))
(or
(and version?
- (format (current-output-port) "mescc.scm (mes) ~a\n" %version))
+ (format (current-output-port) "mescc (mes) ~a\n" %version))
(and (or help? usage?)
(format (or (and usage? (current-error-port)) (current-output-port)) "\
-Usage: mescc.mes [OPTION]... FILE...
+Usage: mescc [OPTION]... FILE...
-c compile and assemble, but do not link
-D DEFINE define DEFINE
-E preprocess only; do not compile, assemble or link
@@ -86,6 +119,13 @@ Usage: mescc.mes [OPTION]... FILE...
-I DIR append DIR to include path
-o FILE write output to FILE
-v, --version display version and exit
+ -w,--write=TYPE dump Nyacc AST using TYPE {pretty-print,write}
+
+Environment variables:
+
+ MES=BINARY run on mes-executable BINARY {mes,guile}
+ MES_DEBUG=LEVEL show debug output with verbosity LEVEL {0..5}
+ NYACC_TRACE=1 show Nyacc progress
")
(exit (or (and usage? 2) 0)))
options)))
@@ -99,7 +139,7 @@ Usage: mescc.mes [OPTION]... FILE...
(let ((ast (with-input-from-file file read)))
(c99-ast->info ast)))
-(define (source->ast defines includes)
+(define (source->ast write defines includes)
(lambda (file)
(with-input-from-file file
(lambda ()
@@ -113,11 +153,11 @@ Usage: mescc.mes [OPTION]... FILE...
(define (ast? o)
(or (string-suffix? ".E" o)
- (string-suffix? ".mes-E" o)))
+ (string-suffix? (string-append "." %scheme "-E") o)))
(define (object? o)
(or (string-suffix? ".o" o)
- (string-suffix? ".mes-o" o)))
+ (string-suffix? (string-append "." %scheme "-o") o)))
(define (main args)
(let* ((options (parse-opts args))
@@ -135,14 +175,18 @@ Usage: mescc.mes [OPTION]... FILE...
(else "a.out"))))
(multi-opt (lambda (option) (lambda (o) (and (eq? (car o) option) (cdr o)))))
(defines (reverse (filter-map (multi-opt 'define) options)))
- (includes (reverse (filter-map (multi-opt 'include) options))))
- (setenv "NYACC_TRACE" "yes")
- (when (getenv "MES_DEBUG") (format (current-error-port) "options=~s\n" options)
- (format (current-error-port) "output: ~a\n" out))
+ (includes (reverse (filter-map (multi-opt 'include) options)))
+ (pretty-print/write (string->symbol (option-ref options 'write (if guile? "pretty-print" "write"))))
+ (pretty-print/write (if (eq? pretty-print/write 'pretty-print) pretty-print write)))
+ (when (getenv "MES_DEBUG")
+ (setenv "NYACC_TRACE" "yes")
+ (format (current-error-port) "options=~s\n" options)
+ (format (current-error-port) "output: ~a\n" out))
(if (and (pair? sources) (pair? objects)) (error "cannot mix source and object files:" files))
- (with-output-to-port (open-output-file out (if (and (not compile?)
- (not preprocess?)) S_IRWXU))
+ (with-output-to-file out
(lambda ()
+ (if (and (not compile?)
+ (not preprocess?)) (set-port-encoding! (current-output-port) "ISO-8859-1"))
(cond ((pair? objects) (let ((objects (map read-object objects)))
(if compile? (objects->M1 objects)
(objects->elf objects))))
@@ -150,7 +194,7 @@ Usage: mescc.mes [OPTION]... FILE...
(objects (map info->object infos)))
(if compile? (objects->M1 objects)
(objects->elf objects))))
- ((pair? sources) (if preprocess? (map (source->ast defines includes) sources)
+ ((pair? sources) (if preprocess? (map (source->ast pretty-print/write defines includes) sources)
(let* ((infos (map (source->info defines includes) sources))
(objects (map info->object infos)))
(if compile? (objects->M1 objects)
diff --git a/test.sh b/test.sh
index f1abf12c..2f6c1c76 100755
--- a/test.sh
+++ b/test.sh
@@ -26,7 +26,8 @@ rm -f "$t".mes-out
M1=${M1-M1}
HEX2=${HEX2-hex2}
-MESCC=${MESCC-guile/mescc.scm}
+MES=${MES-guile}
+MESCC=${MESCC-scripts/mescc}
sh $MESCC -E -o scaffold/tests/$t.E scaffold/tests/$t.c
sh $MESCC -c -o scaffold/tests/$t.M1 scaffold/tests/$t.E
diff --git a/tests/base.test b/tests/base.test
index e9942df9..eee59548 100755
--- a/tests/base.test
+++ b/tests/base.test
@@ -1,6 +1,6 @@
#! /bin/sh
# -*-scheme-*-
-MES=${MES-$(dirname $0)/../src/mes}
+MES=${MES-$(dirname $0)/../src/mes.gcc}
$MES -s $0
exit $?
!#
diff --git a/tests/boot.test b/tests/boot.test
index 753f4b6c..121540c6 100755
--- a/tests/boot.test
+++ b/tests/boot.test
@@ -1,6 +1,6 @@
#! /bin/sh
# -*-scheme-*-
-MES=${MES-$(dirname $0)/../src/mes}
+MES=${MES-$(dirname $0)/../src/mes.gcc}
export MES_BOOT=boot-02.scm
$MES < $0
exit $?
diff --git a/tests/catch.test b/tests/catch.test
index 03029424..f3390ef8 100755
--- a/tests/catch.test
+++ b/tests/catch.test
@@ -1,6 +1,6 @@
#! /bin/sh
# -*-scheme-*-
-MES=${MES-$(dirname $0)/../src/mes}
+MES=${MES-$(dirname $0)/../src/mes.gcc}
#export MES_ARENA=${MES_ARENA-40000}
$MES -s $0
exit $?
diff --git a/tests/closure.test b/tests/closure.test
index 7ec5a706..11dab07d 100755
--- a/tests/closure.test
+++ b/tests/closure.test
@@ -1,6 +1,6 @@
#! /bin/sh
# -*-scheme-*-
-MES=${MES-$(dirname $0)/../src/mes}
+MES=${MES-$(dirname $0)/../src/mes.gcc}
#export MES_ARENA=${MES_ARENA-40000}
$MES -s $0
exit $?
diff --git a/tests/cwv.test b/tests/cwv.test
index 0676cc55..dfc6b7ee 100755
--- a/tests/cwv.test
+++ b/tests/cwv.test
@@ -1,6 +1,6 @@
#! /bin/sh
# -*-scheme-*-
-MES=${MES-$(dirname $0)/../src/mes}
+MES=${MES-$(dirname $0)/../src/mes.gcc}
#export MES_ARENA=${MES_ARENA-40000}
$MES -s $0
exit $?
diff --git a/tests/display.test b/tests/display.test
index 88d49647..a2d244d2 100755
--- a/tests/display.test
+++ b/tests/display.test
@@ -1,6 +1,6 @@
#! /bin/sh
# -*-scheme-*-
-MES=${MES-$(dirname $0)/../src/mes}
+MES=${MES-$(dirname $0)/../src/mes.gcc}
$MES -s $0
exit $?
!#
diff --git a/tests/fluids.test b/tests/fluids.test
index 0ddb05c3..ea9521cf 100755
--- a/tests/fluids.test
+++ b/tests/fluids.test
@@ -1,6 +1,6 @@
#! /bin/sh
# -*-scheme-*-
-MES=${MES-$(dirname $0)/../src/mes}
+MES=${MES-$(dirname $0)/../src/mes.gcc}
#export MES_ARENA=${MES_ARENA-40000}
$MES -s $0
exit $?
diff --git a/tests/getopt-long.test b/tests/getopt-long.test
index ae835c5e..525c7194 100755
--- a/tests/getopt-long.test
+++ b/tests/getopt-long.test
@@ -1,6 +1,6 @@
#! /bin/sh
# -*-scheme-*-
-MES=${MES-$(dirname $0)/../src/mes}
+MES=${MES-$(dirname $0)/../src/mes.gcc}
#export MES_ARENA=${MES_ARENA-40000}
$MES -s $0
exit $?
diff --git a/tests/guile.test b/tests/guile.test
index 8aed9e84..98699a29 100755
--- a/tests/guile.test
+++ b/tests/guile.test
@@ -1,6 +1,6 @@
#! /bin/sh
# -*-scheme-*-
-MES=${MES-$(dirname $0)/../src/mes}
+MES=${MES-$(dirname $0)/../src/mes.gcc}
#export MES_ARENA=${MES_ARENA-40000}
$MES -s $0
exit $?
diff --git a/tests/let-syntax.test b/tests/let-syntax.test
index 2037a3da..b2860c35 100755
--- a/tests/let-syntax.test
+++ b/tests/let-syntax.test
@@ -1,6 +1,6 @@
#! /bin/sh
# -*-scheme-*-
-MES=${MES-$(dirname $0)/../src/mes}
+MES=${MES-$(dirname $0)/../src/mes.gcc}
#export MES_ARENA=${MES_ARENA-40000}
$MES -s $0
exit $?
diff --git a/tests/let.test b/tests/let.test
index 9a630919..8983036a 100755
--- a/tests/let.test
+++ b/tests/let.test
@@ -1,6 +1,6 @@
#! /bin/sh
# -*-scheme-*-
-MES=${MES-$(dirname $0)/../src/mes}
+MES=${MES-$(dirname $0)/../src/mes.gcc}
#export MES_ARENA=${MES_ARENA-40000}
$MES -s $0
exit $?
diff --git a/tests/match.test b/tests/match.test
index 73e7876c..d65129a0 100755
--- a/tests/match.test
+++ b/tests/match.test
@@ -1,6 +1,6 @@
#! /bin/sh
# -*-scheme-*-
-MES=${MES-$(dirname $0)/../src/mes}
+MES=${MES-$(dirname $0)/../src/mes.gcc}
#export MES_ARENA=${MES_ARENA-40000}
$MES -s $0
exit $?
diff --git a/tests/math.test b/tests/math.test
index f66c8c67..cdcd40fa 100755
--- a/tests/math.test
+++ b/tests/math.test
@@ -1,6 +1,6 @@
#! /bin/sh
# -*-scheme-*-
-MES=${MES-$(dirname $0)/../src/mes}
+MES=${MES-$(dirname $0)/../src/mes.gcc}
#export MES_ARENA=${MES_ARENA-40000}
$MES -s $0
exit $?
diff --git a/tests/module.test b/tests/module.test
index 4659dd78..7c1c0b4c 100755
--- a/tests/module.test
+++ b/tests/module.test
@@ -1,6 +1,6 @@
#! /bin/sh
# -*-scheme-*-
-MES=${MES-$(dirname $0)/../src/mes}
+MES=${MES-$(dirname $0)/../src/mes.gcc}
#export MES_ARENA=${MES_ARENA-40000}
$MES -s $0
exit $?
diff --git a/tests/optargs.test b/tests/optargs.test
index 03e5ff67..9fcb2e1c 100755
--- a/tests/optargs.test
+++ b/tests/optargs.test
@@ -1,6 +1,6 @@
#! /bin/sh
# -*-scheme-*-
-MES=${MES-$(dirname $0)/../src/mes}
+MES=${MES-$(dirname $0)/../src/mes.gcc}
#export MES_ARENA=${MES_ARENA-40000}
$MES -s $0
exit $?
diff --git a/tests/peg.test b/tests/peg.test
index 59783418..9753a5a1 100755
--- a/tests/peg.test
+++ b/tests/peg.test
@@ -1,6 +1,6 @@
#! /bin/sh
# -*-scheme-*-
-MES=${MES-$(dirname $0)/../src/mes}
+MES=${MES-$(dirname $0)/../src/mes.gcc}
#export MES_ARENA=${MES_ARENA-166000000}
$MES -s $0
exit $?
diff --git a/tests/pmatch.test b/tests/pmatch.test
index 247354c0..5f844def 100755
--- a/tests/pmatch.test
+++ b/tests/pmatch.test
@@ -1,6 +1,6 @@
#! /bin/sh
# -*-scheme-*-
-MES=${MES-$(dirname $0)/../src/mes}
+MES=${MES-$(dirname $0)/../src/mes.gcc}
#export MES_ARENA=${MES_ARENA-40000}
$MES -s $0
exit $?
diff --git a/tests/psyntax.test b/tests/psyntax.test
index 088f9faa..61f0ff60 100755
--- a/tests/psyntax.test
+++ b/tests/psyntax.test
@@ -1,6 +1,6 @@
#! /bin/sh
# -*-scheme-*-
-MES=${MES-$(dirname $0)/../src/mes}
+MES=${MES-$(dirname $0)/../src/mes.gcc}
#export MES_ARENA=${MES_ARENA-200000}
$MES -s $0
exit $?
diff --git a/tests/quasiquote.test b/tests/quasiquote.test
index cdeb7c3f..6904b8b5 100755
--- a/tests/quasiquote.test
+++ b/tests/quasiquote.test
@@ -1,6 +1,6 @@
#! /bin/sh
# -*-scheme-*-
-MES=${MES-$(dirname $0)/../src/mes}
+MES=${MES-$(dirname $0)/../src/mes.gcc}
#export MES_ARENA=${MES_ARENA-40000}
$MES -s $0
#paredit:||
diff --git a/tests/read.test b/tests/read.test
index 1b470f8a..25dd9faf 100755
--- a/tests/read.test
+++ b/tests/read.test
@@ -1,7 +1,7 @@
#! /bin/sh
# -*-scheme-*-
# ***REMOVE THIS BLOCK COMMENT INITIALLY***
-MES=${MES-$(dirname $0)/../src/mes}
+MES=${MES-$(dirname $0)/../src/mes.gcc}
$MES -s $0
exit $?
!#
diff --git a/tests/record.test b/tests/record.test
index 9b21cb5b..342fbb96 100755
--- a/tests/record.test
+++ b/tests/record.test
@@ -1,6 +1,6 @@
#! /bin/sh
# -*-scheme-*-
-MES=${MES-$(dirname $0)/../src/mes}
+MES=${MES-$(dirname $0)/../src/mes.gcc}
#export MES_ARENA=${MES_ARENA-40000}
$MES -s $0
exit $?
diff --git a/tests/scm.test b/tests/scm.test
index 6a9277bb..bb4c2cc4 100755
--- a/tests/scm.test
+++ b/tests/scm.test
@@ -1,6 +1,6 @@
#! /bin/sh
# -*-scheme-*-
-MES=${MES-$(dirname $0)/../src/mes}
+MES=${MES-$(dirname $0)/../src/mes.gcc}
#export MES_ARENA=${MES_ARENA-40000}
$MES -s $0
exit $?
diff --git a/tests/srfi-1.test b/tests/srfi-1.test
index 719adfec..451494e2 100755
--- a/tests/srfi-1.test
+++ b/tests/srfi-1.test
@@ -1,6 +1,6 @@
#! /bin/sh
# -*-scheme-*-
-MES=${MES-$(dirname $0)/../src/mes}
+MES=${MES-$(dirname $0)/../src/mes.gcc}
#export MES_ARENA=${MES_ARENA-40000}
$MES -s $0
exit $?
diff --git a/tests/srfi-13.test b/tests/srfi-13.test
index a78246ae..5fc9d689 100755
--- a/tests/srfi-13.test
+++ b/tests/srfi-13.test
@@ -1,6 +1,6 @@
#! /bin/sh
# -*-scheme-*-
-MES=${MES-$(dirname $0)/../src/mes}
+MES=${MES-$(dirname $0)/../src/mes.gcc}
#export MES_ARENA=${MES_ARENA-40000}
$MES -s $0
exit $?
diff --git a/tests/srfi-14.test b/tests/srfi-14.test
index a26823e3..ef2ab712 100755
--- a/tests/srfi-14.test
+++ b/tests/srfi-14.test
@@ -1,6 +1,6 @@
#! /bin/sh
# -*-scheme-*-
-MES=${MES-$(dirname $0)/../src/mes}
+MES=${MES-$(dirname $0)/../src/mes.gcc}
#export MES_ARENA=${MES_ARENA-40000}
$MES -s $0
exit $?
diff --git a/tests/srfi-16.test b/tests/srfi-16.test
index 496cf0ee..957e8d77 100755
--- a/tests/srfi-16.test
+++ b/tests/srfi-16.test
@@ -1,6 +1,6 @@
#! /bin/sh
# -*-scheme-*-
-MES=${MES-$(dirname $0)/../src/mes}
+MES=${MES-$(dirname $0)/../src/mes.gcc}
#export MES_ARENA=${MES_ARENA-40000}
$MES -s $0
exit $?
diff --git a/tests/srfi-43.test b/tests/srfi-43.test
index a8ddce95..70a90012 100755
--- a/tests/srfi-43.test
+++ b/tests/srfi-43.test
@@ -1,6 +1,6 @@
#! /bin/sh
# -*-scheme-*-
-MES=${MES-$(dirname $0)/../src/mes}
+MES=${MES-$(dirname $0)/../src/mes.gcc}
#export MES_ARENA=${MES_ARENA-40000}
$MES -s $0
exit $?
diff --git a/tests/syntax.test b/tests/syntax.test
index c8ab0627..7b26f69f 100755
--- a/tests/syntax.test
+++ b/tests/syntax.test
@@ -1,6 +1,6 @@
#! /bin/sh
# -*-scheme-*-
-MES=${MES-$(dirname $0)/../src/mes}
+MES=${MES-$(dirname $0)/../src/mes.gcc}
#export MES_ARENA=${MES_ARENA-40000}
$MES -s $0
exit $?
diff --git a/tests/vector.test b/tests/vector.test
index 73ada674..84539869 100755
--- a/tests/vector.test
+++ b/tests/vector.test
@@ -1,6 +1,6 @@
#! /bin/sh
# -*-scheme-*-
-MES=${MES-$(dirname $0)/../src/mes}
+MES=${MES-$(dirname $0)/../src/mes.gcc}
#export MES_ARENA=${MES_ARENA-40000}
$MES -s $0
exit $?