Just committed a patch. Hope I got it right :-)

        Danny

On Mon, 2009-06-01 at 14:44 +0100, Dave Korn wrote:
> Danny Backx wrote:
> > I'm not sure I understand what the cygwin.h code would do :
> 
>   "If nothing is specified on the command line, or if -static or
> -static-libgcc is present, link against the static libgcc.  If -shared-libgcc
> is explicitly specified, or if building a DLL (-shared) and not explicitly
> specifying "-static-libgcc", link against the shared one.
> 
> > #define SHARED_LIBGCC_SPEC " \
> >  %{static|static-libgcc:-lgcc -lgcc_eh} \
> >  %{!static: \
> >    %{!static-libgcc: \
> >      %{!shared: \
> >        %{!shared-libgcc:-lgcc -lgcc_eh} \
> >        %{shared-libgcc:-lgcc_s -lgcc} \
> >       } \
> >      %{shared:-lgcc_s -lgcc} \
> >     } \
> >   } "
> > 
> > Is a normal developer supposed to use -shared-libgcc ?
> 
>   At the moment, it's not the default setting upstream, although it is in the
> cygwin distro compiler.  We plan on throwing the switch to make it default
> once we've got glitches worked out with the language runtime DLLs.  It is
> however enabled when building a DLL, since that makes it very likely you are
> going to have to worry about exceptions crossing image boundaries.
> 
> > The DLL sample in test/shared runs these commands, and works as it
> > should :
> 
>   Note that the equation is libgcc_s = libgcc + libgcc_eh (approximately - in
> fact there are a couple of leftover bits in the static one that don't belong
> in the DLL and so that's why we still add '-lgcc' after '-lgcc_s', to fill out
> any references to them).  Your current LIBGCC_SPEC definition in mingw32ce.h
> just has "-lgcc", so what happens is that you're always linking statically,
> and the shared libgcc DLL will never be used.  The reason the test works is
> because it doesn't use any EH functions I'd guess, so the stuff in the static
> libgcc.a is enough for it to link.  You could check whether it has any imports
> from the libgcc_s DLL or not to confirm that.
> 
>     cheers,
>       DaveK
> 
> ------------------------------------------------------------------------------
> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
> is a gathering of tech-side developers & brand creativity professionals. Meet
> the minds behind Google Creative Lab, Visual Complexity, Processing, & 
> iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
> Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
> _______________________________________________
> Cegcc-devel mailing list
> Cegcc-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/cegcc-devel
> 
-- 
Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel

Reply via email to