~ chicken-core (chicken-5) 036d56cd13af6683ce62fd93d0a52297464ac057
commit 036d56cd13af6683ce62fd93d0a52297464ac057
Author: felix <felix@call-with-current-continuation.org>
AuthorDate: Sat Dec 10 20:53:38 2016 +0100
Commit: felix <felix@call-with-current-continuation.org>
CommitDate: Sat Dec 10 20:53:38 2016 +0100
c-backend: emit "mark" indicating statically linked extensions
diff --git a/c-backend.scm b/c-backend.scm
index b746d97a..10800bc1 100644
--- a/c-backend.scm
+++ b/c-backend.scm
@@ -515,7 +515,7 @@
(gen ";"))))
(expr node temps) )
-
+
(define (header)
(define (pad0 n)
(if (< n 10)
@@ -541,7 +541,12 @@
(unless (null? used-units)
(gen #t " uses: ")
(gen-list used-units))
- (gen #t "*/" #t #t "#include \"" target-include-file "\"")
+ (gen #t "*/")
+ (unless (null? linked-static-extensions)
+ (gen #t "/*### (static-objects")
+ (for-each (cut gen " \"" <> "\"") linked-static-extensions)
+ (gen ") */" #t))
+ (gen #t "#include \"" target-include-file "\"")
(when external-protos-first
(generate-foreign-callback-stub-prototypes foreign-callback-stubs) )
(when (pair? foreign-declarations)
Trap