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 <haoyu.tang@intel.com>
Reviewed-by: Yifan Liu  <yifan1.liu@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
This commit is contained in:
Haoyu Tang
2025-09-16 17:10:23 +08:00
committed by acrnsi-robot
parent 5c1726a78f
commit 8a521fe47e
2 changed files with 11 additions and 10 deletions

View File

@@ -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

View File

@@ -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))