diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:25 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:25 -0800 |
commit | db04688faa20f3576257c0fe41752ec435beab9a (patch) | |
tree | 6d638c2e1f65afd5f49d20b2d22ce35bd74705ff /Link.scm | |
parent | 1edcb9b62a1a520eddae8403c19d841c9b18737f (diff) | |
download | scm-db04688faa20f3576257c0fe41752ec435beab9a.tar.gz scm-db04688faa20f3576257c0fe41752ec435beab9a.zip |
Import Upstream version 5c3upstream/5c3
Diffstat (limited to 'Link.scm')
-rw-r--r-- | Link.scm | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -68,18 +68,18 @@ (define (compile-file file . args) (apply hobbit file args) - (require 'build) + (load (in-vicinity (implementation-vicinity) "build")) (build-from-whole-argv (list "build" "-tdll" (string-append "--compiler-options=-I" (implementation-vicinity)) "-c" - (string-append (descmify file) ".c") - ;; or (replace-suffix file (scheme-file-suffix) ".c") + (begin (require 'glob) + (replace-suffix file (scheme-file-suffix) ".c")) "-hsystem" ))) (define (link-named-scm name . modules) - (require 'build) + (load (in-vicinity (implementation-vicinity) "build")) (let* ((iv (implementation-vicinity)) (oss (string-append scm:object-suffix " ")) (command @@ -107,6 +107,7 @@ (define link:able-suffix (cond ((provided? 'shl) ".sl") ((provided? 'sun-dl) ".so") + ((provided? 'mac-dl) ".shlb") (else ".o"))) (define link:link (lambda (file . libs) @@ -136,6 +137,10 @@ (set! *load-pathname* file) (set! linkobj (assoc name link:modules)) (cond (linkobj (dyn:unlink (cdr linkobj)))) + (if (and (provided? 'sun-dl) + (> 3 (string-length file)) + (not (eqv? (string-ref file 0) '#\/))) + (set! file (string-append "./" file))) (set! linkobj (dyn:link file)) (for-each (lambda (lib) (cond ((dyn:link lib)) |