delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/10/05/17:30:24

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Thu, 06 Oct 2005 10:25:56 +1300
From: Danny Smith <dannysmith AT clear DOT net DOT nz>
Subject: Re: Building libstdc++.dll the easy way
To: "John W. Eaton" <jwe AT bevo DOT che DOT wisc DOT edu>
Cc: Cygwin <cygwin AT cygwin DOT com>
Reply-to: Danny Smith <dannysmith AT users DOT sourceforge DOT net>
Message-id: <000501c5c9f3$73b031d0$774861cb@DANNY>
MIME-version: 1.0
References: <000301c5c9e6$81b549d0$b16d65da AT DANNY> <17220 DOT 13271 DOT 148232 DOT 233232 AT frodo DOT bogus DOT domain>

----- Original Message -----
From: "John W. Eaton"
Sent: Thursday, 6 October 2005 09:13


> On  6-Oct-2005, Danny Smith wrote:
>
> | Building  libstdc++.dll  may be a "hard problem" for a mathematician or
> | for libtool, but this is how an ordinary  person coud do  it.
> |
> | dlltool --output-def libstdc++.def --export-all libstdc++.a
> | gcc -shared -olibstdc++.dll -Wl,--out-implib,libstdc++.dll.a \
> |     libstdc++.def libstdc++.a
> |
> |
> | The main problem after that is in getting rid of the need for auto-import of
> | data objects by marking header files appropiately.
>
> The other main problem after that is that the C++ ABI has been
> changing, so having only one version of the library would cause
> trouble.  But maybe that is not as big a problem now as it was in the
> past?  OTOH, surely there will be some changes to the library in the
> future, so it seems that it would be a good idea to be able to have
> multiple versions of libstdc++.dll.a installed simultaneously?  Or is
> this not possible for some reason?

Possible, yes (STLport does this without libtool) , and unfortunately necessary.

I  do this, when in a playful mood:
gcc -shared -olibstdc++-${LIBSTDCP_VERSION}.dll \
    -Wl,--out-implib,libstdc++-${LIBSTDCP_VERSION}.dll.a \
     libstdc++.def libstdc++.a

and then link "libstdc++-${LIBSTDCP_VERSION}.dll.a"  to libstdc++.dll.a in my
gcc-version-specific dir:
(lib/gcc/mingw32/__GNUC__.__GNUC_MINOR__.__GNUC__PATCHLEVEL )

 There was an old article that I once pulled off the net entitled:
"DLL Maintenance Made Easy
Writing a DLL can seem deceptively easy-until it's time to revise it."
by Geoff Vandegrift

that advised on how to maintain class backward compatibility and so avoid the
versioning woes.

But, with libsupc++/libstdc++ that won't be possible for awhile, especially if
some people want Dwarf2 EH unwinding and others want SjLj.

Danny


>
> jwe



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019