build: fix compiler options for ppc64le

ppc64le does not support compiler option march=native
but instead uses mcpu

Change-Id: I2dd14b1acf003e8229e9c9392c4c0606e2c15af8
Signed-off-by: Jonas Pfefferle <jpf@zurich.ibm.com>
Reviewed-on: https://review.gerrithub.io/383725
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
PepperJo 2017-10-10 14:02:46 +02:00 committed by Daniel Verkamp
parent 32bff28a25
commit cccd5ad557

View File

@ -2,6 +2,7 @@
# BSD LICENSE
#
# Copyright (c) Intel Corporation.
# Copyright (c) 2017, IBM Corporation.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@ -48,7 +49,15 @@ endif
OS := $(shell uname)
COMMON_CFLAGS = -g $(C_OPT) -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wmissing-declarations -fno-strict-aliasing -march=native -I$(SPDK_ROOT_DIR)/include
COMMON_CFLAGS = -g $(C_OPT) -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wmissing-declarations -fno-strict-aliasing -I$(SPDK_ROOT_DIR)/include
UNAME_P := $(shell uname -p)
ifneq ($(filter ppc%,$(UNAME_P)),)
COMMON_CFLAGS += -mcpu=native
else
COMMON_CFLAGS += -march=native
endif
COMMON_CFLAGS += -include $(SPDK_ROOT_DIR)/config.h