DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev]  [PATCH] fix build issues in the cross-compiling mode
@ 2016-05-26 11:20 Jerin Jacob
  2016-05-26 12:20 ` Bruce Richardson
  0 siblings, 1 reply; 3+ messages in thread
From: Jerin Jacob @ 2016-05-26 11:20 UTC (permalink / raw)
  To: dev; +Cc: thomas.monjalon, h.mikita89, Jerin Jacob

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(-)

diff --git a/app/test/Makefile b/app/test/Makefile
index f269fe0..6df9c40 100644
--- a/app/test/Makefile
+++ b/app/test/Makefile
@@ -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
diff --git a/drivers/net/cxgbe/Makefile b/drivers/net/cxgbe/Makefile
index e2ff412..bfcc315 100644
--- a/drivers/net/cxgbe/Makefile
+++ b/drivers/net/cxgbe/Makefile
@@ -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
diff --git a/drivers/net/e1000/Makefile b/drivers/net/e1000/Makefile
index f4879e6..5b801f5 100644
--- a/drivers/net/e1000/Makefile
+++ b/drivers/net/e1000/Makefile
@@ -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
 #
diff --git a/drivers/net/fm10k/Makefile b/drivers/net/fm10k/Makefile
index 602a2d2..cf141ae 100644
--- a/drivers/net/fm10k/Makefile
+++ b/drivers/net/fm10k/Makefile
@@ -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
 #
diff --git a/drivers/net/i40e/Makefile b/drivers/net/i40e/Makefile
index 56b20d5..9ffef3f 100644
--- a/drivers/net/i40e/Makefile
+++ b/drivers/net/i40e/Makefile
@@ -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
diff --git a/drivers/net/ixgbe/Makefile b/drivers/net/ixgbe/Makefile
index 50bf51c..70e8209 100644
--- a/drivers/net/ixgbe/Makefile
+++ b/drivers/net/ixgbe/Makefile
@@ -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
 #
diff --git a/drivers/net/qede/Makefile b/drivers/net/qede/Makefile
index c9b3b1c..fe449aa 100644
--- a/drivers/net/qede/Makefile
+++ b/drivers/net/qede/Makefile
@@ -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
diff --git a/drivers/net/vmxnet3/Makefile b/drivers/net/vmxnet3/Makefile
index 4cf3b33..23ff1da 100644
--- a/drivers/net/vmxnet3/Makefile
+++ b/drivers/net/vmxnet3/Makefile
@@ -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
 #
diff --git a/lib/librte_acl/Makefile b/lib/librte_acl/Makefile
index 2e394c9..9803e9d 100644
--- a/lib/librte_acl/Makefile
+++ b/lib/librte_acl/Makefile
@@ -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
-- 
2.5.5

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-07  8:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-26 11:20 [dpdk-dev] [PATCH] fix build issues in the cross-compiling mode Jerin Jacob
2016-05-26 12:20 ` Bruce Richardson
2016-06-07  8:01   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).