]> git.droids-corp.org - dpdk.git/commitdiff
mk: fix cross-compilation
authorJerin Jacob <jerin.jacob@caviumnetworks.com>
Thu, 26 May 2016 11:20:14 +0000 (16:50 +0530)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 7 Jun 2016 08:02:39 +0000 (10:02 +0200)
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>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
app/test/Makefile
drivers/net/cxgbe/Makefile
drivers/net/e1000/Makefile
drivers/net/fm10k/Makefile
drivers/net/i40e/Makefile
drivers/net/ixgbe/Makefile
drivers/net/qede/Makefile
drivers/net/vmxnet3/Makefile
lib/librte_acl/Makefile

index f269fe0727eb0179260916c890c60ea1e5f07155..6df9c40db070b8bc9f48b74d7170027a4438815f 100644 (file)
@@ -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
index e2ff412b416d894c9a22cfd1e6b30118464609a3..bfcc3159fd6fbda8d8c4ce2f31291f97a890cd80 100644 (file)
@@ -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
index f4879e67160c5bf3696e4a8f8a8e4cae558e12d6..5b801f5666456e4a2ff00defe811a7143795bdd3 100644 (file)
@@ -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
 #
index 602a2d2d2f611fb6752da86c8249b120764bc2fa..cf141aea48908c5b75f719bf4e5cc3ed2d29b78c 100644 (file)
@@ -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
 #
index 56b20d58aab8e8a28ae89477f35aeec542570b1f..9ffef3f5ad4303cd64832266cfce591b1b021d77 100644 (file)
@@ -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
index 50bf51c9c20536657d14410f2cc3fe80ab0ba834..70e8209d737b1fe544d44bd703fa99a873c700ab 100644 (file)
@@ -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
 #
index c9b3b1c9f35a13a32bb73d297a24945fd86c4de7..fe449aa9c63dcd02601c3ccbcdf2f43cf8f89099 100644 (file)
@@ -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
index 4cf3b33b5e8d05b528208e162e470fa04cdde3ed..23ff1da290003c6a6074ffa577847fa1b5a10f67 100644 (file)
@@ -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
 #
index 2e394c972895fa5113874661e44df6fac797e4f4..9803e9ddf1df97df576edbcf54fbae04316bc23a 100644 (file)
@@ -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