Sam Morris wrote: > On Tue, 2009-08-25 at 21:50 +0200, Robert Millan wrote: > > On Mon, Aug 24, 2009 at 08:54:47PM +0100, Sam Morris wrote: > > > I've been successfully rebuilding the gcc-mingw32 packages for this > > > reason. > > > > > > The first change I make is to configure with --enable-shared. > > > > > > The second is to create 'debian/dirs' containing the line 'usr/bin'. > > > This is necessary to work around a couple of bugs in gcc's Makefiles: > > > > > > 1. It does not create $(DESTDIR)/usr/bin before trying to copy > > > libgcc_s_sjlj-1.dll to that directory > > > 2. It does not abort the 'make install' process when it fails to > > > copy libgcc_s_sjlj-1.dll to that directory > > > > Please could you send this as a patch? > > Attached to this message. > > BTW, I just realised that this is the true fix for #539033. With this > patch, the default behaviour will be to link against libgcc dynamically, > but linking with -static-libgcc appears to toggle this.
Thanks to Sam for the patch, worked fine in building a thread-safe exception-over-DLL-borders mingw. Dear Robert, if you are going to include the shared libgcc in the standard distribution, please note that in the current mingw32 upstream the libgcc is linked against the non-thread-safe libmingw32.a, resulting in DLL exception safety and thread safety being mutually exclusive. See the discussion on http://n2.nabble.com/gcc-4-4-multi-threaded-exception-handling-thread-specifier-not-working-td3440749.html for details. I've attached a patch for the current source. The advantage is that multi-threaded programs with shared libgcc become possible, the disadvantage is that libgcc_s will be dependent on mingwm10.dll. Considering that programs sophisticated enough for cross-DLL exception throwing will almost certainly be using multi-threading and that being unable to compile/run many programs outweighs the small performance bonus for a non-thread-safe libgcc_s, I'd re- commend to apply the patch. In the linked discussion, Peter Hurley recommends a more sophisticated and long-term solution, but this should probably be done in the upstream. -- Steve Wolter (Bielefeld Univ.) | Web page: http://swolter.sdf1.org | vCard: http://swolter.sdf1.org/swolter.vcf A witty saying proves nothing. | Schedule: http://swolter.sdf1.org/sched.cgi -- Voltaire (1694-1778) | E-mail: swol...@sdf.lonestar.org
signature.asc
Description: Digital signature