Commit b1864503 authored by Daniel Verkamp's avatar Daniel Verkamp Committed by Jim Harris
Browse files

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: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/386348


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarZiye Yang <optimistyzy@gmail.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 60a0f085
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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