lkl: set host memcpy/set/move defaults in Kconfig

The LKL_HOST_MEMCPY, LKL_HOST_MEMSET and LKL_HOST_MEMMOVE kernel config
parameters are currently set via tools/lkl/Makefile.autoconf based on
whether OUTPUT_FORMAT starts with "elf64" or "elf32".
Use the same logic in arch/lkl/Kconfig to set the parameter defaults and
remove the corresponding Makefile.autoconf set_kernel_config calls.

Signed-off-by: David Disseldorp <ddiss@suse.de>
This commit is contained in:
David Disseldorp
2025-06-05 14:26:20 +10:00
parent ad59b05d54
commit ba545e1875
2 changed files with 10 additions and 12 deletions

View File

@@ -155,21 +155,22 @@ config BUILTIN_CMDLINE
config LKL_HOST_MEMCPY
bool "Host provides memcpy"
default n
default $(success,$(srctree)/arch/lkl/scripts/cc-objdump-file-format.sh|grep -q '^elf64-') if 64BIT
default $(success,$(srctree)/arch/lkl/scripts/cc-objdump-file-format.sh|grep -q '^elf32-') if !64BIT
help
This options should be set (in tools/lkl/Makefile.autoconf)
if the host provides a memcpy implementation.
Set to "y" if LKL should call the host memcpy hook instead of
performing memory copies manually.
config LKL_HOST_MEMSET
bool "Host provides memset"
default n
default LKL_HOST_MEMCPY
help
This options should be set (in tools/lkl/Makefile.autoconf)
if the host provides a memset implementation.
Set to "y" if LKL should call the host memset hook instead of
performing memory sets manually.
config LKL_HOST_MEMMOVE
bool "Host provides memmove"
default n
default LKL_HOST_MEMCPY
help
This options should be set (in tools/lkl/Makefile.autoconf)
if the host provides a memmove implementation.
Set to "y" if LKL should call the host memmove hook instead of
performing memory moves manually.

View File

@@ -84,9 +84,6 @@ define posix_host
$(if $(filter $(1),elf32-i386),$(call set_autoconf_var,I386,y))
$(if $(strip $(call find_include,jsmn.h)),$(call set_autoconf_var,JSMN,y))
$(if $(filter %,$(zpoline)),$(call zpoline_conf,$(zpoline)))
$(call set_kernel_config,LKL_HOST_MEMCPY,y)
$(call set_kernel_config,LKL_HOST_MEMSET,y)
$(call set_kernel_config,LKL_HOST_MEMMOVE,y)
endef
define nt64_host