libtool-patches
[Top][All Lists]
Advanced

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

Re: cygwin dlopening backends


From: Charles Wilson
Subject: Re: cygwin dlopening backends
Date: Wed, 09 Nov 2005 23:55:28 -0500
User-agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)

Ralf Wildenhues wrote:
First, let me thank you for your insightful and very nicely written
mail; the thread pointers are very helpful -- it took a while to read
through them all.

There are several separate issues here:

1) lt_dlhandle_iterate breakage of loadlibrary.c
2) needed dlinterface_free (or maybe _unregister?)
   including documentation
3) cygwin managed mount fix of loadlibrary.c
   or remove the cygwin-specific code of loadlibrary.c
4) use either
    - only dlopen, or
    - first dlopen, then LoadLibrary
   on cygwin, or
    - make the choice configurable

Since it has been over two weeks since the 277- patch was committed (thus breaking the build on cygwin), I've opened a bug on Gary's wiki:

http://tkd.kicks-ass.net/GnuLibtoolProject/BugReports/CygwinDlopeningBackends

The error is that loadlibrary.c vm_open() calls lt_dlhandle_next, which was renamed and signature-changed by Gary's patch. This call (to lt_dlhandle_next) is NOT inside any cygwin-specific #ifdefs, so 277- probably breaks mingw/os2/pw32 as well.

I think Ralf's issues (1) and (2) need fixing first, but since they involve Gary's new interface stuff I'm not brave enough to muck with it. What "interface id" should loadlibrary.c's vm_open() itself use? loadlibrary.c is not itself a module...or is it?

FWIW, I'm currently using the following HACK to test libtool-cvs-HEAD on cygwin ("Doctor, it hurts when I do this"..."Don't do that").

--
Chuck


P.S. Side issue -- here's the failing command:

libtool: link: gcc -shared libltdl/loaders/.libs/libltdl_libltdl_la-preopen.o libltdl/.libs/libltdl_libltdl_la-lt__alloc.o libltdl/.libs/libltdl_libltdl_la-lt_dlloader.o libltdl/.libs/libltdl_libltdl_la-lt_error.o libltdl/.libs/libltdl_libltdl_la-ltdl.o libltdl/.libs/libltdl_libltdl_la-slist.o libltdl/.libs/libltdlS.o libltdl/.libs/libltdl.lax/dlopen.a/dlopen.o libltdl/.libs/libltdl.lax/loadlibrary.a/loadlibrary.o -o libltdl/.libs/cygltdl-7.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker libltdl/.libs/libltdl.dll.a

Note that most of the args "passed-thru" to the linker are given '-Xlinker' precedents, but the --enable-auto-image-base uses '-Wl,' instead. Should this be "fixed"? The current syntax 'works' (or would, if it weren't for that missing lt_dlhandle_next symbol) but stylistically the inconsistency is ugly.

Index: libltdl/m4/ltdl.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/m4/ltdl.m4,v
retrieving revision 1.24
diff -u -r1.24 ltdl.m4
--- libltdl/m4/ltdl.m4  9 Nov 2005 21:38:09 -0000       1.24
+++ libltdl/m4/ltdl.m4  10 Nov 2005 04:36:17 -0000
@@ -558,7 +558,7 @@
 beos*)
   LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
   ;;
-cygwin* | mingw* | os2* | pw32*)
+mingw* | os2* | pw32*)
   LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la"
   ;;
 esac

reply via email to

[Prev in Thread] Current Thread [Next in Thread]