From 8a521fe47e5075fb377af785daae9ab4f8a87077 Mon Sep 17 00:00:00 2001 From: Haoyu Tang Date: Tue, 16 Sep 2025 17:10:23 +0800 Subject: [PATCH] hv: add common library to risc-v build move common library from x86 makefile to common makefile. Tracked-On: #8803 Signed-off-by: Haoyu Tang Reviewed-by: Yifan Liu Acked-by: Wang, Yu1 --- hypervisor/Makefile | 11 +++++++++++ hypervisor/arch/x86/Makefile | 10 ---------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/hypervisor/Makefile b/hypervisor/Makefile index a084d0f08..cb6b1ee78 100644 --- a/hypervisor/Makefile +++ b/hypervisor/Makefile @@ -154,6 +154,17 @@ COMMON_C_SRCS += common/cpu.c COMMON_C_SRCS += lib/memory.c COMMON_C_SRCS += lib/bits.c +# library componment +COMMON_C_SRCS += lib/string.c +COMMON_C_SRCS += lib/crypto/crypto_api.c +COMMON_C_SRCS += lib/crypto/mbedtls/hkdf.c +COMMON_C_SRCS += lib/crypto/mbedtls/sha256.c +COMMON_C_SRCS += lib/crypto/mbedtls/md.c +COMMON_C_SRCS += lib/crypto/mbedtls/md_wrap.c +COMMON_C_SRCS += lib/sprintf.c +ifdef STACK_PROTECTOR +COMMON_C_SRCS += lib/stack_protector.c +endif ifeq ($(ARCH),x86) COMMON_C_SRCS += common/ticks.c diff --git a/hypervisor/arch/x86/Makefile b/hypervisor/arch/x86/Makefile index 4e1612b5c..eee23a02b 100644 --- a/hypervisor/arch/x86/Makefile +++ b/hypervisor/arch/x86/Makefile @@ -40,17 +40,7 @@ endif ASFLAGS += -m64 -nostdinc -nostdlib # library componment -LIB_C_SRCS += lib/string.c -LIB_C_SRCS += lib/crypto/crypto_api.c -LIB_C_SRCS += lib/crypto/mbedtls/hkdf.c -LIB_C_SRCS += lib/crypto/mbedtls/sha256.c -LIB_C_SRCS += lib/crypto/mbedtls/md.c -LIB_C_SRCS += lib/crypto/mbedtls/md_wrap.c -LIB_C_SRCS += lib/sprintf.c LIB_C_SRCS += arch/x86/lib/memory.c -ifdef STACK_PROTECTOR -LIB_C_SRCS += lib/stack_protector.c -endif # retpoline support ifeq (true, $(shell [ $(GCC_MAJOR) -eq 7 ] && [ $(GCC_MINOR) -ge 3 ] && echo true))