~ chicken-core (chicken-5) 85988273080fcd61ccfe608173b84efb15858470
commit 85988273080fcd61ccfe608173b84efb15858470
Author: Peter Bex <peter@more-magic.net>
AuthorDate: Mon Aug 24 21:45:39 2015 +0200
Commit: Moritz Heidkamp <moritz.heidkamp@bevuta.com>
CommitDate: Sun Sep 6 20:11:31 2015 +0200
Ensure "try-compile" from setup-api cleans up tempfiles.
It now creates the file with a controlled name, which can then
be cleaned up. Fixes #1213
Signed-off-by: Moritz Heidkamp <moritz.heidkamp@bevuta.com>
diff --git a/NEWS b/NEWS
index 4bc883bf..b9be047f 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
4.10.1
+- Core libraries
+ - try-compile from setup-api cleans up temporary output files (#1213).
+
- Runtime system:
- The calling convention of CPS procedures has been changed to
use "argument vectors" instead of C calling convention.
diff --git a/setup-api.scm b/setup-api.scm
index 547558ab..0fdfc1e8 100644
--- a/setup-api.scm
+++ b/setup-api.scm
@@ -528,7 +528,7 @@
cc " "
(if compile-only "-c" "") " "
cflags " " *target-cflags* " "
- fname " "
+ (shellpath fname) " -o " (shellpath oname) " "
(if compile-only
""
(conc "-L" *target-lib-home* " " ldflags " " *target-libs*) )
@@ -538,6 +538,7 @@
cmd) ) ) ) )
(when verb (print (if (zero? r) "succeeded." "failed.")))
(ignore-errors ($system (sprintf "~A ~A" *remove-command* (shellpath fname))))
+ (ignore-errors ($system (sprintf "~A ~A" *remove-command* (shellpath oname))))
(zero? r) ) )
(define test-compile try-compile)
Trap