~ chicken-core (chicken-5) 458e7ada247c50e9f9b4692d829641a089fa47df


commit 458e7ada247c50e9f9b4692d829641a089fa47df
Author:     Kooda <kooda@upyum.com>
AuthorDate: Wed Jan 23 12:34:43 2019 +0100
Commit:     felix <felix@call-with-current-continuation.org>
CommitDate: Thu Jan 24 15:10:08 2019 +0100

    Add 'linkage' to the component-options specification of eggs
    
    Signed-off-by: felix <felix@call-with-current-continuation.org>

diff --git a/egg-compile.scm b/egg-compile.scm
index ba4ed67c..da277179 100644
--- a/egg-compile.scm
+++ b/egg-compile.scm
@@ -190,7 +190,7 @@
                       (sdeps '())
                       (src #f)
                       (cbuild #f)
-                      (link default-extension-linkage)
+                      (link (if (null? link) default-extension-linkage link))
                       (tfile #f)
                       (ptfile #f)
                       (ifile #f)
@@ -239,7 +239,7 @@
                       (sdeps '())
                       (src #f)
                       (cbuild #f)
-                      (link default-extension-linkage)
+                      (link (if (null? link) default-extension-linkage link))
                       (oname #f)
                       (mods #f)
                       (opts opts))
@@ -325,7 +325,7 @@
                       (sdeps '())
                       (cbuild #f)
                       (src #f)
-                      (link default-program-linkage)
+                      (link (if (null? link) default-program-linkage link))
                       (lobjs '())
                       (lopts lopts)
                       (oname #f)
@@ -408,7 +408,8 @@
       (case (car info)
         ((csc-options) (set! opts (append opts (cdr info))))
         ((link-options) (set! lopts (append lopts (cdr info))))
-        (else (error "invalid option specification" info))))
+        ((linkage) (set! link (append link (cdr info))))
+        (else (error "invalid component-options specification" info))))
     (define (compile-cond-expand info walk)
       (let loop ((clauses (cdr info)))
         (cond ((null? clauses)
diff --git a/manual/Egg specification format b/manual/Egg specification format
index 20b1dd0f..24b45038 100644
--- a/manual/Egg specification format	
+++ b/manual/Egg specification format	
@@ -145,7 +145,7 @@ intended for cross compilation.
 [egg property] (component-options OPTIONSPEC ...)
 
 Specifies global options for all programs and extensions compiled for this egg.
-{{OPTIONSPEC}} may be {{csc-options}} or {{link-options}} specifications.
+{{OPTIONSPEC}} may be {{csc-options}}, {{link-options}} or {{linkage}} specifications.
 
 ==== cond-expand
 
Trap