This is the mail archive of the
mailing list for the GCC project.
Re: [patch cygwin64]: Add and adjust some initial sources for x64 cygwin
- From: Dave Korn <dave dot korn dot cygwin at gmail dot com>
- To: Kai Tietz <ktietz70 at googlemail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 23 Mar 2013 01:30:59 +0000
- Subject: Re: [patch cygwin64]: Add and adjust some initial sources for x64 cygwin
- References: <CAEwic4aHSMyLT8oJGPQhnfRw=ciX+oFUvkV+0BVN7=LpWd9DfQ at mail dot gmail dot com> <514CF253 dot 7070204 at gmail dot com> <CAEwic4aB3cGNk7WkUh6EJ7rhjVAjU3PbH_65TwTUuf9VuN0k=g at mail dot gmail dot com> <514CF64D dot 2050701 at gmail dot com> <CAEwic4a=YUUxQbH1dN2baDGaxgpL=NyX5xGUL234NhuRDtH+kA at mail dot gmail dot com> <514CF8C9 dot 4050203 at gmail dot com> <CAEwic4bu2ZVe8SVbcE4fkecfN=j9Ycuft7aesnG1ULcXzQ0ODg at mail dot gmail dot com>
On 23/03/2013 00:57, Kai Tietz wrote:
> 2013/3/23 Dave Korn <firstname.lastname@example.org>:
>> On 23/03/2013 00:24, Kai Tietz wrote:
>>> 2013/3/23 Dave Korn <email@example.com>:
>>>> On 23/03/2013 00:16, Kai Tietz wrote:
>>>>> welcome, too. It would be even better if we could rethink actual the
>>>>> need of loading java-library within libgcc's cygwin's/mingw's crtbegin
>>>>> at all. I am actual not that sure, if we need this at all.
>>>> Somebody has to register the default classes at startup, or attempts to
>>>> classload them will fail.
>>> Right, but shouldn't that be done by libjava-DLL itself on loading
>>> (and deregistration on unloading)? I see no good point to add this
>>> into a different dll? But well, I might miss here an important point.
>> Well, libgcc is always there, and libjava doesn't have any specific hooks
>> where we could add startup code, which is why all targets do it by default in
>> libgcc/crtstuff.c along with the C++ default ctor stuff.
> Hmm, we have DllMain. it is enough for native Windows. And cygwin has
> same feature via DECLARE_CYGWIN_DLL( DllMain ); AFAIK.
Well, yes we do, but why not just do it the same way every other target does it?
Also, DllMain is very risky to do anything complex in. Without having some
strong guarantees about how the default java class registration code might or
might not behave, I don't want to call it from DllMain. (You've read