Subject: Re: libtool
From: "Gary V. Vaughan" <[email-masked]>
To: Earnie Boyd <[email-masked]>
Cc: Robert Collins <[email-masked]>, [email-masked]
Date: Fri, 8 Sep 2000 01:27:40 +0100

On Thu, Sep 07, 2000 at 06:55:50PM +0100, Gary V. Vaughan wrote:
> 
> I'll upgrade to cygwin 1.1.4 and post some traces later tonight in the
> hope that someone can make more sense of them than I can.

I updated to the very latest cygwin stuff using the web setup.exe, and
tried to compile a program that I know definitely built on my b20.1
installation a few weeks back (a prerelease of GNU m4 1.5, available
from my website).  It uses link time and runtime (LoadLibrary()) dll's
and is a pretty good stress test for libtool's dll support.

To my surprise, it worked!  Here is a part of the log around where the
build is compiling the libm4.la dll:

.
.
.
/bin/sh ../libtool --mode=link gcc  -g -O2 -no-undefined -export-dynamic @DLLDFLAGS@ -o libm4.la -rpath /usr/local/lib  list.lo m4module.lo error.lo obstack.lo regex.lo xmalloc.lo xstrdup.lo
rm -fr .libs/libm4.la .libs/libm4.* .libs/libm4.*
generating symbol list for `libm4.la'
dlltool --export-all --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12 --output-def .libs/libm4-0-0-0.dll-def  list.lo m4module.lo error.lo obstack.lo regex.lo xmalloc.lo xstrdup.lo 
sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < .libs/libm4-0-0-0.dll-def > .libs/libm4.exp
echo EXPORTS > .libs/libm4-0-0-0.dll-def
_lt_hint=1; \
cat .libs/libm4.exp | while read symbol; do \
  set dummy $symbol; \
  case $# in \
    2) echo " $2 @ $_lt_hint ; " >> .libs/libm4-0-0-0.dll-def ;; \
    *) echo " $2 @ $_lt_hint $3 ; " >> .libs/libm4-0-0-0.dll-def ;; \
  esac; \
  _lt_hint=`expr 1 + $_lt_hint`; \
done
gcc -Wl,--base-file,.libs/libm4-0-0-0.dll-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o .libs/libm4-0-0-0.dll list.lo m4module.lo error.lo obstack.lo regex.lo xmalloc.lo xstrdup.lo  
dlltool --as=as --dllname libm4-0-0-0.dll --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12--def .libs/libm4-0-0-0.dll-def --base-file .libs/libm4-0-0-0.dll-base--output-exp .libs/libm4-0-0-0.dll-exp
gcc -Wl,--base-file,.libs/libm4-0-0-0.dll-base .libs/libm4-0-0-0.dll-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o .libs/libm4-0-0-0.dll  list.lo m4module.lo error.lo obstack.lo regex.lo xmalloc.lo xstrdup.lo  
dlltool --as=as --dllname libm4-0-0-0.dll --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12  --def .libs/libm4-0-0-0.dll-def --base-file .libs/libm4-0-0-0.dll-base --output-exp .libs/libm4-0-0-0.dll-exp
gcc .libs/libm4-0-0-0.dll-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o .libs/libm4-0-0-0.dll  list.lo m4module.lo error.lo obstack.lo regex.lo xmalloc.lo xstrdup.lo
creating libm4.la
.
.
.

Cheers,
	Gary.
	
p.s.  I think the current cvs HEAD of libtool is broken wrt cygwin
      right now.
      
p.p.s.  the version of getopts linked by the system is subtly broken
        and causes this m4 build to fail most of it's tests due to
	misparsing of the command line.  Linking it with the getopt
	files in the distribution works fine, and the build passes all
	tests. 
-- 
  ___              _   ___   __              _         mailto: [email-masked]
 / __|__ _ _ ___ _| | / / | / /_ _ _  _ __ _| |_  __ _ ___       [email-masked] 
| (_ / _` | '_|// / |/ /| |/ / _` | || / _` | ' \/ _` | _ \
 \___\__,_|_|\_, /|___(_)___/\__,_|\_,_\__, |_||_\__,_|//_/
home page:  /___/                      /___/                  gpg public key:
http://www.oranda.demon.co.uk           http://www.oranda.demon.co.uk/key.asc

--
Want to unsubscribe from this list?
Send a message to [email-masked]