From 29406c0d204b0c560e0a531f30967e8352db95db Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 22 Aug 2014 18:21:32 -0600 Subject: [PATCH] Add option to select 64-bit build platform --- arch/sim/Kconfig | 16 +++++++++++++++- arch/sim/include/types.h | 2 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/arch/sim/Kconfig b/arch/sim/Kconfig index e882670539..356044e85c 100644 --- a/arch/sim/Kconfig +++ b/arch/sim/Kconfig @@ -7,7 +7,8 @@ if ARCH_SIM comment "Simulation Configuration Options" config SIM_M32 - bool "Build 32-bit simulation on 64-bit machine" +# bool "Build 32-bit simulation on 64-bit machine" + bool default n ---help--- Simulation context switching is based on logic like setjmp and longjmp. This @@ -19,6 +20,19 @@ config SIM_M32 beyond. For thoses versions, you must add SIM_M32=y to the .config file in order to enable building a 32-bit image on a 64-bit platform. +choice + prompt "Host CPU Type" + default HOST_X86_64 + +config HOST_X86_64 + bool "x86_64" + select SIM_M32 + +config HOST_X86 + bool "x86" + +endchoice # Host CPU Type + config SIM_WALLTIME bool "Execution simulation in near real-time" default n diff --git a/arch/sim/include/types.h b/arch/sim/include/types.h index 741876c90c..4ced4eac42 100644 --- a/arch/sim/include/types.h +++ b/arch/sim/include/types.h @@ -76,7 +76,7 @@ typedef signed long long _int64_t; typedef unsigned long long _uint64_t; #define __INT64_DEFINED -#ifdef CONFIG_SIM_M32 +#ifdef CONFIG_HOST_X86_64 /* 32-bit build on 64-bit machine: A pointer is 8 bytes */ typedef signed long long _intptr_t;