The mmap configure test in gcc subdirectory has this comment for test_3: Getting two adjacent 1-page regions with two mmap calls is slightly tricky. All OS's tested skip over already-allocated blocks; therefore we have been careful to unmap all allocated regions in previous tests. HP/UX allocates pages backward in memory. No OS has yet been observed to be so perverse as to leave unmapped space between consecutive calls to mmap. Solaris 8 & 9 leave unmapped space (which isn't perverse, BTW), so the test fails. Running the test yields something like: test 3 nonconsecutive pages - ff380000, ff360000 Release: gcc-3.2 Environment: Solaris 8 & 9 on SPARC, possibly others How-To-Repeat: Just run the test.
Fix: I've added the second argument to anonmap() and if that argument isn't zero, it's passed as the first argument to mmap(), along with MAP_FIXED flag. I've modified test_3() to use it for the second mapping. With that in place, the whole mmap test succeeds.
State-Changed-From-To: open->analyzed State-Changed-Why: Confirmed on Sparc/Solaris 9.
This sounds kinda like http://archive.linuxfromscratch.org/mail-archives/lfs-dev/2003/03/0193.html which was mentioned in http://linuxfromscratch.org/~greg/pure_lfs.txt (see footnote 2). I emailed the lfs guys to ask them to comment...
Aha. They said "see bug 10284".
I propose to fix this as well as bug 10284 by blacklisting the two host systems (Windows and VMS) that don't have the exact mmap behavior we want, thus eliminating the need for this very fragile test.
I'm all for it: the more we can get rid of dumb assumptions like the one in this check, the more portable the compiler will be.
Subject: Re: [sparc-sun-solaris2.8/9] anon mmap configure test fails zack@gcc.gnu.org wrote:- > PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org. > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8365 > > > zack@gcc.gnu.org changed: > > What |Removed |Added > ---------------------------------------------------------------------------- > Status|NEW |ASSIGNED > Last reconfirmed|0000-00-00 00:00:00 |2003-06-01 03:40:04 > date| | > > > ------- Additional Comments From zack@gcc.gnu.org 2003-06-01 03:40 ------- > I propose to fix this as well as bug 10284 by blacklisting the two host > systems (Windows and VMS) that don't have the exact mmap behavior we want, thus > eliminating the need for this very fragile test. Now that CPP doesn't mmap its input, is this configure step even needed? Neil.
Subject: Re: [sparc-sun-solaris2.8/9] anon mmap configure test fails That's a different check (HAVE_MMAP_FILE) and it's still used in several places - PCH, libintl, fixincludes. But I'm planning to get rid of the big hairy AC_TRY_RUN test for that, too.
*** This bug has been marked as a duplicate of 3163 ***