Thursday, March 17, 2011

(e)glibc cross compiling issue...

While building a brand new powerpc cross-compiler with crosstool-ng (which is great), I came about a simple issue which was unexpectedly hard to fix:

../misc/syslog.c: In function '__vsyslog_chk':
../misc/syslog.c:123: sorry, unimplemented: inlining
failed in call to 'syslog': function body not available
../misc/syslog.c:155: sorry, unimplemented: called from here


Using different combinations of build helper tools, eglibc, gcc, whatever did not really help. Even the search engine results were full of the same questions but with very little answers, and most of the answers were clearly in the league of cargo cult programming, nothing you'd want to rely on for a toolchain to be used by others.
But finally I came across this mail from Mike Frysinger which finally showed that it can be as easy as
CT_LIBC_GLIBC_EXTRA_CFLAGS="-U_FORTIFY_SOURCE"
:-)
Of course the question remains why compiling glibc has to be always a major PITA, but that's something I'd rather not discuss in public...

Tuesday, March 08, 2011