>From 8dbc8612b4b18bf396d217c70e4582dd78a12ab6 Mon Sep 17 00:00:00 2001 From: Kooda Date: Wed, 23 Jan 2019 12:35:15 +0100 Subject: [PATCH 3/3] Fix building extensions in static only mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The import libraries weren’t generated by the static build call, only by the dynamic one, which occurs before the static one in the default (dynamic and static) linkage, so the issue is invisible in the default mode. --- egg-compile.scm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/egg-compile.scm b/egg-compile.scm index da277179..2797cc66 100644 --- a/egg-compile.scm +++ b/egg-compile.scm @@ -563,7 +563,7 @@ source-dependencies source (options '()) predefined-types eggfile - link-objects + link-objects modules custom types-file inline-file) srcdir platform) (let* ((cmd (qs* (or (custom-cmd custom srcdir platform) @@ -598,7 +598,11 @@ platform))) (targets (append (list out3 lfile) (maybe types-file tfile) - (maybe inline-file ifile))) + (maybe inline-file ifile) + (map (lambda (m) + (qs* (prefix srcdir (conc m ".import.scm")) + platform)) + modules))) (src (qs* (or source (conc name ".scm")) platform))) (when custom (prepare-custom-command cmd platform)) @@ -612,7 +616,7 @@ " -setup-mode -static -I " srcdir " -emit-link-file " lfile (if (eq? mode 'host) " -host" "") - " -D compiling-extension -c -unit " name + " -D compiling-extension -J -c -unit " name " -D compiling-static-extension" " -C -I" srcdir (arglist opts platform) " " src " -o " out2) -- 2.20.1