[1/1] net/hinic: solve compilation issues
Checks
Commit Message
This patch fixes ci/Intel-compilation issues for hinic PMD
on 32-bits platform.
Signed-off-by: Ziyang Xuan <xuanziyang2@huawei.com>
---
drivers/net/hinic/Makefile | 18 ++++++++++++++++++
drivers/net/hinic/base/meson.build | 12 ++++++++++++
2 files changed, 30 insertions(+)
Comments
On 6/28/2019 4:46 AM, Ziyang Xuan wrote:
> This patch fixes ci/Intel-compilation issues for hinic PMD
> on 32-bits platform.
>
> Signed-off-by: Ziyang Xuan <xuanziyang2@huawei.com>
Squashed into relevant commit in next-net, thanks.
@@ -25,6 +25,24 @@ EXPORT_MAP := rte_pmd_hinic_version.map
LIBABIVER := 1
+#
+# CFLAGS for 32-bits platforms
+#
+ifneq ($(CONFIG_RTE_ARCH_64),y)
+ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
+#
+# CFLAGS for icc
+#
+CFLAGS += -diag-disable 2259
+else
+#
+# CFLAGS for gcc
+#
+CFLAGS += -Wno-int-to-pointer-cast
+CFLAGS += -Wno-pointer-to-int-cast
+endif
+endif
+
VPATH += $(SRCDIR)/base
#
@@ -14,6 +14,18 @@ sources = [
'hinic_pmd_wq.c',
]
+extra_flags = []
+# The driver runs only on arch64 machine, remove 32bit warnings
+if not dpdk_conf.get('RTE_ARCH_64')
+ extra_flags += ['-Wno-int-to-pointer-cast', '-Wno-pointer-to-int-cast']
+endif
+
+foreach flag: extra_flags
+ if cc.has_argument(flag)
+ cflags += flag
+ endif
+endforeach
+
deps += ['hash']
c_args = cflags