[PATCH v5 21/44] x86: Use string functions for all 32-bit builds

Simon Glass
2023-02-22T16:44:36Z

At present these are not included in SPL. They do add to code size but
are a bit faster, so adjust the setting to add them.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

(no changes since v1)

arch/x86/include/asm/string.h | 2 +-
arch/x86/lib/Makefile | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/string.h b/arch/x86/include/asm/string.h
index c15b264a5c0..0254a022160 100644
--- a/arch/x86/include/asm/string.h
+++ b/arch/x86/include/asm/string.h
@@ -14,7 +14,7 @@ extern char *strrchr(const char *s, int c);
#undef __HAVE_ARCH_STRCHR
extern char *strchr(const char *s, int c);

-#ifdef CONFIG_X86_64
+#if CONFIG_IS_ENABLED(X86_64)

#undef __HAVE_ARCH_MEMCPY
extern void *memcpy(void *, const void *, __kernel_size_t);
diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile
index a6f22441474..ea7ff2bcf38 100644
--- a/arch/x86/lib/Makefile
+++ b/arch/x86/lib/Makefile
@@ -4,7 +4,7 @@
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.

obj-y += bdinfo.o
-ifndef CONFIG_X86_64
+ifndef CONFIG_$(SPL_TPL_)X86_64
ifndef CONFIG_TPL_BUILD
obj-y += bios.o
obj-y += bios_asm.o
--
2.39.2.637.g21b0678d19-goog