libtool-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] Re: soext link option


From: Charles Wilson
Subject: Re: [PATCH] Re: soext link option
Date: Fri, 20 Dec 2002 02:10:40 -0500
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0

Robert Boehne wrote:
and X's Java won't load a module named *.dylib.  I don't see why
this can't be used under Cyg/Ming/win & pw32, so I removed the
references that stated it was not supported there.  I can't say
that it will work there, is there some OS restriciton that prevents it?

Yes. If the extention isn't ".dll", the windows loader won't load it as an intrinsic dependency. However, http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/loadlibrary.asp(It seems to imply that LoadLibrary(filename) might succeed, even if filename doesn't end in .dll or .exe. (e.g. dlopen() might load a module whose filename doesn't end in .dll/.exe)

@@ -4986,6 +4993,8 @@
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
      # Tell ltmain to make .lib files, not .a files.
      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext="dll"
      # FIXME: Setting linknames here is a bad hack.
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo 
"$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
      # The linker will automatically build a .lib file if we build a DLL.

This stanza only takes effect on cygwin/mingw/pw/... when the compiler is NOT gcc (and we assume then that the compiler is MSVC). But, if you ARE using gcc -- which is the typical case on cygwin/mingw/pw/... -- then shrext is not set to "dll". This is bad.

Following the lead of hpux, you ALSO need to set shrext=dll in AC_LIBTOOL_SYS_DYNAMIC_LINKER:

@@ -1172,6 +1172,7 @@
       dlpath=$dir/\$dldll~
        $rm \$dlpath'
     shlibpath_overrides_runpath=yes
+    shrext=dll

     case $host_os in
     cygwin*)

--Chuck






reply via email to

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