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. Is there some reason that every instance of linux-unwind.h should not start and end with those same #ifndef inhibit_libc ... #endif statements? 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?

Steve Kenton

[EMAIL PROTECTED] gcc-4.2.1-stock]$ grep -r MD_UNWIND_SUPPORT gcc/config/*
gcc/config/alpha/gnu.h:#undef MD_UNWIND_SUPPORT
gcc/config/alpha/linux.h:#define MD_UNWIND_SUPPORT "config/alpha/linux-unwind.h"
gcc/config/alpha/vms.h:#define MD_UNWIND_SUPPORT "config/alpha/vms-unwind.h"
gcc/config/i386/gnu.h:#undef MD_UNWIND_SUPPORT
gcc/config/i386/linux64.h:#define MD_UNWIND_SUPPORT "config/i386/linux-unwind.h" gcc/config/i386/linux.h:#define MD_UNWIND_SUPPORT "config/i386/linux-unwind.h" gcc/config/ia64/linux.h:#define MD_UNWIND_SUPPORT "config/ia64/linux-unwind.h"
gcc/config/ia64/unwind-ia64.c:#ifdef MD_UNWIND_SUPPORT
gcc/config/ia64/unwind-ia64.c:#include MD_UNWIND_SUPPORT
gcc/config/mips/linux.h:#define MD_UNWIND_SUPPORT "config/mips/linux-unwind.h" gcc/config/pa/pa32-linux.h:#define MD_UNWIND_SUPPORT "config/pa/linux-unwind.h"
gcc/config/pa/pa-hpux.h:#define MD_UNWIND_SUPPORT "config/pa/hpux-unwind.h"
gcc/config/rs6000/linux64.h:#define MD_UNWIND_SUPPORT "config/rs6000/linux-unwind.h" gcc/config/rs6000/linux.h:#define MD_UNWIND_SUPPORT "config/rs6000/linux-unwind.h" gcc/config/rs6000/darwin.h:#define MD_UNWIND_SUPPORT "config/rs6000/darwin-unwind.h"
gcc/config/s390/tpf.h:#define MD_UNWIND_SUPPORT "config/s390/tpf-unwind.h"
gcc/config/s390/linux.h:#define MD_UNWIND_SUPPORT "config/s390/linux-unwind.h"
gcc/config/sh/linux.h:#define MD_UNWIND_SUPPORT "config/sh/linux-unwind.h"
gcc/config/sparc/linux64.h:#define MD_UNWIND_SUPPORT "config/sparc/linux-unwind.h" gcc/config/sparc/linux.h:#define MD_UNWIND_SUPPORT "config/sparc/linux-unwind.h"

[EMAIL PROTECTED] gcc-4.2.1-stock]$ find  gcc/config -name linux-unwind.h
gcc/config/sparc/linux-unwind.h
gcc/config/mips/linux-unwind.h
gcc/config/i386/linux-unwind.h
gcc/config/pa/linux-unwind.h
gcc/config/ia64/linux-unwind.h
gcc/config/sh/linux-unwind.h
gcc/config/s390/linux-unwind.h
gcc/config/rs6000/linux-unwind.h
gcc/config/alpha/linux-unwind.h

[EMAIL PROTECTED] gcc-4.2.1-stock]$ grep inhibit_libc `find gcc/config -name linux-unwind.h`
gcc/config/mips/linux-unwind.h:#ifndef inhibit_libc
gcc/config/i386/linux-unwind.h: Don't use this at all if inhibit_libc is used. */
gcc/config/i386/linux-unwind.h:#ifndef inhibit_libc
gcc/config/i386/linux-unwind.h:#endif /* ifdef inhibit_libc  */
[EMAIL PROTECTED] gcc-4.2.1-stock]$

Reply via email to