This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH] Build libgcc_s on Windows
- From: "Danny Smith" <dansmister at gmail dot com>
- To: "Aaron W. LaFramboise" <aaronavay62 at aaronwl dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, libstdc++ at gcc dot gnu dot org
- Date: Tue, 19 Aug 2008 15:10:53 +1200
- Subject: Re: [PATCH] Build libgcc_s on Windows
- References: <48A9C461.9010901@aaronwl.com>
On Tue, Aug 19, 2008 at 6:50 AM, Aaron W. LaFramboise
<aaronavay62@aaronwl.com> wrote:
> This patch enables building libgcc_s as a DLL on MinGW and Cygwin. This
> allows throwing exceptions across DLL boundaries when using a shared
> libgcc_s.
>
> It needs approval from toplevel configure, gcc/mkmap, Windows and libstdc++
> maintainers.
>
Hello Aaron.
Thanks for doing this.
OK from this Windows maintainer, but wait for Dave Korn to comment.
One comment,
> +/* Weak symbols do not get resolved if using a Windows dll import lib.
> + Make the unwind registration references strong undefs. */
> +#if DWARF2_UNWIND_INFO
> +#define SHARED_LIBGCC_UNDEFS_SPEC \
> + "%{shared-libgcc: -u ___register_frame_info -u ___deregister_frame_info}"
> +#else
> +#define SHARED_LIBGCC_UNDEFS_SPEC ""
> +#endif
I agree this is the safest way to handle weak linkage in libgcc_s_1.dll
While your at it you may as well clean up the use of
GetModuleHandle/GetProcAddress to get in cygming-crtbegin.
Danny