Skip to content

Commit 3bc246b

Browse files
committed
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>
1 parent a41f07f commit 3bc246b

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

arch/lkl/Kconfig

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -156,21 +156,22 @@ config BUILTIN_CMDLINE
156156

157157
config LKL_HOST_MEMCPY
158158
bool "Host provides memcpy"
159-
default n
159+
default $(success,$(srctree)/arch/lkl/scripts/cc-objdump-file-format.sh|grep -q '^elf64-') if 64BIT
160+
default $(success,$(srctree)/arch/lkl/scripts/cc-objdump-file-format.sh|grep -q '^elf32-') if !64BIT
160161
help
161-
This options should be set (in tools/lkl/Makefile.autoconf)
162-
if the host provides a memcpy implementation.
162+
Set to "y" if LKL should call the host memcpy hook instead of
163+
performing memory copies manually.
163164

164165
config LKL_HOST_MEMSET
165166
bool "Host provides memset"
166-
default n
167+
default LKL_HOST_MEMCPY
167168
help
168-
This options should be set (in tools/lkl/Makefile.autoconf)
169-
if the host provides a memset implementation.
169+
Set to "y" if LKL should call the host memset hook instead of
170+
performing memory sets manually.
170171

171172
config LKL_HOST_MEMMOVE
172173
bool "Host provides memmove"
173-
default n
174+
default LKL_HOST_MEMCPY
174175
help
175-
This options should be set (in tools/lkl/Makefile.autoconf)
176-
if the host provides a memmove implementation.
176+
Set to "y" if LKL should call the host memmove hook instead of
177+
performing memory moves manually.

tools/lkl/Makefile.autoconf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,6 @@ define posix_host
8484
$(if $(filter $(1),elf32-i386),$(call set_autoconf_var,I386,y))
8585
$(if $(strip $(call find_include,jsmn.h)),$(call set_autoconf_var,JSMN,y))
8686
$(if $(filter %,$(zpoline)),$(call zpoline_conf,$(zpoline)))
87-
$(call set_kernel_config,LKL_HOST_MEMCPY,y)
88-
$(call set_kernel_config,LKL_HOST_MEMSET,y)
89-
$(call set_kernel_config,LKL_HOST_MEMMOVE,y)
9087
endef
9188

9289
define nt64_host

0 commit comments

Comments
 (0)