From 8794536cf28d717993ab36bb111c6bf76f1a5407 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 18 Jan 2014 07:38:50 -0600 Subject: [PATCH] X86: Add a configuration option to select the -m32 compiler option when needed --- arch/x86/Kconfig | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 10c081fab4..42e47dc399 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -12,6 +12,7 @@ choice config ARCH_I486 bool "i486" + select ARCH_X86_HAVE_32BIT ---help--- Intel i486 architecture @@ -19,15 +20,33 @@ endchoice config ARCH_CHIP_QEMU bool "Qemu x86 emulation" + default n ---help--- Intel i486 architecture config ARCH_CHIP string - default "qemu" if ARCH_CHIP_QEMU + default "qemu" if ARCH_CHIP_QEMU + +config ARCH_X86_HAVE_32BIT + bool + default n + +config ARCH_X86_M32 + bool "Build 32-bit system with a 64-bit machine" + default n + depends on ARCH_X86_HAVE_32BIT + ---help--- + If you are building for a 32-bit target using a native 64-bit + toolchain, then you need to add compilation options to select the + 32-bit target. Selecting this option will add the -m32 option to + the compiler command line. source arch/x86/src/common/Kconfig +if ARCH_I486 source arch/x86/src/i486/Kconfig +endif # ARCH_I486 +if ARCH_CHIP_QEMU source arch/x86/src/qemu/Kconfig - -endif +endif # ARCH_CHIP_QEMU +endif # ARCH_X86