As shown below, cross-compilation of klibc fails when the first .c file is to be compiled. This is caused by using ARCH and CROSS instead of KLIBCARCH and CROSS_COMPILE (as documented in klibc's README) in the ebuild. * Found kernel source directory: * /doc/stor/lab/proxima_amd64/usr/src/linux * Found kernel object directory: * /doc/stor/lab/proxima_amd64/usr/src/proxima * Found sources for kernel version: * 2.6.22-rc4-ge15e2ce1 >>> Unpacking source... >>> Unpacking klibc-1.5.tar.bz2 to /var/tmp/portage/dev-libs/klibc-1.5/work * CTARGET = x86_64-pc-linux-gnu * Applying klibc-1.4.11-interp-flags.patch ... [ ok ] >>> Source unpacked. >>> Compiling source in /var/tmp/portage/dev-libs/klibc-1.5/work/klibc-1.5 ... * ARCH = "x86_64" * CROSS = "x86_64-pc-linux-gnu-" GEN klcc/klibc.config GEN klcc/klcc HOSTCC scripts/basic/fixdep KLIBCCC usr/klibc/__static_init.o usr/klibc/__static_init.c:1: sorry, unimplemented: 64-bit mode not compiled in make[2]: *** [usr/klibc/__static_init.o] Error 1 make[1]: *** [all] Error 2 make: *** [klibc] Error 2
Created attachment 121679 [details, diff] patch to make the ebuild use KLIBCARCH and CROSS_COMPILE
Fixed in CVS, thanks Michal.