[PATCH v2 0/2] Select CONFIG_64BIT for sandbox64 and x86_64

Picking up a series from Dan Carpenter and applying requested changes for v2.
I had previously set CONFIG_64BIT for arm64. This patchset does the same thing for sandbox64 and x86_64. (Mips and riscv were already doing it). This CONFIG option is used in the Makefile to determine if it's a 32 or 64 bit system for the CHECKER.
Makefile 1052 # the checker needs the correct machine size 1053 CHECKFLAGS += $(if $(CONFIG_64BIT),-m64,-m32)
Changes in v2: Resubmitted by Andrew Goodbody with changes requested by reviewer
Andrew Goodbody (2): sandbox: select CONFIG_64BIT for SANDBOX64 x86: select CONFIG_64BIT for X86_64
arch/sandbox/Kconfig | 1 + arch/x86/Kconfig | 1 + 2 files changed, 2 insertions(+)

Select CONFIG_64BIT so that we pass the -m64 option (instead of -m32) to static analysis tools.
Signed-off-by: Dan Carpenter dan.carpenter@linaro.org Signed-off-by: Andrew Goodbody andrew.goodbody@linaro.org ---
Changes in v2: Resubmitted by Andrew Goodbody with changes requested by reviewer Moved select of CONFIG_64BIT from SANDBOX64 to HOST_64BIT as suggested by reviewer.
arch/sandbox/Kconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/arch/sandbox/Kconfig b/arch/sandbox/Kconfig index 1c8353d615..db29ca14bd 100644 --- a/arch/sandbox/Kconfig +++ b/arch/sandbox/Kconfig @@ -46,6 +46,7 @@ config HOST_32BIT
config HOST_64BIT def_bool $(cc-define,_LP64) + select 64BIT
config HOST_HAS_SDL def_bool $(success,sdl2-config --version)

Select CONFIG_64BIT so that we pass the -m64 option (instead of -m32) to static analysis tools.
Signed-off-by: Dan Carpenter dan.carpenter@linaro.org Signed-off-by: Andrew Goodbody andrew.goodbody@linaro.org ---
Changes in v2: Corrected commit title to be x86 not sandbox
arch/x86/Kconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 23a1e21b29..006a59d6fa 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -44,6 +44,7 @@ endchoice
config X86_64 bool + select 64BIT
config SPL_X86_64 bool

On Wed, Nov 06, 2024 at 12:42:13PM +0000, Andrew Goodbody wrote:
Picking up a series from Dan Carpenter and applying requested changes for v2.
I had previously set CONFIG_64BIT for arm64. This patchset does the same thing for sandbox64 and x86_64. (Mips and riscv were already doing it). This CONFIG option is used in the Makefile to determine if it's a 32 or 64 bit system for the CHECKER.
Makefile 1052 # the checker needs the correct machine size 1053 CHECKFLAGS += $(if $(CONFIG_64BIT),-m64,-m32)
Changes in v2: Resubmitted by Andrew Goodbody with changes requested by reviewer
Andrew Goodbody (2): sandbox: select CONFIG_64BIT for SANDBOX64 x86: select CONFIG_64BIT for X86_64
arch/sandbox/Kconfig | 1 + arch/x86/Kconfig | 1 + 2 files changed, 2 insertions(+)
Unfortunately this leads to various CI failures: https://source.denx.de/u-boot/u-boot/-/pipelines/23345 Azure would show them too, but I cancelled the pipeline to free up the queue. Please see https://docs.u-boot.org/en/latest/develop/ci_testing.html if needed for how to get Azure runs done. Also on a related note, can you please update test/lib/str.c to use CONFIG_64BIT and not CONFIG_PHYS_64BIT while you're doing these kind of corrections? Thanks!

On 13/11/2024 21:53, Tom Rini wrote:
On Wed, Nov 06, 2024 at 12:42:13PM +0000, Andrew Goodbody wrote:
Picking up a series from Dan Carpenter and applying requested changes for v2.
I had previously set CONFIG_64BIT for arm64. This patchset does the same thing for sandbox64 and x86_64. (Mips and riscv were already doing it). This CONFIG option is used in the Makefile to determine if it's a 32 or 64 bit system for the CHECKER.
Makefile 1052 # the checker needs the correct machine size 1053 CHECKFLAGS += $(if $(CONFIG_64BIT),-m64,-m32)
Changes in v2: Resubmitted by Andrew Goodbody with changes requested by reviewer
Andrew Goodbody (2): sandbox: select CONFIG_64BIT for SANDBOX64 x86: select CONFIG_64BIT for X86_64
arch/sandbox/Kconfig | 1 + arch/x86/Kconfig | 1 + 2 files changed, 2 insertions(+)
Unfortunately this leads to various CI failures: https://source.denx.de/u-boot/u-boot/-/pipelines/23345 Azure would show them too, but I cancelled the pipeline to free up the queue. Please see https://docs.u-boot.org/en/latest/develop/ci_testing.html if needed for how to get Azure runs done. Also on a related note, can you please update test/lib/str.c to use CONFIG_64BIT and not CONFIG_PHYS_64BIT while you're doing these kind of corrections? Thanks!
I am about to send v3 of this series. Passing CI run at https://github.com/u-boot/u-boot/pull/696
Andrew
participants (3)
-
Andrew Goodbody
-
Dan Carpenter
-
Tom Rini