diff --git a/mes/module/mes/posix.mes b/mes/module/mes/posix.mes index 77785406..fc1b1574 100644 --- a/mes/module/mes/posix.mes +++ b/mes/module/mes/posix.mes @@ -38,12 +38,11 @@ *unspecified*) (define (search-path path file-name) - (if (access? file-name R_OK) file-name - (let loop ((path path)) - (and (pair? path) - (let ((f (string-append (car path) "/" file-name))) - (if (access? f R_OK) f - (loop (cdr path)))))))) + (let loop ((path path)) + (and (pair? path) + (let ((f (string-append (car path) "/" file-name))) + (if (access? f R_OK) f + (loop (cdr path))))))) (define (execlp file-name args) (let ((executable (if (string-index file-name #\/) file-name diff --git a/module/mescc/mescc.scm b/module/mescc/mescc.scm index 8a86d9b9..45f9c913 100644 --- a/module/mescc/mescc.scm +++ b/module/mescc/mescc.scm @@ -274,7 +274,8 @@ ((equal? machine "32") "x86-mes") ((equal? machine "64") "x86_64-mes") (else "x86-mes"))) - (path (cons* srcdir-lib + (path (cons* "." + srcdir-lib (prefix-file options "lib") (filter-map (multi-opt 'library-dir) options))) (arch-file-name (string-append arch "/" file-name))