try to compile cross compilers for sparc,alpha and powerpc + glibc 2.22

Dennis Luehring
Fri Aug 28 13:17:00 GMT 2015

based on the briliant tutorial by Jeff Preshing

and his all-in-one-wonder shellscript:
(the questions uses this script+line numbers as orientation)

im able to build a cross-compile suite for aarch64 without any problem
just installed debian 8.1 in a virtual machine

changed BINUTILS_VERSION to binutils-2.25 in line 21
changed LINUX_KERNEL_VERSION to linux-3.18.20 in line 29

and started the scripts - works out of the box in ~13min to get a cross 
compile suite for aarch64

1. binutils
2. kernel-headers
3. c/c++ compiler
4. glibc <-- compile problems at this point with sparc,alpha,powerpc - 
but not with aarch64
5. libstdc++

then i tried to build a cross-compiler suite for sparc,alpha and powerpc 
(TARGET in line 16)
and stuck in every target on glibc compilation due to (what i think) 
missing headers

it seems that glibc wants some headers that aren't "exported" in line 72 
using kernel make headers_install


while compiling glibc with sparc-linux-gcc the make process throws this 

../sysdeps/unix/sysv/linux/sparc/sys/trap.h:5:23: fatal error: 
asm/traps.h: No such file or directory

i've checked my /opt/cross/sparc-linux/include/asm/ and there is no traps.h

then i've checked the kernel Kbuilds for the headers_install and found 
that the traps.h export is only in the v2.6.x branch 
- contains traps.h 
- no traps.h 
- no traps.h

my question is - are there different settings needed (in the scrip) for 
building glibc for sparc with v3.18.20 kernel headers
or is it a bug, or any other ideas what i can do - except using distros 
prebuild cross develop tools (i want to go the hard way)

More information about the Libc-help mailing list