Created attachment 379284 [details] Build log proving the issue Just noticed this after it broke my distcc build by mixing 32- and 64-bit 'gcc' (instead of i686-pc-...). If you do: MAKEOPTS='V=1' emerge -1vB linux-headers you can notice the calls like: gcc -Wp,-MD,arch/x86/tools/.relocs_32.o.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -I/tmp/portage/sys-kernel/linux-headers-3.15/work/gentoo-headers-base-3.15/tools/include -c -o arch/x86/tools/relocs_32.o arch/x86/tools/relocs_32.c Also, I suggest you enable verbose logs by default. They help a lot.
those are build-time tools, so they should not be using $CC
Just hit this with linux-headers-3.17 on purely 32bit system... >>> Install linux-headers-3.17 into /var/tmp/portage/sys-kernel/linux-headers-3.17/image/ category sys-kernel make -j12 -l2 headers_install INSTALL_HDR_PATH=/var/tmp/portage/sys-kernel/linux-headers-3.17/image///usr/include/.. ARCH=x86 CROSS_COMPILE=i686-pc-linux-gnu- CHK include/generated/uapi/linux/version.h UPD include/generated/uapi/linux/version.h WRAP arch/x86/include/generated/asm/clkdev.h WRAP arch/x86/include/generated/asm/cputime.h WRAP arch/x86/include/generated/asm/scatterlist.h WRAP arch/x86/include/generated/asm/mcs_spinlock.h WRAP arch/x86/include/generated/asm/early_ioremap.h SYSTBL arch/x86/syscalls/../include/generated/asm/syscalls_32.h SYSHDR arch/x86/syscalls/../include/generated/uapi/asm/unistd_32.h SYSHDR arch/x86/syscalls/../include/generated/uapi/asm/unistd_64.h SYSHDR arch/x86/syscalls/../include/generated/uapi/asm/unistd_x32.h HOSTCC arch/x86/tools/relocs_32.o HOSTCC arch/x86/tools/relocs_common.o HOSTCC arch/x86/tools/relocs_64.o arch/x86/tools/relocs_common.c: In function �main�: arch/x86/tools/relocs_common.c:36:185: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] arch/x86/tools/relocs_common.c:36:221: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] ... linux-headers-3.16 seems to have been emerge fine on 2014-08-13, but fails with the same error now. So I guess an eclass change triggered this?
i fixed this starting in linux-3.18 with the patch: 00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch From 1fae43bfd87b1a72bbd1060dc6407d601238526e Mon Sep 17 00:00:00 2001 From: Mike Frysinger <vapier@gentoo.org> Date: Sat, 15 Nov 2014 03:37:38 -0500 Subject: [PATCH] x86: do not build relocs tool when installing headers This isn't needed to install headers, so don't bother building it. Otherwise we run into a chicken/egg issue where we need the kernel headers in order to install the kernel headers. It's also a waste of time.