Some notes on the 'bootstrap with or without libc headers' debate: http://linuxfromscratch.org/pipermail/lfs-dev/2005-July/052409.html http://gcc.gnu.org/ml/gcc/2005-07/msg01195.html --- gcc/config/sh/linux.h +++ gcc/config/sh/linux.h @@ -154,6 +154,7 @@ /* Do code reading to identify a signal frame, and set the frame state data appropriately. See unwind-dw2.c for the structs. */ +#ifndef inhibit_libc #ifdef IN_LIBGCC2 #include #include @@ -304,6 +305,7 @@ #endif /* defined (__SH5__) */ #endif /* IN_LIBGCC2 */ +#endif /* inhibit_libc */ /* For SH3 and SH4, we use a slot of the unwind frame which correspond to a fake register number 16 as a placeholder for the return address --- gcc/config/rs6000/linux.h +++ gcc/config/rs6000/linux.h @@ -111,6 +111,7 @@ /* Do code reading to identify a signal frame, and set the frame state data appropriately. See unwind-dw2.c for the structs. */ +#ifndef inhibit_libc #ifdef IN_LIBGCC2 #include @@ -194,3 +195,4 @@ (FS)->retaddr_column = CR0_REGNO; \ goto SUCCESS; \ } while (0) +#endif /* inhibit_libc */ --- gcc/config/i386/linux.h +++ gcc/config/i386/linux.h @@ -218,6 +218,7 @@ /* Do code reading to identify a signal frame, and set the frame state data appropriately. See unwind-dw2.c for the structs. */ +#ifndef inhibit_libc #ifdef IN_LIBGCC2 /* There's no sys/ucontext.h for some (all?) libc1, so no signal-turned-exceptions for them. There's also no configure-run for @@ -282,3 +283,4 @@ } while (0) #endif /* not USE_GNULIBC_1 */ #endif /* IN_LIBGCC2 */ +#endif /* inhibit_libc */ --- gcc/config/alpha/linux.h +++ gcc/config/alpha/linux.h @@ -78,6 +78,7 @@ /* Do code reading to identify a signal frame, and set the frame state data appropriately. See unwind-dw2.c for the structs. */ +#ifndef inhibit_libc #ifdef IN_LIBGCC2 #include #include @@ -127,3 +128,4 @@ (FS)->retaddr_column = 64; \ goto SUCCESS; \ } while (0) +#endif /* inhibit_libc */ --- gcc/config/rs6000/linux64.h +++ gcc/config/rs6000/linux64.h @@ -561,13 +579,12 @@ /* Do code reading to identify a signal frame, and set the frame state data appropriately. See unwind-dw2.c for the structs. */ +#ifndef inhibit_libc #ifdef IN_LIBGCC2 #include #ifdef __powerpc64__ #include -enum { SIGNAL_FRAMESIZE = 128 }; - #else /* During the 2.5 kernel series the kernel ucontext was changed, but @@ -581,7 +598,6 @@ struct sigcontext_struct uc_mcontext; sigset_t uc_sigmask; }; -enum { SIGNAL_FRAMESIZE = 64 }; #endif #endif @@ -733,3 +731,9 @@ } while (0) #endif +#endif /* inhibit_libc */ +#ifdef __powerpc64__ +enum { SIGNAL_FRAMESIZE = 128 }; +#else +enum { SIGNAL_FRAMESIZE = 64 }; +#endif --- gcc/config.gcc +++ gcc/config.gcc @@ -295,7 +295,7 @@ need_64bit_hwint=yes ;; # Note the 'l'; we need to be able to match e.g. "shle" or "shl". -sh[123456789l]*-*-*) +sh[123456789lbe]*-*-*) cpu_type=sh need_64bit_hwint=yes ;;