On Sun, Jul 20, 2014 at 01:47:03PM +0200, Felix Winkelmann wrote: > From: Michele La Monaca <[email protected]> > Subject: [Chicken-hackers] [PATCH] fix static compilation in cygwin > Date: Sun, 13 Jul 2014 14:57:17 +0200 > > > Hi, > > > > I think static compilation is broken in cygwin because csc > > inexplicably (to me at least) looks for cygchicken-0.a instead of > > libchicken.a. > > Has anybody looked into this, yet? Seems right to me. I don't have a > cygwin setup, so can someone give me a hand and try Michele's patch?
I've tested the patch, and it indeed seems to fix this particular situation. Somehow I thought this would break dynamically linked builds, as there's no libchicken.dll, only cygchicken-0.dll. However, *somehow* dynamic binaries are still linked against cygchicken-0.dll even with this patch. I've never understood this cygchicken-0.dll business. It's still being built, and the core binaries are still linked against it. So I'm unsure whether this patch is the Right Fix; I always assumed there was a reason we had cygchicken-0.dll, and programs should be linked against it? Anyway, I don't understand a thing about this, but it seems to fix the bug, so why not? I've attached a signed-off copy with a NEWS entry. Cheers, Peter -- http://www.more-magic.net
>From 6c7cb8c0568b5733b8baadc1ea55a47b702e75a4 Mon Sep 17 00:00:00 2001 From: Michele La Monaca <[email protected]> Date: Sun, 13 Jul 2014 13:39:43 +0200 Subject: [PATCH] fix static compilation in cygwin Signed-off-by: Peter Bex <[email protected]> --- NEWS | 4 ++++ csc.scm | 5 +---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 1020853..3780016 100644 --- a/NEWS +++ b/NEWS @@ -56,6 +56,10 @@ CHICKENINCDIR and CHICKENLIBDIR will now also be taken from the environment, if present (like PLATFORM, DESTDIR and PREFIX). +- Tools + - "csc" + - On Cygwin, -static now works again (thanks to Michele La Monaca) + 4.9.0 - Security fixes diff --git a/csc.scm b/csc.scm index 8d586ab..16ab65e 100644 --- a/csc.scm +++ b/csc.scm @@ -119,10 +119,7 @@ (define windows-shell WINDOWS_SHELL) (define generate-manifest #f) -(define libchicken - (if cygwin - (string-append "cyg" INSTALL_LIB_NAME "-0") - (string-append "lib" INSTALL_LIB_NAME))) +(define libchicken (string-append "lib" INSTALL_LIB_NAME)) (define default-library (string-append libchicken "." library-extension)) -- 1.7.10.4
_______________________________________________ Chicken-hackers mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/chicken-hackers
