Commit cccd5ad5 authored by PepperJo's avatar PepperJo Committed by Daniel Verkamp
Browse files

build: fix compiler options for ppc64le



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

Change-Id: I2dd14b1acf003e8229e9c9392c4c0606e2c15af8
Signed-off-by: default avatarJonas Pfefferle <jpf@zurich.ibm.com>
Reviewed-on: https://review.gerrithub.io/383725


Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent 32bff28a
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -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