As discussed in #gentoo-embedded I'm compiling for a new platform. Uclibc has some problems: clibc/4.3.1/include -DNDEBUG -fpic -c lckpwdf.c -o lckpwdf.o In file included from ../../include/asm/sigcontext.h:6, from ../../include/bits/sigcontext.h:28, from ../../include/signal.h:309, from lckpwdf.c:24: ../../include/asm/ptrace.h:4:29: error: asm/arch/ptrace.h: No such file or directory In file included from ../../include/bits/sigcontext.h:28, from ../../include/signal.h:309, from lckpwdf.c:24: ../../include/asm/sigcontext.h:18: error: field 'regs' has incomplete type make[2]: *** [lckpwdf.o] Error 1 make[2]: *** Waiting for unfinished jobs.... crisv32-axis-linux-uclibc-strip -x -R .note -R .comment __parsespent.o make[2]: Leaving directory `/var/tmp/portage/cross-crisv32-axis-linux-uclibc/uclibc-0.9.28.3-r7/work/uClibc-0.9.28.3/libc/pwd_grp' make[1]: *** [_dir_pwd_grp] Error 2 make[1]: Leaving directory `/var/tmp/portage/cross-crisv32-axis-linux-uclibc/uclibc-0.9.28.3-r7/work/uClibc-0.9.28.3/libc' With respect to limit.h there are some other include errors, I wonder what the actual problem is in this case. If it is the ptrace.h that is not found or the regs having an incomplete type. Reproducible: Always
The incomplete type for "regs" is a result of the missing ptrace.h, because ptrace.h defines struct pt_regs. Looks like your cris kernel headers have problems, they don't seem quite right in mainline kernels right now http://article.gmane.org/gmane.linux.kernel/721394/match=cris+header+brokenness I think in your case either asm/arch-v10 or asm/arch-v32 should be linked as /usr/include/asm/arch, so that the proper version of ptrace.h will be found.
That patch mentioned there is available in a different form in the current 2.6.26. Now I presume the problem is in tc-arch-kernel (Linux headers). Since cris is not defined it will go inho the eclass kernel-2 and end up in: *) dodir ${ddir}/asm cp -pPR "${S}"/include/asm/* ${D}/${ddir}/asm ;; Shouldn't that copy everything? The second thing is ofcourse the symlink to 'arch'.
Making progress: make -C ldso make[2]: Entering directory `/var/tmp/cross/crisv32-axis-linux-uclibc/portage/cross-crisv32-axis-linux-uclibc/uclibc-0.9.28.3-r7/work/uClibc-0.9.28.3/ldso/ldso' crisv32-axis-linux-uclibc-gcc -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-stack-protector -Os -funit-at-a-time -DUCLIBC_LDSO=\"ld-uClibc.so.0\" -mlinux -fpic -DUCLIBC_RUNTIME_PREFIX=\"/\" -fno-builtin -nostdinc -D_LIBC -DLDSO_ELFINTERP=\"cris/elfinterp.c\" -I../../ldso/ldso/cris -I../../ldso/include -I../../ldso/ldso -I../../include -D_GNU_SOURCE -isystem /usr/lib/gcc/crisv32-axis-linux-uclibc/4.3.1/include -c cris/resolve.S -o cris/resolve.o crisv32-axis-linux-uclibc-strip -x -R .note -R .comment cris/resolve.o crisv32-axis-linux-uclibc-gcc -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-stack-protector -Os -funit-at-a-time -DUCLIBC_LDSO=\"ld-uClibc.so.0\" -mlinux -fpic -DUCLIBC_RUNTIME_PREFIX=\"/\" -fno-builtin -nostdinc -D_LIBC -DLDSO_ELFINTERP=\"cris/elfinterp.c\" -I../../ldso/ldso/cris -I../../ldso/include -I../../ldso/ldso -I../../include -D_GNU_SOURCE -isystem /usr/lib/gcc/crisv32-axis-linux-uclibc/4.3.1/include -c ldso.c -o ldso.o In file included from ../../ldso/include/ldso.h:37, from ldso.c:33: ../../ldso/include/dl-syscall.h:144: error: expected declaration specifiers or '...' before '__syscall_mmap2' ../../ldso/include/dl-syscall.h:144: error: expected declaration specifiers or '...' before 'addr' ../../ldso/include/dl-syscall.h:144: error: expected declaration specifiers or '...' before 'len' ../../ldso/include/dl-syscall.h:145: error: expected declaration specifiers or '...' before 'prot' ../../ldso/include/dl-syscall.h:145: error: expected declaration specifiers or '...' before 'flags' ../../ldso/include/dl-syscall.h:145: error: expected declaration specifiers or '...' before 'fd' ../../ldso/include/dl-syscall.h:145: error: expected declaration specifiers or '...' before 'offset' ../../ldso/include/dl-syscall.h:145: warning: type defaults to 'int' in declaration of '_syscall6' ../../ldso/include/dl-syscall.h: In function '_dl_mmap': ../../ldso/include/dl-syscall.h:160: warning: implicit declaration of function '__syscall_mmap2' ../../ldso/include/dl-syscall.h:161: warning: return makes pointer from integer without a cast make[2]: *** [ldso.o] Error 1 make[2]: Leaving directory `/var/tmp/cross/crisv32-axis-linux-uclibc/portage/cross-crisv32-axis-linux-uclibc/uclibc-0.9.28.3-r7/work/uClibc-0.9.28.3/ldso/ldso' make[1]: *** [ldso] Error 2 make[1]: Leaving directory `/var/tmp/cross/crisv32-axis-linux-uclibc/portage/cross-crisv32-axis-linux-uclibc/uclibc-0.9.28.3-r7/work/uClibc-0.9.28.3/ldso' make: *** [_dir_ldso] Fout 2
I have made some progress with the daily of uclibc... but I'm stuck at: /usr/crisv32-axis-linux-uclibc/usr/include/asm/page.h:9:1: warning: this is the location of the previous definition STRIP -x -R .note -R .comment libpthread/linuxthreads.old/libpthread_so.a AR cr libpthread/linuxthreads.old/libpthread_so.a LD libpthread-0.9.29.so /usr/libexec/gcc/crisv32-axis-linux-uclibc/ld: ./lib/crti.o, section .init: relocation R_CRIS_32 should not be used in a shared object; recompile with -fPIC /usr/libexec/gcc/crisv32-axis-linux-uclibc/ld: ./lib/crti.o, section .fini: relocation R_CRIS_32 should not be used in a shared object; recompile with -fPIC /usr/libexec/gcc/crisv32-axis-linux-uclibc/ld: libpthread/linuxthreads.old/libpthread_so.a(manager.os), section .text: relocation R_CRIS_32_PCREL should not be used in a shared object; recompile with -fPIC /usr/libexec/gcc/crisv32-axis-linux-uclibc/ld: libpthread/linuxthreads.old/libpthread_so.a(manager.os), section .text: relocation R_CRIS_32_PCREL should not be used in a shared object; recompile with -fPIC /usr/libexec/gcc/crisv32-axis-linux-uclibc/ld: libpthread/linuxthreads.old/libpthread_so.a(spinlock.os), section .text: relocation R_CRIS_32_PCREL should not be used in a shared object; recompile with -fPIC ./lib/crti.o: In function `_init': (.init+0xc): undefined reference to `$pc' /usr/libexec/gcc/crisv32-axis-linux-uclibc/ld: warning: creating a DT_TEXTREL in object. collect2: ld returned 1 exit status make: *** [lib/libpthread.so] Fout 1 Without pthread I get a nice library... but that is pretty useless because gcc needs it...
Created attachment 164763 [details, diff] Get cris and old pthreads working... We need to work on the headers that are included, but this patch is probably fixing the compilation issue.
please submit cris patches upstream. we'll review+merge them there.