Fix compile errors reported by clang
For using clang as a compiler it is enough
to specify CC=clang in the make command line
Change-Id: I06f1c1d418b68768f8119de5bdc8748c51f90c02
Signed-off-by: Damjan Marion <damarion@cisco.com>
diff --git a/dpdk/Makefile b/dpdk/Makefile
index 398fc60..fadbb26 100644
--- a/dpdk/Makefile
+++ b/dpdk/Makefile
@@ -31,7 +31,14 @@
DPDK_2.2.0_TARBALL_MD5_CKSUM := 22e2fd68cd5504f43fe9a5a6fd6dd938
DPDK_16.04_TARBALL_MD5_CKSUM := 0728d506d7f56eb64233e824fa3c098a
DPDK_SOURCE := $(B)/dpdk-$(DPDK_VERSION)
-DPDK_TARGET := x86_64-native-linuxapp-gcc
+
+ifneq (,$(findstring clang,$(CC)))
+DPDK_CC=clang
+else
+DPDK_CC=gcc
+endif
+
+DPDK_TARGET := x86_64-native-linuxapp-$(DPDK_CC)
JOBS := $(shell grep processor /proc/cpuinfo | wc -l)
# compiler/linker custom arguments
@@ -40,9 +47,9 @@
DPDK_EXTRA_LDFLAGS := -g
ifeq ($(DPDK_DEBUG),n)
-DPDK_EXTRA_CFLAGS := -g
+DPDK_EXTRA_CFLAGS := -g
else
-DPDK_EXTRA_CFLAGS := -g -O0
+DPDK_EXTRA_CFLAGS := -g -O0
endif
# translate gcc march values to DPDK arch