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: precompiled header support


Gunther Nikl <gni@gecko.de> writes:

> What host capabilites are required to use precompiled headers? The sources
> seem to imply that mmap() is required to load a PCH to fixed address. What
> happens if a host doesn't support mmap? To which address the PCH will be
> loaded?

Really what is required is that the host provide a fixed address at
which a PCH can be loaded.  This address must be fixed for a
particular instance of cc1, not necessarily fixed in general.

On some hosts the natural way to implement this is to use mmap with a
fixed address.  See config/host-linux.c in mainline.  On at least one
host, the natural way to implement this is to define a large array
within gcc1 itself.  See config/rs6000/host-darwin.c.

> Is it possible to disable generating/using precompiled headers for hosts
> that don't support it?

Well, nobody requires you to generate a precompiled header.

At present there is no simple way to detect whether precompiled
headers will work reliably on your host.  If the mainline version of
the gcc.dg/pch tests in the testsuite pass on your host, then I
believe that precompiled headers are fully reliable.

Ian


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