config SANDBOX64
bool "Use 64-bit addresses"
select PHYS_64BIT
- select HOST_64BIT
+ depends on HOST_64BIT
config SANDBOX_RAM_SIZE_MB
int "RAM size in MiB"
default "sandbox_spl" if SANDBOX_SPL
default "sandbox" if !SANDBOX_SPL
-choice
- prompt "Run sandbox on 32/64-bit host"
- default HOST_64BIT
- help
- Sandbox can be built on 32-bit and 64-bit hosts.
- The default is to build on a 64-bit host and run
- on a 64-bit host. If you want to run sandbox on
- a 32-bit host, change it here.
-
config HOST_32BIT
- bool "32-bit host"
- depends on !PHYS_64BIT
+ def_bool ! $(cc-define,_LP64)
config HOST_64BIT
- bool "64-bit host"
-
-endchoice
+ def_bool $(cc-define,_LP64)
config SANDBOX_CRASH_RESET
bool "Reset on crash"
# Return y if the compiler supports <flag>, n otherwise
cc-option = $(success,$(CC) -Werror $(1) -E -x c /dev/null -o /dev/null)
+# $(cc-define,<macro>)
+# Return y if the compiler defines <macro>, n otherwise
+cc-define = $(success,$(CC) -dM -E -x c /dev/null | grep -q '^#define \<$(1)\>')
+
# $(ld-option,<flag>)
# Return y if the linker supports <flag>, n otherwise
ld-option = $(success,$(LD) -v $(1))