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 <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/386348
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Daniel Verkamp 2017-11-08 17:09:19 -07:00 committed by Jim Harris
parent 60a0f0855d
commit b1864503cd

View File

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