kexec-tools relies on GNU Make's definition of the COMPILE.S Makefile variable to compile assembly to object files. The definition of COMPILE.S involves calling a compiler driver (i.e., $(CC) -- and that's a very good thing). However, it passes $(ASFLAGS) to $(CC) where, arguably ( bug 313603 , http://www.gnu.org/software/automake/manual/html_node/Assembly-Support.html ), $(ASFLAGS) is meant to be passed directly to $(AS) rather than $(CC). As there seem to be no users setting ASFLAGS in their make.confs, it seems this misuse of ASFLAGS primarily breaks portage-multilib (which is why I'm blocking the portage-multilib tracker). I believe the correct solution is to set ASFLAGS=${CCASFLAGS} so that a user who sets both CCASFLAGS and ASFLAGS in make.conf will observe successful compilation.
Created attachment 226811 [details] kexec-tools-ASFLAGS.patch Fixes compilation under portage-multilib for me. I believe that this is a proper way to respect ASFLAGS and that CCASFLAGS is the proper variable to grab escaped ASFLAGS from.
+*kexec-tools-2.0.2-r1 (27 Mar 2011) + + 27 Mar 2011; Justin Lecher <jlec@gentoo.org> +kexec-tools-2.0.2-r1.ebuild, + +files/kexec.init-ng: + Allow bypassing of kexec during reboot, #357095; Proper usage of ASFLAGS, + #313611 +