[PATCH] config/arm: fix march features not being set
Pavan Nikhilesh Bhagavatula
pbhagavatula at marvell.com
Tue Mar 18 13:55:09 CET 2025
> -----Original Message-----
> From: Pavan Nikhilesh Bhagavatula
> Sent: Thursday, March 13, 2025 10:13 AM
> To: Wathsala Wathawana Vithanage <wathsala.vithanage at arm.com>; Jerin
> Jacob <jerinj at marvell.com>; Bruce Richardson <bruce.richardson at intel.com>
> Cc: dev at dpdk.org; nd <nd at arm.com>
> Subject: RE: [PATCH] config/arm: fix march features not being set
>
> > Hi Pavan,
> >
> > I think this patch does the right thing. I have a minor comment on the
> > cc.has_argument you have added.
> >
> > > ---
> > > config/arm/meson.build | 11 ++++++++---
> > > 1 file changed, 8 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/config/arm/meson.build b/config/arm/meson.build index
> > > dea329ceb7..7f85b088c9 100644
> > > --- a/config/arm/meson.build
> > > +++ b/config/arm/meson.build
> > > @@ -841,6 +841,7 @@ if update_flags
> > > implementer_config = implementers[implementer_id]
> > > part_number = soc_config['part_number']
> > > soc_flags = soc_config.get('flags', [])
> > > + extra_features = soc_config.get('extra_march_features', [])
> > > if not soc_config.get('numa', true)
> > > has_libnuma = false
> > > endif
> > > @@ -909,11 +910,15 @@ if update_flags
> > > machine_args += march
> > > else
> > > candidate_mcpu = '-mcpu=' + mcpu
> > > - if (cc.has_argument(candidate_mcpu))
> > > - machine_args += candidate_mcpu
> > > - else
> > > + if not cc.has_argument(candidate_mcpu)
> >
> > This is the else block of cc.has_argument, why is it checked again?
>
> The else block is removed.
>
> >
> > > error('Compiler does not support -mcpu=@0 at .'.format(mcpu))
> > > endif
> > > + foreach flag: extra_features
> > > + if cc.has_argument('+'.join([candidate_mcpu, flag]))
> > > + candidate_mcpu = '+'.join([candidate_mcpu, flag])
> > > + endif
> > > + endforeach
> > > + machine_args += candidate_mcpu
> >
> > Looks good to me.
> >
> > Thanks.
> >
> > --wathsala
> >
Ping
More information about the dev
mailing list