From b1864503cd54af134b4a2b151be4b5db38b5158d Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Wed, 8 Nov 2017 17:09:19 -0700 Subject: [PATCH] build: only use -march=native on x86_64 Check the target machine type explicitly before turning on -march=native rather than assuming any non-PowerPC machine is x86. Change-Id: I651b1852dc5ac6a3d42c60d639ec48f399f6b3bd Signed-off-by: Daniel Verkamp Reviewed-on: https://review.gerrithub.io/386348 Tested-by: SPDK Automated Test System Reviewed-by: Ben Walker Reviewed-by: Ziye Yang Reviewed-by: Jim Harris --- mk/spdk.common.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mk/spdk.common.mk b/mk/spdk.common.mk index 5cdeebe3e..951dcec85 100644 --- a/mk/spdk.common.mk +++ b/mk/spdk.common.mk @@ -63,7 +63,8 @@ COMMON_CFLAGS = -g $(C_OPT) -Wall -Wextra -Wno-unused-parameter -Wno-missing-fie ifneq ($(filter powerpc%,$(TARGET_MACHINE)),) COMMON_CFLAGS += -mcpu=native -else +endif +ifeq ($(TARGET_MACHINE),x86_64) COMMON_CFLAGS += -march=native endif