From: David Marchand <david.marchand@redhat.com>
To: Chengwen Feng <fengchengwen@huawei.com>,
Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>,
"Ruifeng Wang (Arm Technology China)" <Ruifeng.Wang@arm.com>
Cc: "Thomas Monjalon" <thomas@monjalon.net>,
"Yigit, Ferruh" <ferruh.yigit@intel.com>, dev <dev@dpdk.org>,
"Jerin Jacob Kollanukkaran" <jerinj@marvell.com>,
"Jerin Jacob" <jerinjacobk@gmail.com>,
"Jan Viktorin" <viktorin@rehivetech.com>,
"Bruce Richardson" <bruce.richardson@intel.com>,
"Juraj Linkeš" <juraj.linkes@pantheon.tech>, nd <nd@arm.com>
Subject: Re: [dpdk-dev] [PATCH v2] net/hns3: fix compile error with gcc8.3 and thunderx2
Date: Wed, 19 May 2021 14:34:45 +0200 [thread overview]
Message-ID: <CAJFAV8wjjz6m1E1U88aeD0A54Xx0WB3Bar8y-1OqWcQfD-+syA@mail.gmail.com> (raw)
In-Reply-To: <1621425281-2413-1-git-send-email-fengchengwen@huawei.com>
On Wed, May 19, 2021 at 1:57 PM Chengwen Feng <fengchengwen@huawei.com> wrote:
>
> Compile error with gcc8.3 and crossfile arm64_thunderx2_linux_gcc:
> ../drivers/net/hns3/hns3_rxtx_vec_sve.c
> cc1: error: switch ‘-mcpu=armv8.1-a’ conflicts with
> ‘-march=armv8.2-a’ switch [-Werror]
> ../drivers/net/hns3/hns3_rxtx_vec_sve.c:5:10: fatal error:
> arm_sve.h: No such file or directory
> 5 | #include <arm_sve.h>
>
> The root cause is that gcc8.3 supports SVE, but it doesn't support
> compile ACLE[1] SVE code, and the hns3_rxtx_vec_sve.c was written
> by ACLE SVE code.
Quite confusing.
What is the difference between the two?
>
> This patch also filters out '-march=' '-mcpu' '-mtune' when compile
> with hns3_rxtx_vec_sve.c.
>
> [1] ACLE: Arm C Language Extensions, user should include <arm_sve.h>
> when writing ACLE SVE code.
>
> Fixes: 203fbaf8813d ("net/hns3: refactor SVE code compile method")
>
> Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
> ---
> v2:
> * fix check tool error
> ---
> drivers/net/hns3/meson.build | 14 ++++++++++----
> 1 file changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/hns3/meson.build b/drivers/net/hns3/meson.build
> index 8563d70..5f9af9b 100644
> --- a/drivers/net/hns3/meson.build
> +++ b/drivers/net/hns3/meson.build
> @@ -39,16 +39,22 @@ if arch_subdir == 'arm' and dpdk_conf.get('RTE_ARCH_64')
> # compile SVE when:
> # a. support SVE in minimum instruction set baseline
> # b. it's not minimum instruction set, but compiler support
> - if cc.get_define('__ARM_FEATURE_SVE', args: machine_args) != ''
> + if cc.get_define('__ARM_FEATURE_SVE', args: machine_args) != '' and cc.check_header('arm_sve.h')
The rte_vect.h arm header unconditionally includes arm_sve.h if
__ARM_FEATURE_SVE is defined [1].
So it is surprising to see such a check being added.
1: https://git.dpdk.org/dpdk/tree/lib/eal/arm/include/rte_vect.h#n12
--
David Marchand
next prev parent reply other threads:[~2021-05-19 12:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-19 11:47 [dpdk-dev] [PATCH] net/hns3: fix compile error with gcc8.3 and crossfile thunderx2 Chengwen Feng
2021-05-19 11:54 ` [dpdk-dev] [PATCH v2] net/hns3: fix compile error with gcc8.3 and thunderx2 Chengwen Feng
2021-05-19 12:30 ` Ferruh Yigit
2021-05-19 12:42 ` David Marchand
2021-05-19 13:30 ` fengchengwen
2021-05-19 12:34 ` David Marchand [this message]
2021-05-19 13:40 ` fengchengwen
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=CAJFAV8wjjz6m1E1U88aeD0A54Xx0WB3Bar8y-1OqWcQfD-+syA@mail.gmail.com \
--to=david.marchand@redhat.com \
--cc=Honnappa.Nagarahalli@arm.com \
--cc=Ruifeng.Wang@arm.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=fengchengwen@huawei.com \
--cc=ferruh.yigit@intel.com \
--cc=jerinj@marvell.com \
--cc=jerinjacobk@gmail.com \
--cc=juraj.linkes@pantheon.tech \
--cc=nd@arm.com \
--cc=thomas@monjalon.net \
--cc=viktorin@rehivetech.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).