This is the mail archive of the
mailing list for the GCC project.
Re: [RFA] Invalid mmap(2) assumption in pch (ggc-common.c)
- From: Geoffrey Keating <geoffk at geoffk dot org>
- To: Matt Thomas <matt at 3am-software dot com>
- Cc: Jason Thorpe <thorpej at shagadelic dot org>, gcc at gcc dot gnu dot org
- Date: 23 Apr 2005 21:50:16 -0700
- Subject: Re: [RFA] Invalid mmap(2) assumption in pch (ggc-common.c)
- References: <426AEB90.email@example.com>
Matt Thomas <firstname.lastname@example.org> writes:
> Running the libstdc++ testsuite on NetBSD/sparc or NetBSD/sparc64
> results in most tests failing like:
> <command line>:1: fatal error: had to relocate PCH
> compilation terminated.
> compiler exited with status 1
> This is due to a misassumption in ggc-common.c:654
> This version assumes that the kernel honors the START operand of mmap
> even without MAP_FIXED if START through START+SIZE are not currently
> mapped with something.
> That is not true for NetBSD. Due to MMU idiosyncracies, some architecures
> (like sparc and sparc64) will align mmap requests that don't have MAP_FIXED
> set for architecture specific reasons).
Such systems should work anyway, so long as the alignment is consistent;
the address being requested is one which was returned from mmap() in
a previous invocation of the compiler.
If the alignment isn't consistent, then you might look at overriding
this routine for your host. There are custom versions for Solaris,
Linux, Darwin, and HPPA, each of which uses a different implementation