Gcc 4.2.2 build failure (fixincludes breaks limits.h)

Kristian Van Der Vliet vanders@liqwyd.com
Tue Jan 15 15:27:00 GMT 2008

I'm in the process of upgrading the Syllable port of Gcc 4.1.2 to 4.2.2
but have run into a build failure. The stage2 configure tests for mmap()
always pass, although mmap() is not available on Syllable. This produces
a stage2 xgcc which fails during the stage3 build with:

"virtual memory exhausted: Function not implemented"

I've tracked this down to a problem where fixincludes has produced a
local limits.h file. This is the file which the configure tests include
before checking for the __stub_mmap macro.

In the normal case the Glibc limits.h includes features.h, which
includes stubs.h which then defines these stub macros, but the limits.h
which is produced by fixincludes does not include features.h, so the
macro is never defined and the simple conftest incorrectly passes.

This is obviously also a problem for all of the other functions which
are tested for in the same manner, although mmap() is the one I'm
specifically having trouble with.

I've pulled the test out of the configure script to test this
(attached), and built it with

-B/usr/gcc/i586-pc-syllable/bin/ -o conftest -O2 -g -fomit-frame-pointer
-v  conftest.c

Is there any way I can stop fixincludes from mangling limits.h, or at
least ensuring it always keeps the include for features.h?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: conftest.c
Type: text/x-csrc
Size: 984 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20080115/abcc392c/attachment.bin>

More information about the Gcc-help mailing list