This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc on OSR5 status. was: bootstraps broken during last 24 hours
On Mon, Jan 08, 2001 at 11:06:28PM -0600, Robert Lipe wrote:
>
> I haven't checked the tree lately, but the underlying problem was that
> on the -udk target when running on openserver, we see the #define for
> MAP_ANONYMOUS and try to use it. Unfortunately, when running on an
> OpenServer system, mmap doesn't support MAP_ANONYMOUS. (An identical
> binary running on a UnixWare system will. It's just the underlying
> system calls that differ.
How... interesting.
...
> > - we do mmap(NULL, size, READ/WRITE, MAP_ANON, -1, 0) if we think we
> > have MAP_ANON. -1 is the file descriptor argument. What does -udk
> > do when handed this?
>
> There isn't a MAP_ANON, only a MAP_ANONYMOUS
It looks for either, but one of them is preferred. As far as I know
all systems either define only one, or define them both to the same
value. I wanted to be sure that this wasn't an oddball that defined
both, with different values, and only one worked.
...
> > - Can we do instead
> > mmap(NULL, size, READ/WRITE, MAP_PRIVATE, /dev/zero, 0) ?
>
> Yes, that works and that's the fallback I think we're falling into
> when I #undef MAP_ANONYMOUS.
>
> Now, with all of that typing done I just removed the #undef and cranked
> a bootstrap on UDK. Seems to work. I can't explain the difference.
The autoconf test might (should, in fact) detect the problem and
disable mmap entirely. Could you check the definitions of
HAVE_MMAP_ANYWHERE and HAVE_VALLOC in auto-host.h, and the definition
of GGC in the Makefile, please?
I'll see about a fallback to /dev/zero. Just how close are the
OpenServer and UnixWare configurations? Unless it's common to move
cc1 binaries between systems, we'd probably rather do the fallback at
compile time.
Does OpenServer react badly to a mmap(..., MAP_ANON, /dev/zero, 0) -
i.e. does the fallback need to change the flags as well as the fd
argument?
zw