Ignore host includes during cross compilation
Marcin Juszkiewicz
marcin.juszkiewicz at linaro.org
Thu Jul 15 08:59:03 BST 2010
As some of you know I came to Linaro from OpenEmbedded project. In OE we cross
compiled by default and to make it more easy we had one nice addon to gcc.
When host includes were used gcc errored out with "CROSS COMPILE BADNESS:
/usr/include used" style message. Patch is present in metadata:
http://cgit.openembedded.org/cgit.cgi/openembedded/tree/recipes/gcc/gcc-4.4.4/zecke-
no-host-includes.patch
Some time ago replacement was announced on OE mailing list:
http://thread.gmane.org/gmane.comp.handhelds.openembedded/34169
In that thread Khem Raj mentioned -Wno-poison-system-directories which is
available in CSL toolchains.
I would like to get that functionality in our cross compiler as this nicely
shows problems in packages. I got hit by that in eglibc when it fails with:
In file included from ../ports/sysdeps/arm/libc-tls.c:20:0:
../csu/libc-tls.c: In function ‘__libc_setup_tls’:
../csu/libc-tls.c:194:1: error: ‘__ARM_NR_set_tls’ undeclared (first use in
this function)
../csu/libc-tls.c:194:1: note: each undeclared identifier is reported only
once for each function it appears in
just because unistd.h used from host instead from target includes.
Regards,
--
JID: hrw at jabber.org
Website: http://marcin.juszkiewicz.com.pl/
LinkedIn: http://www.linkedin.com/in/marcinjuszkiewicz
More information about the linaro-toolchain
mailing list