Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 313611

Summary: sys-apps/kexec-tools misuses ASFLAGS
Product: Gentoo Linux Reporter: Nathan Phillip Brink (binki) (RETIRED) <binki>
Component: [OLD] Core systemAssignee: Gentoo Kernel Miscellaneous <kernel-misc>
Status: RESOLVED FIXED    
Severity: normal CC: esigra
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 306835    
Attachments: kexec-tools-ASFLAGS.patch

Description Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2010-04-07 02:55:45 UTC
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.
Comment 1 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2010-04-07 03:00:31 UTC
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.
Comment 2 Justin Lecher (RETIRED) gentoo-dev 2011-03-27 08:31:53 UTC
+*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
+