Re: [xslt] [xml] [PATCH] Build shared library on Win32



Roumen Petrov wrote:
Daniel Veillard wrote:
On Sun, Oct 26, 2008 at 03:18:53PM +0000, Richard W.M. Jones wrote:
[SNIP]
http://hg.et.redhat.com/misc/fedora-mingw--devel/?f=2515b165a5e3;file=libxslt/mingw32-libxslt-1.1.24-win32-shared.patch

  Hi Rich,

the post would be a more natural target for the xslt gnome org list :-)
looks fine, applied and commited. In the past Roumen Petrov has been the
one fixing mingw and espacially cross-compiling issues, so I'm Cc'ing
him in the reply.

I confirm that libtool flag -no-undefined is required for win platform to create shared(dll) library. I'm on vacation and will check later (Monday may be). Also I would like to remember my posts to bug tracking system.


[SNIP]
Daniel


Roumen


Since this issue is only for libxslt in my response I exclude libxml list.

First the command "make LDFLAGS='-no-undefined -avoid-version'" without any changes is enough to create binaries compatible with windows binaries from native build (see Igor Zlatkovic binaries/site).


I check the "mingw patch" attached to "Bug 481419 – win32 builds" (http://bugzilla.gnome.org/show_bug.cgi?id=481419) and found that it is to complex and still include modifications related to "Bug 481434 – win32 builds without winsock".


About the "Richard W.M. Jones" patch :

- configure.in: macro AC_LIBTOOL_WIN32_DLL is no more required. It is for about 7 years old GNU compiler(gcc version about 2.9x) where we has to use dlltool to create shared libraries. I could not found reason to include it (year is 2008 and gcc(mingw version) is 3.5x).

- LDFLAGS: for mingw host configure script is set and substitute variable WIN32_EXTRA_LDFLAGS with flag "-no-undefined". Why the patch don't use it ? Also why the patch don't set it in libexslt/Makefile.am and python/Makefile.am ?

The updated patch is attached as file "libxslt-trunk-20081103.patch" (I see that Richard patch is already applied). It is only for "-no-undefined" for mingw and cygwin host platforms (see issue 481419).

Roumen

Index: python/Makefile.am
===================================================================
--- python/Makefile.am	(revision 1492)
+++ python/Makefile.am	(working copy)
@@ -24,7 +24,7 @@
 	libxslt-python-api.xml	\
 	$(DOCS)
 
-libxsltmod_la_LDFLAGS = -module -avoid-version
+libxsltmod_la_LDFLAGS =  $(WIN32_EXTRA_LDFLAGS) -module -avoid-version
 
 if WITH_PYTHON
 mylibs = \
Index: libxslt/xsltwin32config.h
===================================================================
--- libxslt/xsltwin32config.h	(revision 1492)
+++ libxslt/xsltwin32config.h	(working copy)
@@ -62,7 +62,7 @@
  *
  * Whether module support is configured into libxslt
  */
-#if 0
+#if 1
 #ifndef WITH_MODULES
 #define WITH_MODULES
 #endif
Index: libxslt/Makefile.am
===================================================================
--- libxslt/Makefile.am	(revision 1492)
+++ libxslt/Makefile.am	(working copy)
@@ -53,7 +53,7 @@
 	libxslt.h
 
 libxslt_la_LIBADD = $(EXTRA_LIBS)
-libxslt_la_LDFLAGS = -version-info @LIBXSLT_VERSION_INFO@ -no-undefined
+libxslt_la_LDFLAGS = $(WIN32_EXTRA_LDFLAGS) -version-info @LIBXSLT_VERSION_INFO@
 
 man_MANS = libxslt.3
 
Index: configure.in
===================================================================
--- configure.in	(revision 1492)
+++ configure.in	(working copy)
@@ -3,7 +3,6 @@
 AC_INIT(libxslt/xslt.c)
 AM_CONFIG_HEADER(config.h)
 AC_CANONICAL_HOST
-AC_LIBTOOL_WIN32_DLL
 AC_GNU_SOURCE
 
 dnl
@@ -588,6 +587,9 @@
 WIN32_EXTRA_LIBADD=
 WIN32_EXTRA_LDFLAGS=
 case "$host" in
+ *-*-cygwin*)
+ WIN32_EXTRA_LDFLAGS="-no-undefined"
+ ;;
  *-*-mingw*)
  WIN32_EXTRA_LIBADD="-lwsock32"
  WIN32_EXTRA_LDFLAGS="-no-undefined"
Index: libexslt/Makefile.am
===================================================================
--- libexslt/Makefile.am	(revision 1492)
+++ libexslt/Makefile.am	(working copy)
@@ -29,7 +29,7 @@
 	dynamic.c
 
 libexslt_la_LIBADD = $(top_builddir)/libxslt/libxslt.la $(EXTRA_LIBS)
-libexslt_la_LDFLAGS = -version-info @LIBEXSLT_VERSION_INFO@ $(LIBGCRYPT_LIBS)
+libexslt_la_LDFLAGS = $(WIN32_EXTRA_LDFLAGS) -version-info @LIBEXSLT_VERSION_INFO@ $(LIBGCRYPT_LIBS)
 
 man_MANS = libexslt.3
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]