All of lore.kernel.org
 help / color / mirror / Atom feed
From: fengchengwen <fengchengwen@huawei.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: <thomas@monjalon.net>, <ferruh.yigit@intel.com>,
	<ruifeng.wang@arm.com>, <dev@dpdk.org>,
	<vladimir.medvedkin@intel.com>, <viktorin@rehivetech.com>,
	<jerinj@marvell.com>
Subject: Re: [dpdk-dev] [PATCH v2] build: fix SVE compile error with gcc8.3
Date: Fri, 21 May 2021 09:57:30 +0800	[thread overview]
Message-ID: <e9a3b795-1d9d-cec0-2934-3a1348d48876@huawei.com> (raw)
In-Reply-To: <YKZfcMtcicTj4Ynu@bricha3-MOBL.ger.corp.intel.com>

Fix in v3, also with minor changes, thanks

On 2021/5/20 21:09, Bruce Richardson wrote:
> On Thu, May 20, 2021 at 07:40:12PM +0800, Chengwen Feng wrote:
>> If the target machine has SVE feature (e.g. "-march=armv8.2-a+sve'),
>> and the compiler is gcc8.3, it will compile error:
>> 	In file included from ../dpdk-next-net/lib/eal/common/
>> 	eal_common_options.c:38:
>> 	../dpdk-next-net/lib/eal/arm/include/rte_vect.h:13:10: fatal
>> 	error: arm_sve.h: No such file or directory
>> 	#include <arm_sve.h>
>> 	       ^~~~~~~~~~~
>> 	compilation terminated.
>>
>> The root cause is that gcc8.3 support SVE (the macro __ARM_FEATURE_SVE
>> was 1), but it doesn't support SVE ACLE [1].
>>
>> The solution:
>> a) Detect compiler whether support SVE ACLE, if support then define
>> CC_SVE_ACLE_SUPPORT macro.
>> b) Use the CC_SVE_ACLE_SUPPORT macro to include SVE header file.
>>
>> [1] ACLE:  Arm C Language Extensions, the SVE ACLE header file is
>> <arm_sve.h>, user should include it when writing ACLE SVE code.
>>
>> Fixes: 67b68824a82d ("lpm/arm: support SVE")
>>
>> Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
>> ---
>> v2: 
>> * modify title start with 'build'
>>
> 
> One minor comment inline below.
> /Bruce
>> ---
>>  config/arm/meson.build         | 5 +++++
>>  lib/eal/arm/include/rte_vect.h | 2 +-
>>  lib/lpm/rte_lpm.h              | 2 +-
>>  3 files changed, 7 insertions(+), 2 deletions(-)
>>
>> diff --git a/config/arm/meson.build b/config/arm/meson.build
>> index e83a56e..bff70e4 100644
>> --- a/config/arm/meson.build
>> +++ b/config/arm/meson.build
>> @@ -480,6 +480,11 @@ if (cc.get_define('__ARM_NEON', args: machine_args) != '' or
>>      compile_time_cpuflags += ['RTE_CPUFLAG_NEON']
>>  endif
>>  
>> +if (cc.get_define('__ARM_FEATURE_SVE', args: machine_args) != '' and
>> +    cc.check_header('arm_sve.h'))
> Please double-indent this line. It looks like part of the condition body
> as-is.
> 
> 
> .
> 


  reply	other threads:[~2021-05-21  1:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-20  7:16 [dpdk-dev] [PATCH] lpm/arm: fix SVE compile error with gcc8.3 Chengwen Feng
2021-05-20  8:17 ` Ruifeng Wang
2021-05-20 11:45   ` fengchengwen
2021-05-20 11:40 ` [dpdk-dev] [PATCH v2] build: " Chengwen Feng
2021-05-20 13:09   ` Bruce Richardson
2021-05-21  1:57     ` fengchengwen [this message]
2021-05-21  1:53 ` [dpdk-dev] [PATCH v3] " Chengwen Feng
2021-05-25  6:02   ` Ruifeng Wang
2021-05-27  7:12     ` Fengchengwen
2021-06-12  7:07     ` fengchengwen
2021-06-21  0:56       ` fengchengwen
2021-06-23  8:05   ` 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=e9a3b795-1d9d-cec0-2934-3a1348d48876@huawei.com \
    --to=fengchengwen@huawei.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jerinj@marvell.com \
    --cc=ruifeng.wang@arm.com \
    --cc=thomas@monjalon.net \
    --cc=viktorin@rehivetech.com \
    --cc=vladimir.medvedkin@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.