Commit 791d72a5 authored by Heinrich Schuchardt's avatar Heinrich Schuchardt Committed by Tomasz Zawadzki
Browse files

make: RISC-V does not support -march=native



-march=native is not an allowable argument for GCC on RISC-V.

Not providing -march will let GCC fallback to its built in default.
This is preferable to specifying a safe fixed value like -march=rv64gc.

Signed-off-by: default avatarHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Change-Id: I5e11179323b005f330be4752012285451e791205
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12880


Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@nvidia.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 72b5626d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -88,6 +88,8 @@ COMMON_CFLAGS += -mcpu=$(TARGET_ARCHITECTURE)
else ifeq ($(TARGET_MACHINE),aarch64)
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
COMMON_CFLAGS += -march=$(TARGET_ARCHITECTURE)
endif