Hi Guys, I'm currently trying to build uClibc-0.9.30-rc1 for SH2aeb and found an issue when building which I fixed with the attached patches.
make[2]: Entering directory `/opt/sh/2a/build/src/test-apps-0.1' sh2aeb-linux-uclibc-gcc -Wl,-EB test.c -o test test.c: In function 'main': test.c:5: warning: return type of 'main' is not 'int' /opt/sh/2a/toolchain/usr/lib/libc.a(memcpy.o): In function `memcpy': memcpy.c:(.text+0x60): undefined reference to `WORD_COPY_FWD' collect2: ld returned 1 exit status make[2]: *** [test] Error 1 I think its the right thing to do - i.e. follow the SH4, and define ARCH_HAS_BWD, but then I had to copy the include from memmove to memcpy which I don't think is a particularly nice way to do this. Why is it currently including a .c file in this way? -- Cheers Kieran Bingham
Index: uClibc-0.9.30-rc1/extra/Configs/Config.sh =================================================================== --- uClibc-0.9.30-rc1.orig/extra/Configs/Config.sh 2008-10-02 19:23:39.000000000 +0100 +++ uClibc-0.9.30-rc1/extra/Configs/Config.sh 2008-10-02 19:25:24.000000000 +0100 @@ -25,7 +25,7 @@ that uClibc will work at all.... Here are the available choices: - - "SH2A" Renesas SH-2A (SH7206) + - "SH2A" Renesas SH-2A - "SH2" SuperH SH-2 - "SH3" SuperH SH-3 - "SH4" SuperH SH-4 @@ -52,4 +52,4 @@ config ARCH_HAS_BWD_MEMCPY bool default y - depends on CONFIG_SH4 + depends on CONFIG_SH4 || CONFIG_SH2A --- uClibc-0.9.30-rc1-unpatched/libc/string/generic/memcpy.c 2008-09-09 17:55:27.000000000 +0100 +++ uClibc-0.9.30-rc1/libc/string/generic/memcpy.c 2008-10-02 19:42:33.000000000 +0100 @@ -23,6 +23,10 @@ #include "memcopy.h" #include "pagecopy.h" +#ifdef __ARCH_HAS_BWD_MEMCPY__ +/* generic-opt memmove assumes memcpy does forward copying! */ +#include "_memcpy_fwd.c" +#endif /* Experimentally off - libc_hidden_proto(memcpy) */ void *memcpy (void *dstpp, const void *srcpp, size_t len)
_______________________________________________ uClibc mailing list uClibc@uclibc.org http://busybox.net/cgi-bin/mailman/listinfo/uclibc