[dpdk-dev] [PATCH 1/2] eal/arm: fix gcc build for optimization level 0

Ruifeng Wang Ruifeng.Wang at arm.com
Fri Nov 27 10:36:35 CET 2020


> -----Original Message-----
> From: David Marchand <david.marchand at redhat.com>
> Sent: Friday, November 27, 2020 4:39 PM
> To: Ruifeng Wang <Ruifeng.Wang at arm.com>; jerinj at marvell.com
> Cc: Honnappa Nagarahalli <Honnappa.Nagarahalli at arm.com>; dev
> <dev at dpdk.org>; nd <nd at arm.com>; Feifei Wang <Feifei.Wang2 at arm.com>
> Subject: Re: [dpdk-dev] [PATCH 1/2] eal/arm: fix gcc build for optimization
> level 0
> 
> On Fri, Nov 27, 2020 at 9:10 AM Ruifeng Wang <ruifeng.wang at arm.com>
> wrote:
> >
> > Gcc build with '-O0' on platforms with RTE_ARM_FEATURE_ATOMICS set
> > failed for:
> >  ../lib/librte_efd/rte_efd.c
> >  Assembler messages:
> > 3866: Error: selected processor does not support `crc32cb w0,w0,w1'
> > 3890: Error: selected processor does not support `crc32ch w0,w0,w1'
> > 3914: Error: selected processor does not support `crc32cw w0,w0,w1'
> > 3938: Error: selected processor does not support `crc32cx w0,w0,x1'
> >
> > This was caused by an architecture specifier added for Clang.
> > Unlike Clang, Gcc considers each inline assembly block to be dependent
> > and therefor, the architecture specifier impacts assemble of some
> > blocks require certain extension support.
> 
> I reproduced this error with -O0 for config/arm/arm64_octeontx2_linux_gcc.
> The patch looks simple enough and it only affects ARM builds.
> 
> Jerin,
> Are you okay with this change for 20.11?
> Or should we wait 21.02?
> 
> Ruifeng,
> Looking at the kernel, I see no distinction with gcc/clang, so I'd say the kernel
> has the same issue, or is there something else that differs in dpdk?
> Besides, the kernel patch previously mentioned had a followup fix.

The kernel follow up fix looks like a better way to reconcile Gcc and Clang.
I'll reroll with the same approach.
> 
> 
> --
> David Marchand



More information about the dev mailing list