summaryrefslogtreecommitdiff
path: root/lib/librte_table
diff options
context:
space:
mode:
authorAshwin Sekhar T K <ashwin.sekhar@caviumnetworks.com>2017-07-04 02:24:06 -0700
committerThomas Monjalon <thomas@monjalon.net>2017-07-04 15:57:22 +0200
commit266451e4190eac8425c50de12b67b484da70c9bc (patch)
tree63a9b5b96cde94763e694d1722016e5646a44f49 /lib/librte_table
parent34e59130672cc3c1226e34be803f6f98a8e567da (diff)
downloaddpdk-266451e4190eac8425c50de12b67b484da70c9bc.zip
dpdk-266451e4190eac8425c50de12b67b484da70c9bc.tar.gz
dpdk-266451e4190eac8425c50de12b67b484da70c9bc.tar.xz
eal: move gcc version definition to common header
Moved the definition of GCC_VERSION from lib/librte_table/rte_lru.h to lib/librte_eal/common/include/rte_common.h. Tested compilation on: * arm64 with gcc * x86 with gcc and clang Signed-off-by: Ashwin Sekhar T K <ashwin.sekhar@caviumnetworks.com> Reviewed-by: Jan Viktorin <viktorin@rehivetech.com> Acked-by: Jianbo Liu <jianbo.liu@linaro.org>
Diffstat (limited to 'lib/librte_table')
-rw-r--r--lib/librte_table/rte_lru_x86.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/librte_table/rte_lru_x86.h b/lib/librte_table/rte_lru_x86.h
index 314e0d6..10f513c 100644
--- a/lib/librte_table/rte_lru_x86.h
+++ b/lib/librte_table/rte_lru_x86.h
@@ -40,19 +40,13 @@ extern "C" {
#include <stdint.h>
-#ifdef __INTEL_COMPILER
-#define GCC_VERSION (0)
-#else
-#define GCC_VERSION (__GNUC__ * 10000+__GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__)
-#endif
-
#ifndef RTE_TABLE_HASH_LRU_STRATEGY
#define RTE_TABLE_HASH_LRU_STRATEGY 2
#endif
#if RTE_TABLE_HASH_LRU_STRATEGY == 2
-#if GCC_VERSION > 40306
+#if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION > 40306)
#include <x86intrin.h>
#else
#include <emmintrin.h>
@@ -96,7 +90,7 @@ do { \
#elif RTE_TABLE_HASH_LRU_STRATEGY == 3
-#if GCC_VERSION > 40306
+#if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION > 40306)
#include <x86intrin.h>
#else
#include <emmintrin.h>