This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: precompiled header support
DJ Delorie <dj@redhat.com> writes:
> > So does this imply pch can't be made to work (as it stands) on
> > djgpp-hosted gcc? (I'm just thinking about hosts apart from the
> > amiga that don't support the semantics needed to reload-in-place).
>
> There is no mmap() function in DJGPP at all. So, if you rely on mmap,
> it won't work.
What the current PCH implementation relies on is the ability to have a
known fixed memory address which can be used when loading the PCH.
On Unix systems this is typically implemented using mmap (see
config/host-linux.c). However, mmap is not the requirement. A fixed
address is the requirement. See config/rs6000/host-darwin.c for how
this is done using a very large array. The Darwin code then uses mmap
to release the portion of the array which is not required, but that is
not necessary for PCH support. Not that I imagine that this approach
will work for DJGPP.
Ian