Re: [Chicken-hackers] …PATCH… Fix some bugs with the egg file c-object declaration

2019-03-31 Thread Peter Bex
On Fri, Mar 29, 2019 at 02:46:57PM +0100, ko...@upyum.com wrote:
> Hi!
> 
> When trying to use the new `c-object` and `objects` facilities to link a C
> library to one of my eggs, I found a couple of bugs.
> 
> Two path construction mistakes, and one linking mistake which linked the
> dynamic variant inside the static archive.

Thanks, pushed!

Cheers,
Peter


signature.asc
Description: PGP signature
___
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-hackers


[Chicken-hackers] …PATCH… Fix some bugs with the egg file c-object declaration

2019-03-29 Thread kooda
Hi!

When trying to use the new `c-object` and `objects` facilities to link a C
library to one of my eggs, I found a couple of bugs.

Two path construction mistakes, and one linking mistake which linked the
dynamic variant inside the static archive.

From 719bc786e4ef9e22643c69bf5ff8cc22d2bd056f Mon Sep 17 00:00:00 2001
From: Kooda 
Date: Fri, 29 Mar 2019 14:35:40 +0100
Subject: [PATCH] Fix some bugs with the egg file c-object declaration

---
 egg-compile.scm | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/egg-compile.scm b/egg-compile.scm
index ee7ed86e..bffcf7fa 100644
--- a/egg-compile.scm
+++ b/egg-compile.scm
@@ -618,7 +618,7 @@
" " src " -o " out2)
 (when (pair? link-objects)
   (let ((lobjs (filelist srcdir
- (map (cut conc <> (object-extension platform))
+ (map (cut conc <> ".static" (object-extension 
platform))
link-objects)
  platform)))
 (print (qs* default-builder platform #t) " " out3 " : "
@@ -772,12 +772,13 @@
  (opts (if (null? options)
default-dynamic-compilation-options
options))
- (sname (or source name))
+ (sname (prefix srcdir name))
+ (ssname (and source (prefix srcdir source)))
  (out (qs* (target-file (conc sname
   (object-extension platform))
 mode)
platform))
- (src (qs* (conc sname ".c") platform)))
+ (src (qs* (or ssname (conc sname ".c")) platform)))
 (when custom
   (prepare-custom-command cmd platform))
 (print "\n" (slashify default-builder platform) " "
-- 
2.20.1

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