From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Bruce Richardson <bruce.richardson@intel.com>,
Pablo de Lara <pablo.de.lara.guarch@intel.com>
Cc: dev@dpdk.org, Ferruh Yigit <ferruh.yigit@intel.com>, stable@dpdk.org
Subject: [dpdk-stable] [PATCH 5/5] hash: fix icc build
Date: Tue, 13 Jun 2017 17:42:12 +0100 [thread overview]
Message-ID: <20170613164212.42374-5-ferruh.yigit@intel.com> (raw)
In-Reply-To: <20170613164212.42374-1-ferruh.yigit@intel.com>
build error with icc version 17.0.4 (gcc version 7.0.0 compatibility):
In file included from .../dpdk/lib/librte_hash/rte_fbk_hash.h(59),
from .../dpdk/lib/librte_hash/rte_fbk_hash.c(54):
.../dpdk/x86_64-native-linuxapp-icc/include/rte_hash_crc.h(480):
error #1292: unknown attribute "fallthrough"
__attribute__ ((fallthrough));
^
In file included from .../dpdk/lib/librte_hash/rte_fbk_hash.h(59),
from .../dpdk/lib/librte_hash/rte_fbk_hash.c(54):
.../dpdk/x86_64-native-linuxapp-icc/include/rte_hash_crc.h(486):
error #1292: unknown attribute "fallthrough"
__attribute__ ((fallthrough));
^
This code patch hit when gcc > 7 installed and ICC doesn't recognize
fallthrough attribute.
Fixed by disabling code when compiled with ICC.
Fixes: 3dfb9facb055 ("lib: add switch fall-through comments")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
This can be merged with the patch fixes gcc build error.
Cc: Bruce Richardson <bruce.richardson@intel.com>
---
lib/librte_hash/rte_hash_crc.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/librte_hash/rte_hash_crc.h b/lib/librte_hash/rte_hash_crc.h
index 0f485b854..b8a0cbefb 100644
--- a/lib/librte_hash/rte_hash_crc.h
+++ b/lib/librte_hash/rte_hash_crc.h
@@ -476,13 +476,13 @@ rte_hash_crc_set_alg(uint8_t alg)
case CRC32_SSE42_x64:
if (! rte_cpu_get_flag_enabled(RTE_CPUFLAG_EM64T))
alg = CRC32_SSE42;
-#if __GNUC__ >= 7
+#if __GNUC__ >= 7 && !defined(RTE_TOOLCHAIN_ICC)
__attribute__ ((fallthrough));
#endif
case CRC32_SSE42:
if (! rte_cpu_get_flag_enabled(RTE_CPUFLAG_SSE4_2))
alg = CRC32_SW;
-#if __GNUC__ >= 7
+#if __GNUC__ >= 7 && !defined(RTE_TOOLCHAIN_ICC)
__attribute__ ((fallthrough));
#endif
#endif
--
2.13.0
next prev parent reply other threads:[~2017-06-13 16:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-13 16:42 [dpdk-stable] [PATCH 1/5] kni: fix build with gcc 7.1 Ferruh Yigit
2017-06-13 16:42 ` [dpdk-stable] [PATCH 2/5] net/i40e: fix memset size Ferruh Yigit
2017-06-14 1:15 ` Xing, Beilei
2017-06-13 16:42 ` [dpdk-stable] [PATCH 3/5] net/enic: fix build with gcc 7.1 Ferruh Yigit
2017-06-13 16:42 ` [dpdk-stable] [PATCH 4/5] net/mlx5: " Ferruh Yigit
2017-06-14 13:24 ` Adrien Mazarguil
2017-06-13 16:42 ` Ferruh Yigit [this message]
2017-06-14 20:55 ` [dpdk-stable] [dpdk-dev] [PATCH 1/5] kni: " Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170613164212.42374-5-ferruh.yigit@intel.com \
--to=ferruh.yigit@intel.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=pablo.de.lara.guarch@intel.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).