x86: select CONFIG_64BIT for X86_64

Select CONFIG_64BIT so that we pass the -m64 option (instead of -m32) to
static analysis tools.
Introduce CONFIG_SPL_64BIT and select it for architectures other than
x86 with 64 bit builds. Do not select it for x86 builds as x86 uses
a 32 bit SPL.
Ensure that when limits are set they use CONFIG_64BIT for U-Boot
proper and CONFIG_SPL_64BIT for SPL. This is to allow for the 32 bit
SPL build used by x86.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
This commit is contained in:
Andrew Goodbody
2024-12-31 10:58:30 -06:00
committed by Tom Rini
parent bcb9b3524a
commit 99145eec2d
8 changed files with 26 additions and 6 deletions
+2 -1
View File
@@ -9,7 +9,8 @@
#define UINT32_MAX 0xffffffffU
#define UINT64_MAX 0xffffffffffffffffULL
#ifdef CONFIG_64BIT
#if (defined(CONFIG_64BIT) && !defined(CONFIG_SPL_BUILD)) || \
(defined(CONFIG_SPL_64BIT) && defined(CONFIG_SPL_BUILD))
#define UINTPTR_MAX UINT64_MAX
#else
#define UINTPTR_MAX UINT32_MAX