On Sat, 16 Feb 2008 19:58:06 -0800 H. Peter Anvin wrote:

> Randy Dunlap wrote:
> > 
> > Yes, adding -m32 to the X86_32 config ccflags (as is done for the
> > X86_64 case) makes it build for me.  (like patch below)
> > 
> 
> It's wrong, though, because you can't assume a 32-bit compiler knows 
> about -m32.
> 
> You need $(call cc-option,-m32).

Thanks, Peter.  Tested/works.

---
From: Randy Dunlap <[EMAIL PROTECTED]>

Fix wakeup code build errors on x86_64.

linux-2.6.25-rc2-mm1/arch/x86/kernel/acpi/realmode/wakeup.S:0: error: CPU you 
selected does not support x86-64 instruction set
linux-2.6.25-rc2-mm1/arch/x86/kernel/acpi/realmode/wakeup.S:0: error: CPU you 
selected does not support x86-64 instruction set
linux-2.6.25-rc2-mm1/arch/x86/kernel/acpi/realmode/wakeup.S:0: error: 
-mpreferred-stack-boundary=2 is not between 4 and 12

Signed-off-by: Randy Dunlap <[EMAIL PROTECTED]>
---
 arch/x86/kernel/acpi/realmode/Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.25-rc2-mm1.orig/arch/x86/kernel/acpi/realmode/Makefile
+++ linux-2.6.25-rc2-mm1/arch/x86/kernel/acpi/realmode/Makefile
@@ -27,7 +27,7 @@ bootsrc               := $(src)/../../../boot
 # How to compile the 16-bit code.  Note we always compile for -march=i386,
 # that way we can complain to the user if the CPU is insufficient.
 # Compile with _SETUP since this is similar to the boot-time setup code.
-cflags-$(CONFIG_X86_32) :=
+cflags-$(CONFIG_X86_32) := $(call cc-option, -m32)
 cflags-$(CONFIG_X86_64) := -m32
 KBUILD_CFLAGS  := $(LINUXINCLUDE) -g -Os -D_SETUP -D_WAKEUP -D__KERNEL__ \
                   -I$(srctree)/$(bootsrc) \
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to