[PATCH] Build libgcc_s on Windows
Danny Smith
dansmister@gmail.com
Tue Aug 19 05:16:00 GMT 2008
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
More information about the Gcc-patches
mailing list