This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: (no) GCC pre-compiled headers on Cygwin


On Jul 22, 2003, Corinna Vinschen <vinschen@redhat.com> wrote:

> The current implementation in Cygwin avoids to change the file in this
> scenario, thus allowing mappings only <= file size.

Yup, that's what I figured out.

>> Cygwin's fhandler_disk_file::mmap() simply
>> disregards the address when mapping without MAP_FIXED

> It did so until Cygwin 1.3.22, having a good right to do it according
> to SUSv3

No dispute here.  I realize this code in GCC wasn't written with
portability in mind, which is sad :-(

>> mmap should at least favor the given address over other
>> alternatives, even if this means issuing two calls, one with the
>> address and one without.

> The current test version of "next generation" ;-) Cygwin, 1.5.0, implements
> exactly that.

Excellent!

> Honestly, I wasn't aware in how many sick
> ways the call is used.  Keep in mind that Cygwin has all hands full
> to hold off applications from Windows specific limitations.

I do realize that, and I really appreciate the great job you've Cygwin
folks done in this regard.  It's currently almost possible to forget
the underlying OS is Windows :-)

> The non-standard expectations of some applications doesn't make it
> exactly easier...

Yup.  Portable programming is tricky, but coping with non-portable
programs is trickier.

> For the allocation granularity, Windows already has a call GetSystemInfo.
> For the mincore functionality it has the call VirtualQuery.

I was for some reason thinking we couldn't call these directly from
GCC, but of course we can.  I'm just not sure that we want to do it
:-)

> the mincore call is not backed by the standards

Yup.  Its current use looks very dangerous to me.

>> Anyway, we seem to still be a long way from getting PCH on Cygwin :-(

> Which is pretty weird.

The weirdness is in GCC.  This chunk of code wasn't written to be
portable, unfortunately, and it doesn't seem that it would be trivial
to rework it such that it is :-(

> Unfortunately, your posting hits me the last day before I'm on vacation
> and offline for two weeks.

I thought you were already offline, but I thought I'd copy you anyway,
because IIRC you wrote or revamped mmap recently.  Thanks a lot for
posting such a complete reply before going on vacation.  It seems like
all of the cases in which Cygwin could help us have already been
addressed.  Cool!

Thanks again,

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]