Stephen M. Kenton wrote:
During the recent discussion about cross compilers I was told "bugs
happen", so I went hunting.
I have been digging into why building a cross compiler dies in different
ways for different targets.
As seen below, the Linux targets which use glibc define
MD_UNWIND_SUPPORT and have
a customized linux-unwind.h file. However, mips and i386 start and end
those files with
#ifndef inhibit_libc .... #endif statements which disable the entire
contents of the file if inhibit_libc is set.
Those are the only two such targets I can successfully build with
inhibit_libc without the use of enable-sjlj-exceptions.
You never state what you are trying to build. "cross compiler" does not
really narrow it down.
Also you don't state what errors you are experiencing.
Is there some reason that every instance of linux-unwind.h should not
start and end with those same
#ifndef inhibit_libc ... #endif statements?
In the case of mips, I believe that inhibit_libc is a surrogate for a
check that signal.h and asm/unistd.h are usable.
Or, alternatively, should
setting of inhibit_libc force
a #undef MD_UNWIND_SUPPORT at some suitably central place rather than
doing things the
way that mips and i386 currently handle it?
I think Danial Jacobowitz is probably correct in that the structure
definitions should just be copied into libgcc so that we are not
dependent on libc.
David Daney