Tiny patch that makes “linkage” valid in the “component-options”
specification of egg files.

It gets quite tiresome to specify each one manually when you have a lot of
components. :x

From c9753e8584ef1001332847001be74d5e747308e3 Mon Sep 17 00:00:00 2001
From: Kooda <ko...@upyum.com>
Date: Wed, 16 Jan 2019 23:49:59 +0100
Subject: [PATCH] Add 'linkage' to the component-options specification of egg
 files

---
 egg-compile.scm                 | 5 ++++-
 manual/Egg specification format | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/egg-compile.scm b/egg-compile.scm
index c744592b..85f6e5b7 100644
--- a/egg-compile.scm
+++ b/egg-compile.scm
@@ -406,7 +406,10 @@
       (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! default-program-linkage (cdr info))
+         (set! default-extension-linkage (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
 
-- 
2.20.1

_______________________________________________
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-hackers

Reply via email to