[dpdk-dev] [PATCH] build: add -moutline-atomics to default Arm build

Ruifeng Wang Ruifeng.Wang at arm.com
Fri Oct 9 07:29:44 CEST 2020


> -----Original Message-----
> From: Thomas Monjalon <thomas at monjalon.net>
> Sent: Wednesday, October 7, 2020 4:14 AM
> To: Juraj Linkeš <juraj.linkes at pantheon.tech>
> Cc: bruce.richardson at intel.com; dev at dpdk.org; jerinj at marvell.com;
> Ruifeng Wang <Ruifeng.Wang at arm.com>; Honnappa Nagarahalli
> <Honnappa.Nagarahalli at arm.com>
> Subject: Re: [dpdk-dev] [PATCH] build: add -moutline-atomics to default Arm
> build
> 
> 01/10/2020 08:19, Juraj Linkeš:
> > -moutline-atomics allows LSE instructions to be used if available when
> > compiling for ARMv8.0 instruction set. It's enabled by default on
> > newer compilers, such as gcc-10.1. Enable the option so that earlier
> > compiler versions that support it but don't enable it by default build with it.
> >
> > Signed-off-by: Juraj Linkeš <juraj.linkes at pantheon.tech>
> > ---
> >  machine_args_generic = [
> > -	['default', ['-march=armv8-a+crc']],
> > +	['default', ['-march=armv8-a+crc', '-moutline-atomics']],
> >  	['native', ['-march=native']],
> >  	['0xd03', ['-mcpu=cortex-a53']],
> >  	['0xd04', ['-mcpu=cortex-a35']],
> 
> Why is it added only to the target "default"?
> 
Because 'default' target generates Armv8.0 instruction set which doesn't include LSE extension. 
The flag enables LSE instructions when code runs on platforms that implements LSE extension.

For other targets, machine specific 'mcpu' or 'march' flags are used. LSE extension availability can be inferred from the given flags.
So there is not need to add '-moutline-atomics' to them. 


More information about the dev mailing list