[PATCH] Build libstdc++ as a DLL on Windows, updated for new autotools.
Dave Korn
dave.korn.cygwin@googlemail.com
Thu Sep 3 04:06:00 GMT 2009
Dave Korn wrote:
> [ refs: The original series of patches at
> [0/4] http://gcc.gnu.org/ml/gcc-patches/2009-07/msg01042.html
> [1/4] http://gcc.gnu.org/ml/gcc-patches/2009-07/msg01044.html
> [2/4] http://gcc.gnu.org/ml/gcc-patches/2009-07/msg01046.html
> [3/4] http://gcc.gnu.org/ml/gcc-patches/2009-07/msg01047.html
> [4/4] http://gcc.gnu.org/ml/gcc-patches/2009-07/msg01048.html
> and the tweaked respin at
> http://gcc.gnu.org/ml/gcc-patches/2009-07/msg01631.html
> and the updated tweaked respin at
> http://gcc.gnu.org/ml/gcc-patches/2009-08/msg00877.html
and the updated updated tweaked respin at
http://gcc.gnu.org/ml/gcc-patches/2009-08/msg01570.html ]
Well hello again listmates(*),
Ben found that a bug had crept into this patch at some stage during
development in the case of configuring GCC against an old version of the
Cygwin DLL that doesn't provide the support required by the new libstdc++ DLL
for C++ operator new/delete function replacement. A careless tweak to the way
the spec line is assembled from macros left an invalid empty colon hanging around.
That is fixed in this minor revision of the patch (Ben, it's the same as the
one I sent you offlist) by being slightly more careful in
gcc/config/i386/cygwin.h; apart from that it is identical to the previous version.
Successfully bootstrapped on both Cygwin 1.5 and Cygwin 1.7, thus proving
that it now works for both old and new Cygwin DLLs with or without the
function replacement wrapper support.
Tests now running, results looking spotless so far; if, as reasonably
anticipated, no regressions, OK for HEAD now?
gcc/ChangeLog:
* configure.ac (USE_CYGWIN_LIBSTDCXX_WRAPPERS): Define to reflect
status of AC_CHECK_FUNC for Cygwin DLL libstdc++ support wrappers.
* configure: Regenerate.
* config.in: Regenerate.
* config/i386/cygwin.h (CXX_WRAP_SPEC_LIST): Define list of --wrap
options for Cygwin DLL libstdc++ support wrappers.
(CXX_WRAP_SPEC_OPT): Define spec to use wrappers or not by default
according to defined value of USE_CYGWIN_LIBSTDCXX_WRAPPERS.
(CXX_WRAP_SPEC): Define entire wrapper spec in or out according to
whether USE_CYGWIN_LIBSTDCXX_WRAPPERS is even defined or not.
(LINK_SPEC): Include CXX_WRAP_SPEC.
* config/i386/cygming.opt (muse-libstdc-wrappers): New option for
Cygwin targets. Update copyright year.
libstdc++-v3/ChangeLog:
* src/Makefile.am (libstdc___la_LDFLAGS): Add -no-undefined and
-bindir switches.
* src/Makefile.in: Regenerate.
* config/os/newlib/os_defines.h (_GLIBCXX_IMPORT): Define to
dllimport when indicated by _GLIBCXX_DLL.
* config/os/mingw32/os_defines.h (_GLIBCXX_IMPORT): Likewise.
* include/bits/c++config (_GLIBCXX_IMPORT): Add empty definition
for non-dllimport targets.
* include/std/iostream (cin): Annotate with _GLIBCXX_IMPORT.
(cout, cerr, clog): Likewise.
* include/std/stdexcept (class logic_error, domain_error,
invalid_argument, length_error, out_of_range, runtime_error,
range_error, underflow_error): Likewise.
* include/ext/concurrence.h (class __concurrence_lock_error,
__concurrence_unlock_error): Likewise.
* include/bits/locale_classes.tcc (template class collate<char>,
collate_byname<char>, collate<wchar_t>,
collate_byname<wchar_t>): Likewise.
* include/bits/locale_facets.tcc (template class numpunct<char>,
numpunct_byname<char>, num_get<char>, num_put<char>,
ctype_byname<char>, numpunct<wchar_t>, numpunct_byname<wchar_t>,
num_get<wchar_t>, num_put<wchar_t>, ctype_byname<wchar_t>): Likewise.
* include/bits/locale_classes.h (class locale, facet, id, _Impl,
locale::facet, locale::id, locale::_Impl): Likewise.
* include/bits/locale_facets.h (template class ctype<char>,
ctype<wchar_t>): Likewise.
* include/bits/basic_ios.tcc (template class basic_ios<char>,
basic_ios<wchar_t>): Likewise.
* include/bits/ios_base.h (class ios_base, failure, Init): Likewise.
* include/bits/istream.tcc (template class basic_istream<char>,
basic_iostream<char>, basic_istream<wchar_t>,
basic_iostream<wchar_t>): Likewise.
* include/bits/codecvt.h (template class codecvt_byname<char, char,
mbstate_t>, codecvt_byname<wchar_t, char, mbstate_t>): Likewise.
* include/bits/ostream.tcc (template class basic_ostream<char>,
basic_ostream<wchar_t>): Likewise.
* include/bits/sstream.tcc (template class basic_stringbuf<char>,
basic_istringstream<char>, basic_ostringstream<char>,
basic_stringstream<char>, basic_stringbuf<wchar_t>,
basic_istringstream<wchar_t>, basic_ostringstream<wchar_t>,
basic_stringstream<wchar_t>): Likewise.
* include/bits/basic_string.tcc (template class basic_string<char>,
basic_string<wchar_t>, related overloaded operator<<, operator>>,
getline): Likewise.
* include/bits/locale_facets_nonio.tcc (template class
moneypunct<char, false>, moneypunct<char, true>,
moneypunct_byname<char, false>, moneypunct_byname<char, true>,
money_get<char>, money_put<char>, __timepunct<char>, time_put<char>,
time_put_byname<char>, time_get<char>, time_get_byname<char>,
messages<char>, messages_byname<char>, moneypunct<wchar_t, false>,
moneypunct<wchar_t, true>, moneypunct_byname<wchar_t, false>,
moneypunct_byname<wchar_t, true>, money_get<wchar_t>,
money_put<wchar_t>, __timepunct<wchar_t>, time_put<wchar_t>,
time_put_byname<wchar_t>, time_get<wchar_t>, time_get_byname<wchar_t>,
messages<wchar_t>, messages_byname<wchar_t>): Likewise.
* include/bits/streambuf.tcc (template class basic_streambuf<char>,
basic_streambuf<wchar_t>): Likewise.
* include/bits/fstream.tcc (template class basic_filebuf<char>,
basic_ifstream<char>, basic_ofstream<char>, basic_fstream<char>,
basic_filebuf<wchar_t>, basic_ifstream<wchar_t>,
basic_ofstream<wchar_t>, basic_fstream<wchar_t>): Likewise.
* include/backward/strstream (class strstreambuf, istrstream,
ostrstream, strstream): Likewise.
* libsupc++/typeinfo (class type_info, bad_cast,
bad_typeid): Likewise.
* libsupc++/exception (class exception, bad_exception): Likewise.
* libsupc++/new (class bad_alloc): Likewise.
* testsuite/lib/libstdc++.exp (proc libstdc++_init): Adjust
DEFAULT_CXXFLAGS and ld_library_path_tmp for Cygwin.
cheers,
DaveK
--
(*) - Yarrrrr!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libstdc-dll-final.diff
Type: text/x-c
Size: 35266 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20090903/eef3f0ab/attachment.bin>
More information about the Libstdc++
mailing list