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

Dennis Luehring dl.soluz@gmx.net
Fri Aug 28 13:17:00 GMT 2015


based on the briliant tutorial by Jeff Preshing
http://preshing.com/20141119/how-to-build-a-gcc-cross-compiler/

and his all-in-one-wonder shellscript: 
https://gist.github.com/preshing/41d5c7248dea16238b60
(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

with
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

make ARCH=$LINUX_ARCH INSTALL_HDR_PATH=$INSTALL_PATH/$TARGET headers_install

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

../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

https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/arch/sparc/include/asm/Kbuild?id=refs/tags/v2.6.32.67 
- contains traps.h
https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/arch/sparc/include/asm/Kbuild?id=refs/tags/v3.18.20 
- no traps.h
https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/arch/sparc/include/asm/Kbuild?id=refs/tags/v4.1.6 
- 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