[PATCH 64bit] Fix ONDEE for 64bit

Corinna Vinschen corinna-cygwin@cygwin.com
Sat Mar 16 10:45:00 GMT 2013

On Mar 15 16:56, Yaakov wrote:
> On Fri, 15 Mar 2013 11:26:55 +0100, Corinna Vinschen wrote:
> > ftp://ftp.cygwin.com/pub/cygwin/64bit/x86_64-pc-cygwin-gcc-20130305.patch
> > 
> > I didn't change anything in the toolchain since then.
> This hunk doesn't look right (gcc/config/i386/i386.c):
> >        if (TARGET_64BIT && DEFAULT_ABI == MS_ABI)
> > -       ix86_cmodel = CM_SMALL_PIC, flag_pic = 1;
> > +#ifdef TARGET_CYGWIN64
> > +       ix86_cmodel = CM_MEDIUM_PIC, flag_pic = 1;
> > +#else
> > +       ix86_cmodel = CM_MEDIUM_PIC, flag_pic = 1;
> > +#endif
> It doesn't affect us right now, but this needs to be fixed before
> pushing upstream.

No, this is right at the moment, according to Kai.  Cygwin is supposed
to use the medium code model by default anyway, to support the notion
not having to add "dllimport" to any variable imported from a DLL.  And
the second case is a "reminder to self" from Kai that he's planning to
use the medium model by default on Mingw64 as well at one point.

> Also, in libstdc++-v3/crossconfig.m4:
> > +  *-cygwin*)
> > +    ;;
> I think cygwin should be added to the preceding linux|gnu|k*bsd-gnu
> case, as we also have /dev/random, pthreads, and iconv.

Yeah, this sounds like the right thing to do.  Thanks for the reminder.
I can build a new linux toolchain next week, and I suppose you did
build your native gcc toolchain with these changes already?

> BTW, the good news is that I was able to build cygwin-64bit-branch and
> gcc (3-stage bootstrap with C/C++) natively on x86_64, albeit with
> -j1, so we're officially at the point of self-hosting.  Hopefully your
> latest patches will fix parallel make, but that will have to wait until
> next week.

Yes, it does, but the price is too high.  It's still a really puzzeling
problem and the patch, even though it appeared to fix parallel makes,
is apparently only covering the real, still undiscovered problem.

The patch only moved the place in the code at which the pseudo relocator
is called in the child after fork.  In the old location, everything
appears to work fine, except for those weird, random crashes in parallel
makes.  In the new location, the parallel makes work fine, but then
autoreconf hangs in bash.

This is really, really frustrating.  I hope we can fix this next week,
but right now I need a weekend off to get my head clear.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

More information about the Cygwin-patches mailing list