diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2020-06-02 10:53:51 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-06-03 10:03:33 +0200 |
commit | 54d47eb7e91274bb3edd8ac4b2e87db6d6f95c43 (patch) | |
tree | a45df645dca8a21b46a4653fd7d57afb55ad5fc8 /arch/sandbox/Kconfig | |
parent | 5e4dfd408a55d38e59a6a3fd3cf43192a24ded24 (diff) | |
download | barebox-54d47eb7e91274bb3edd8ac4b2e87db6d6f95c43.tar.gz barebox-54d47eb7e91274bb3edd8ac4b2e87db6d6f95c43.tar.xz |
sandbox: support forcing 32-bit x86
If gcc supports multiple architectures, barebox uses only the default
when compiling for ARCH=sandbox, this is e.g. the case with compilers
that generate both 32- and 64-bit x86 executables.
There can be good reasons to force 32-bit though, e.g. to reduce memory
consumption while fuzzing or to temporarily avoid 32-to-64-bit warnings,
while running the static analyzer. Add an option for this.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/sandbox/Kconfig')
-rw-r--r-- | arch/sandbox/Kconfig | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/sandbox/Kconfig b/arch/sandbox/Kconfig index 46cfe8b4b1..789938941d 100644 --- a/arch/sandbox/Kconfig +++ b/arch/sandbox/Kconfig @@ -26,6 +26,13 @@ config SANDBOX_UNWIND config CC_IS_64BIT def_bool $(success,$(srctree)/scripts/gcc-64bitptr.sh $(CC)) +config CC_HAS_LINUX_I386_SUPPORT + def_bool $(cc-option,-m32) && $(ld-option,-m elf_i386) + config 64BIT bool + default n if SANDBOX_LINUX_I386 default CC_IS_64BIT + +config SANDBOX_LINUX_I386 + bool "32-bit x86 barebox" if CC_HAS_LINUX_I386_SUPPORT |