DPDK patches and discussions
 help / color / mirror / Atom feed
From: Wathsala Wathawana Vithanage <wathsala.vithanage@arm.com>
To: "pbhagavatula@marvell.com" <pbhagavatula@marvell.com>,
	"jerinj@marvell.com" <jerinj@marvell.com>,
	Bruce Richardson <bruce.richardson@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, nd <nd@arm.com>
Subject: RE: [PATCH] config/arm: fix march features not being set
Date: Wed, 12 Mar 2025 19:46:58 +0000	[thread overview]
Message-ID: <PAWPR08MB89099D7C522EFE6681BBA2EE9FD02@PAWPR08MB8909.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <20250308085902.4383-1-pbhagavatula@marvell.com>

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? 

>              error('Compiler does not support -mcpu=@0@.'.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



  parent reply	other threads:[~2025-03-12 19:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-08  8:59 pbhagavatula
2025-03-10 14:23 ` Jerin Jacob
2025-03-11 19:44   ` Wathsala Wathawana Vithanage
2025-03-12 19:46 ` Wathsala Wathawana Vithanage [this message]
2025-03-13  4:42   ` Pavan Nikhilesh Bhagavatula

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=PAWPR08MB89099D7C522EFE6681BBA2EE9FD02@PAWPR08MB8909.eurprd08.prod.outlook.com \
    --to=wathsala.vithanage@arm.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=nd@arm.com \
    --cc=pbhagavatula@marvell.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).