Build error: gcc -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -mpreferred-stack-boundary=2 -falign-jumps=0 -falign-loops=0 -Os -fno-stack-protector-all -fstack-protector -fno-builtin -nostdinc -D_LIBC -I../../../../include -I. -I/usr/lib/gcc-lib/i386-pc-linux-uclibc/3.3.4/include -DNDEBUG -fPIC -c ssp.c -o ssp.o In file included from ../../../../include/linux/list.h:5, from ../../../../include/linux/sysctl.h:23, from ../../../../include/sys/sysctl.h:28, from ssp.c:32: ../../../../include/linux/prefetch.h: In function __cast__' ../../../../include/linux/prefetch.h:63: error: syntax error before "char" ../../../../include/linux/prefetch.h:65: error: syntax error before "char" ../../../../include/linux/prefetch.h:65: error: syntax error before ')' token ../../../../include/linux/prefetch.h:65: warning: statement with no effect make[4]: *** [ssp.o] Error 1 make[4]: Leaving directory /var/tmp/portage/uclibc-0.9.26-r7/work/uClibc-0.9.26/libc/sysdeps/linux' make[2]: *** [_dir_linux] Error 2 make[2]: Leaving directory /var/tmp/portage/uclibc-0.9.26-r7/work/uClibc-0.9.26/libc' make: *** [_dir_libc] Error 2 It also had some kind of redefinition warnings, but these were eliminated when using latest ssp.c from uClibc CVS.
I'm using stage1-hardened-embedded x86 with linux26-headers. Possible fix following.
Created attachment 45399 [details, diff] Possible fix to linux26-headers I'm not sure about the paths or whether this works or not. The new prefetch.h is taken from 2.6.9.1 sources.
This patch fixed (new prefetch.h) the uClibc build. Could we get this into portage ASAP?
Already fixed in our -r8/-r9 (should be in portage shortly if not already)
Try -r8... The patch is no good since C++ apps will break...
Tried with uclibc-r8, still b0rkage. Is it possible to add some kind of #ifdef cplusplus conditionals into prefetch.h?
ignore me.
Something with a broken toolset than headers; I can compile this fine using the same set of headers, albeit on a non-embedded system.
tim's right, we can blame uclibc ... when _LIBC is defined, uclibc's features.h fakes out __LINUX_COMPILER thus preventing the real linux/compiler.h from being included this prevents __cast__ from being defined fix is to add __cast__ to uclibc's features.h which i'll do in our ebuild and upstream
ok, ive fixed this upstream, just need to add the patch to our 0.9.26-r8 :)
fixed in cvs, thanks !