Hi! The attached patch attempts to fix #1369. The problem here is (or seems to be) that .o files produced for static and dynamic versions of an extension may collide. Specifically, the static .o file will be overwritten in a subsequent compile of the dynamic version. Normally, the static variant is built after the dynamic one, but by using the "-k" (keep) option, by, copying files into the egg cache, by aborted egg-builds or manual development there may be cases where the .o files may be mixed up.
I couldn't reproduce this fully, but Peter reported problems with wrongly compiled ..o files, so this patch is an attempt to avoid any mixup. felix
From 765ae707128d01851850f6e46dc4345374ea6dc5 Mon Sep 17 00:00:00 2001 From: felix <[email protected]> Date: Thu, 7 Sep 2017 13:57:51 +0200 Subject: [PATCH] When compiling static extensions, use a different name for static .o files to avoid collision with .o files for the dynamically linked extension. --- egg-compile.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/egg-compile.scm b/egg-compile.scm index 6e6810a..10f4a23 100644 --- a/egg-compile.scm +++ b/egg-compile.scm @@ -428,6 +428,7 @@ default-static-compilation-options options)) (out (quotearg (target-file (conc sname + ".static" (object-extension platform)) mode))) (src (quotearg (or ssname (conc sname ".scm"))))) @@ -550,7 +551,8 @@ (mkdir (mkdir-command platform)) (ext (object-extension platform)) (sname (prefix srcdir name)) - (out (quotearg (target-file (conc sname ext) mode))) + (out (quotearg (target-file (conc sname ".static" ext) + mode))) (outlnk (quotearg (conc sname +link-file-extension+))) (dest (destination-repository mode)) (dfile (quotearg (slashify dest platform))) -- 1.7.9.5
_______________________________________________ Chicken-hackers mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/chicken-hackers
