From patchwork Fri Jun 28 03:46:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ziyang Xuan X-Patchwork-Id: 55529 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8877E4C6C; Fri, 28 Jun 2019 05:34:24 +0200 (CEST) Received: from huawei.com (szxga04-in.huawei.com [45.249.212.190]) by dpdk.org (Postfix) with ESMTP id 48155378E for ; Fri, 28 Jun 2019 05:34:23 +0200 (CEST) Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 6F3CAFA963B3D1376878 for ; Fri, 28 Jun 2019 11:34:21 +0800 (CST) Received: from tester_149.localdomain (10.175.119.39) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.439.0; Fri, 28 Jun 2019 11:34:11 +0800 From: Ziyang Xuan To: CC: , , , , , Ziyang Xuan Date: Fri, 28 Jun 2019 11:46:08 +0800 Message-ID: X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-Originating-IP: [10.175.119.39] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH 1/1] net/hinic: solve compilation issues X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patch fixes ci/Intel-compilation issues for hinic PMD on 32-bits platform. Signed-off-by: Ziyang Xuan --- 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