diff --git a/examples/legacy_api/Makefile b/examples/legacy_api/Makefile index 07a31e219b6..a39e053d5e0 100644 --- a/examples/legacy_api/Makefile +++ b/examples/legacy_api/Makefile @@ -43,8 +43,8 @@ EXT_COBJ-y += lib/vsprintf.o EXT_COBJ-y += lib/charset.o EXT_COBJ-$(CONFIG_LIB_UUID) += lib/uuid.o EXT_SOBJ-$(CONFIG_PPC) += arch/powerpc/lib/ppcstring.o -ifeq ($(ARCH),arm) -EXT_SOBJ-$(CONFIG_USE_ARCH_MEMSET) += arch/arm/lib/memset.o +ifneq ($(CONFIG_ARM)$(CONFIG_RISCV),) +EXT_SOBJ-$(CONFIG_USE_ARCH_MEMSET) += arch/$(ARCH)/lib/memset.o endif # Create a list of object files to be compiled