Linux kernel >= 2.6.25 doesn't install asm/elf.h and asm/user.h at make headers_install process. This causes a glibc compile failure on sh architecture. A proposed patch importing from kernel header is attached. Here is build error log. In file included from ../sysdeps/unix/sysv/linux/sh/sys/procfs.h:31, from ../nptl/../nptl_db/thread_db.h:29, from ../nptl/descr.h:33, from ../nptl/sysdeps/sh/tls.h:87, from ../include/tls.h:6, from ../sysdeps/unix/sysv/linux/sh/sysdep.h:27, from ../sysdeps/unix/sysv/linux/sh/sh4/sysdep.h:4, from <stdin>:1: ../sysdeps/unix/sysv/linux/sh/sys/user.h:24:22: error: asm/user.h: No such file or directory In file included from ../nptl/../nptl_db/thread_db.h:29, from ../nptl/descr.h:33, from ../nptl/sysdeps/sh/tls.h:87, from ../include/tls.h:6, from ../sysdeps/unix/sysv/linux/sh/sysdep.h:27, from ../sysdeps/unix/sysv/linux/sh/sh4/sysdep.h:4, from <stdin>:1: ../sysdeps/unix/sysv/linux/sh/sys/procfs.h:32:21: error: asm/elf.h: No such file or directory In file included from ../nptl/../nptl_db/thread_db.h:29, from ../nptl/descr.h:33, from ../nptl/sysdeps/sh/tls.h:87, from ../include/tls.h:6, from ../sysdeps/unix/sysv/linux/sh/sysdep.h:27, from ../sysdeps/unix/sysv/linux/sh/sh4/sysdep.h:4, from <stdin>:1: ../sysdeps/unix/sysv/linux/sh/sys/procfs.h:76: error: expected specifier-qualifier-list before 'elf_gregset_t' ../sysdeps/unix/sysv/linux/sh/sys/procfs.h:102: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'prgregset_t' ../sysdeps/unix/sysv/linux/sh/sys/procfs.h:103: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'prfpregset_t' In file included from ../nptl/descr.h:33, from ../nptl/sysdeps/sh/tls.h:87, from ../include/tls.h:6, from ../sysdeps/unix/sysv/linux/sh/sysdep.h:27, from ../sysdeps/unix/sysv/linux/sh/sh4/sysdep.h:4, from <stdin>:1: ../nptl/../nptl_db/thread_db.h:383: error: expected declaration specifiers or '...' before 'prfpregset_t' ../nptl/../nptl_db/thread_db.h:387: error: expected declaration specifiers or '...' before 'prgregset_t' ../nptl/../nptl_db/thread_db.h:397: warning: type defaults to 'int' in declaration of 'prfpregset_t' ../nptl/../nptl_db/thread_db.h:397: error: expected ';', ',' or ')' before '*' token ../nptl/../nptl_db/thread_db.h:401: error: expected declaration specifiers or '...' before 'prgregset_t' make[2]: *** [/builddir/build/BUILD/glibc-20080828T1623/build-sh4-linuxnptl/tcb-offsets.h] Error 1 make[2]: Leaving directory `/builddir/build/BUILD/glibc-20080828T1623/csu'
Created attachment 3027 [details] glibc-2.8-shasm.patch
i think you're missing unistd.h include as well http://sources.gentoo.org/gentoo/src/patchsets/glibc/2.9/6415_all_sh-glibc-2.5-no-asm-user-header.patch http://sources.gentoo.org/gentoo/src/patchsets/glibc/2.9/6416_all_sh-glibc-2.5-no-asm-elf-header.patch
A different but similar patch has been checked in on 2009-02-26.