From: Jerin Jacob Date: Thu, 26 May 2016 11:20:14 +0000 (+0530) Subject: mk: fix cross-compilation X-Git-Tag: spdx-start~6843 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=52b50e8a6bc11b7b83a83c120bd250a25627c79c;p=dpdk.git mk: fix cross-compilation 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 Signed-off-by: Jerin Jacob Acked-by: Bruce Richardson --- diff --git a/app/test/Makefile b/app/test/Makefile index f269fe0727..6df9c40db0 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 e2ff412b41..bfcc3159fd 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 f4879e6716..5b801f5666 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 602a2d2d2f..cf141aea48 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 56b20d58aa..9ffef3f5ad 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 50bf51c9c2..70e8209d73 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 c9b3b1c9f3..fe449aa9c6 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 4cf3b33b5e..23ff1da290 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 2e394c9728..9803e9ddf1 100644 --- a/lib/librte_acl/Makefile +++ b/lib/librte_acl/Makefile @@ -73,7 +73,7 @@ else $(shell $(CC) -march=core-avx2 -dM -E - &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