[dpdk-dev] fix build issues in the cross-compiling mode
Commit Message
Removed comparison against $CC in Makefiles as
in cross-compiling mode CC can be a different string
instead of string "gcc"
Suggested-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
app/test/Makefile | 2 +-
drivers/net/cxgbe/Makefile | 6 ++++--
drivers/net/e1000/Makefile | 2 +-
drivers/net/fm10k/Makefile | 5 +++--
drivers/net/i40e/Makefile | 4 ++--
drivers/net/ixgbe/Makefile | 4 ++--
drivers/net/qede/Makefile | 4 ++--
drivers/net/vmxnet3/Makefile | 4 ++--
lib/librte_acl/Makefile | 2 +-
9 files changed, 18 insertions(+), 15 deletions(-)
Comments
On Thu, May 26, 2016 at 04:50:14PM +0530, Jerin Jacob wrote:
> Removed comparison against $CC in Makefiles as
> in cross-compiling mode CC can be a different string
> instead of string "gcc"
>
> Suggested-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
This fixes compiler errors I see when doing gcc6 testing using "make CC=gcc6.1"
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2016-05-26 13:20, Bruce Richardson:
> On Thu, May 26, 2016 at 04:50:14PM +0530, Jerin Jacob wrote:
> > Removed comparison against $CC in Makefiles as
> > in cross-compiling mode CC can be a different string
> > instead of string "gcc"
> >
> > Suggested-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> > Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
>
> This fixes compiler errors I see when doing gcc6 testing using "make CC=gcc6.1"
>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Applied, thanks
@@ -166,7 +166,7 @@ CFLAGS += -D_GNU_SOURCE
LDLIBS += -lm
# Disable VTA for memcpy test
-ifeq ($(CC), gcc)
+ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
ifeq ($(shell test $(GCC_VERSION) -ge 44 && echo 1), 1)
CFLAGS_test_memcpy.o += -fno-var-tracking-assignments
CFLAGS_test_memcpy_perf.o += -fno-var-tracking-assignments
@@ -45,7 +45,7 @@ EXPORT_MAP := rte_pmd_cxgbe_version.map
LIBABIVER := 1
-ifeq ($(CC), icc)
+ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
#
# CFLAGS for icc
#
@@ -54,9 +54,11 @@ else
#
# CFLAGS for gcc/clang
#
-ifeq ($(shell test $(CC) = gcc && test $(GCC_VERSION) -ge 44 && echo 1), 1)
+ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
+ifeq ($(shell test $(GCC_VERSION) -ge 44 && echo 1), 1)
CFLAGS += -Wno-deprecated
endif
+endif
CFLAGS_BASE_DRIVER =
endif
@@ -43,7 +43,7 @@ EXPORT_MAP := rte_pmd_e1000_version.map
LIBABIVER := 1
-ifeq ($(CC), icc)
+ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
#
# CFLAGS for icc
#
@@ -43,13 +43,14 @@ EXPORT_MAP := rte_pmd_fm10k_version.map
LIBABIVER := 1
-ifeq ($(CC), icc)
+ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
#
# CFLAGS for icc
#
CFLAGS_BASE_DRIVER = -wd174 -wd593 -wd869 -wd981 -wd2259
-else ifeq ($(CC), clang)
+else ifeq ($(CONFIG_RTE_TOOLCHAIN_CLANG),y)
+
#
## CFLAGS for clang
#
@@ -48,9 +48,9 @@ LIBABIVER := 1
# Add extra flags for base driver files (also known as shared code)
# to disable warnings
#
-ifeq ($(CC), icc)
+ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
CFLAGS_BASE_DRIVER = -wd593 -wd188
-else ifeq ($(CC), clang)
+else ifeq ($(CONFIG_RTE_TOOLCHAIN_CLANG),y)
CFLAGS_BASE_DRIVER += -Wno-sign-compare
CFLAGS_BASE_DRIVER += -Wno-unused-value
CFLAGS_BASE_DRIVER += -Wno-unused-parameter
@@ -43,7 +43,7 @@ EXPORT_MAP := rte_pmd_ixgbe_version.map
LIBABIVER := 1
-ifeq ($(CC), icc)
+ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
#
# CFLAGS for icc
#
@@ -51,7 +51,7 @@ CFLAGS_BASE_DRIVER = -wd174 -wd593 -wd869 -wd981 -wd2259
CFLAGS_ixgbe_rxtx.o += -wd3656
-else ifeq ($(CC), clang)
+else ifeq ($(CONFIG_RTE_TOOLCHAIN_CLANG),y)
#
# CFLAGS for clang
#
@@ -47,7 +47,7 @@ endif
endif
endif
-ifneq (,$(filter gcc gcc48,$(CC)))
+ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
CFLAGS_BASE_DRIVER += -Wno-unused-but-set-variable
CFLAGS_BASE_DRIVER += -Wno-missing-declarations
CFLAGS_BASE_DRIVER += -Wno-maybe-uninitialized
@@ -55,7 +55,7 @@ CFLAGS_BASE_DRIVER += -Wno-strict-prototypes
ifeq ($(shell test $(GCC_VERSION) -ge 60 && echo 1), 1)
CFLAGS_BASE_DRIVER += -Wno-shift-negative-value
endif
-else ifeq ($(CC), clang)
+else ifeq ($(CONFIG_RTE_TOOLCHAIN_CLANG),y)
CFLAGS_BASE_DRIVER += -Wno-format-extra-args
CFLAGS_BASE_DRIVER += -Wno-visibility
CFLAGS_BASE_DRIVER += -Wno-empty-body
@@ -39,13 +39,13 @@ LIB = librte_pmd_vmxnet3_uio.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
-ifeq ($(CC), icc)
+ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
#
# CFLAGS for icc
#
CFLAGS_BASE_DRIVER = -wd174 -wd593 -wd869 -wd981 -wd2259
-else ifeq ($(CC), clang)
+else ifeq ($(CONFIG_RTE_TOOLCHAIN_CLANG),y)
#
# CFLAGS for clang
#
@@ -73,7 +73,7 @@ else
$(shell $(CC) -march=core-avx2 -dM -E - </dev/null 2>&1 | \
grep -q AVX2 && echo 1)
ifeq ($(CC_AVX2_SUPPORT), 1)
- ifeq ($(CC), icc)
+ ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
CFLAGS_acl_run_avx2.o += -march=core-avx2
else
CFLAGS_acl_run_avx2.o += -mavx2