DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ziyang Xuan <xuanziyang2@huawei.com>
To: <dev@dpdk.org>
Cc: <ferruh.yigit@intel.com>, <cloud.wangxiaoyun@huawei.com>,
	<shahar.belkar@huawei.com>, <luoxianjun@huawei.com>,
	<tanya.brokhman@huawei.com>, Ziyang Xuan <xuanziyang2@huawei.com>
Subject: [dpdk-dev] [PATCH 1/1] net/hinic: solve compilation issues
Date: Fri, 28 Jun 2019 11:46:08 +0800	[thread overview]
Message-ID: <eea2174a76daa3a1eef1bdc83c3372ec1287e603.1561693029.git.xuanziyang2@huawei.com> (raw)

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(+)

diff --git a/drivers/net/hinic/Makefile b/drivers/net/hinic/Makefile
index df7871b05..123a6263d 100644
--- a/drivers/net/hinic/Makefile
+++ b/drivers/net/hinic/Makefile
@@ -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
 
 #
diff --git a/drivers/net/hinic/base/meson.build b/drivers/net/hinic/base/meson.build
index 21a246cd1..cde394a20 100644
--- a/drivers/net/hinic/base/meson.build
+++ b/drivers/net/hinic/base/meson.build
@@ -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
-- 
2.18.0


             reply	other threads:[~2019-06-28  3:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-28  3:46 Ziyang Xuan [this message]
2019-06-28 10:30 ` Ferruh Yigit

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=eea2174a76daa3a1eef1bdc83c3372ec1287e603.1561693029.git.xuanziyang2@huawei.com \
    --to=xuanziyang2@huawei.com \
    --cc=cloud.wangxiaoyun@huawei.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=luoxianjun@huawei.com \
    --cc=shahar.belkar@huawei.com \
    --cc=tanya.brokhman@huawei.com \
    /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).