Commit d7484395 authored by Xue Liu's avatar Xue Liu Committed by Jim Harris
Browse files

build: Specify the target build architecture for LOONGARCH.

More information about LoongArch:
- https://loongson.github.io/LoongArch-Documentation/README-EN.html



Signed-off-by: default avatarXue Liu <liuxue@loongson.cn>
Change-Id: I24852e31b5fadef3578354da2d26252014330e83
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16084


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
parent e9a94122
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -67,6 +67,9 @@ COMMON_CFLAGS += -march=$(TARGET_ARCHITECTURE)
COMMON_CFLAGS += -DPAGE_SIZE=$(shell getconf PAGESIZE)
else ifeq ('$(TARGET_MACHINE)|$(TARGET_ARCHITECTURE)','riscv64|native')
# -march=native is not yet supported by GCC on RISC-V. Falling back to default.
else ifneq ($(filter loongarch%,$(TARGET_MACHINE)),)
COMMON_CFLAGS += -march=$(TARGET_ARCHITECTURE)
COMMON_CFLAGS += -DPAGE_SIZE=$(shell getconf PAGESIZE)
else
COMMON_CFLAGS += -march=$(TARGET_ARCHITECTURE)
endif