On Wed, Mar 23, 2016 at 08:35:51PM +0100, Waldemar Brodkorb wrote: > > IIRC, the right way to do this is to first use glibc's install-headers > > target to get the header files installed, then you can build gcc. > > It is a method of building a cross-toolchain in a let's say "short" > way. One that works without libc, yeah. > It reduces the toolchain build time and is used by buildroot > and other toolchain building systems. It works fine for most of the > supported Linux architectures. It only fails for m68k, ia64 and > tile. As ia64 and tile is not supported by Buildroot, I have'nt > reported it, yet. I used to have a patch for ia64 but do not carry it anymore; I think it was fixed (but I cannot find the patch that did, ugh). Here is a tile patch, enjoy. Segher --- gcc/config/tilegx/linux.h | 2 +- libgcc/config/tilepro/atomic.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/config/tilegx/linux.h b/gcc/config/tilegx/linux.h index f68b044..d648560 100644 --- a/gcc/config/tilegx/linux.h +++ b/gcc/config/tilegx/linux.h @@ -55,7 +55,7 @@ /* For __clear_cache in libgcc2.c. */ #ifdef IN_LIBGCC2 -#include <arch/icache.h> +//#include <arch/icache.h> /* Use the minimum page size of 4K. Alternatively we can call getpagesize() but it introduces a libc dependence. */ diff --git a/libgcc/config/tilepro/atomic.h b/libgcc/config/tilepro/atomic.h index 78fa9a9..43d9828 100644 --- a/libgcc/config/tilepro/atomic.h +++ b/libgcc/config/tilepro/atomic.h @@ -93,7 +93,8 @@ #endif #ifdef __tilegx__ -#include <arch/spr_def.h> +//#include <arch/spr_def.h> +#define SPR_CMPEXCH_VALUE 0x2780 #else #include <asm/unistd.h> #endif -- 1.9.3