This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Libstdc++ as DLL on windows, alternative approach [was Re: cygwin patch review]
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- Cc: libstdc++ at gcc dot gnu dot org, GCC Patches <gcc-patches at gcc dot gnu dot org>, Danny Smith <dansmister at gmail dot com>, "Aaron W. LaFramboise (GCC)" <aaronavay62 at aaronwl dot com>, Kai Tietz <ktietz70 at googlemail dot com>, Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- Date: Thu, 19 Nov 2009 09:33:47 -0800
- Subject: Re: Libstdc++ as DLL on windows, alternative approach [was Re: cygwin patch review]
- References: <20091019092452.2e271791@mcgee.artheist.org> <4AFC8EC3.10502@gmail.com>
> Ok, so as we discussed before, this doesn't currently work.
> However it does sound like the right thing to do, so I've spun a new
> version of the patch that applies dllimport to the namespace. We
> could commit this and then open a PR about dllimport not working on
> namespaces. It's much smaller and cleaner than the version that adds
> markup everywhere, but I doubt I'll be able to fix the
> dllimport-vs-namespace bug in time for 4.5. That's not the end of
> the world; getting dllimport right is a good optimisation, but we can
> live with the compromise of auto-import for now.
I like this plan. What's the PR number? And can you affix your
patch from here to it:
http://gcc.gnu.org/ml/gcc-patches/2009-11/msg00979.html
Thanks.
> Initial test results (c and c++ only) are posted(*) and look right,
> but I'll do a clean run on the same source revision for comparison
> anyway. Note that I had to patch various testsuite/lib/ files to
> avoid the current utf-8 problem(**) that would otherwise have
> provoked many spurious 'excess errors' warnings. That'll be the
> subject of a separate patch, I'll do the clean run using them as well
> so the comparison is fair.
It looks like (in later messages) you have an updated patch. But your
updated results here looks great:
http://gcc.gnu.org/ml/gcc-testresults/2009-11/msg01084.html
> libstdc++-v3/ChangeLog:
>
> * libstdc++-v3/acinclude.m4 (GLIBCXX_ENABLE_SYMVERS): Don't
> disable on PE targets.
> * libstdc++-v3/configure: Regenerate.
> * libstdc++-v3/configure.host: Add libtool DLL options for
> Cygwin and MinGW platforms.
>
> * libstdc++-v3/include/bits/c++config
> (_GLIBCXX_VISIBILITY_ATTR): On platforms that don't support
> visibility, allow them to declare a macro _GLIBCXX_PSEUDO_VISIBILITY
> that is applied in place of visibility.
>
> * libstdc++-v3/config/os/newlib/os_defines.h
> (_GLIBCXX_PSEUDO_VISIBILITY_default): New macro for dllimport.
> (_GLIBCXX_PSEUDO_VISIBILITY_hidden): New empty macro.
> (_GLIBCXX_PSEUDO_VISIBILITY): Evaluate to one of the above.
> * libstdc++-v3/config/os/mingw32/os_defines.h
> (_GLIBCXX_PSEUDO_VISIBILITY_default,
> _GLIBCXX_PSEUDO_VISIBILITY_hidden,
> _GLIBCXX_PSEUDO_VISIBILITY): Likewise.
>
> So, is this any more like OK for head?
Yes, exactly. Thanks. This is OK with me.
best,
benjamin