DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ruifeng Wang <Ruifeng.Wang@arm.com>
To: "Juraj Linkeš" <juraj.linkes@pantheon.tech>,
	"thomas@monjalon.net" <thomas@monjalon.net>,
	"Honnappa Nagarahalli" <Honnappa.Nagarahalli@arm.com>,
	"bruce.richardson@intel.com" <bruce.richardson@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, nd <nd@arm.com>
Subject: RE: [PATCH v3] config/arm: update aarch32 build with gcc13
Date: Thu, 26 Oct 2023 07:04:30 +0000	[thread overview]
Message-ID: <AS8PR08MB7080538FBFBDA14C239C57EB9EDDA@AS8PR08MB7080.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <20231025125714.132793-1-juraj.linkes@pantheon.tech>

> -----Original Message-----
> From: Juraj Linkeš <juraj.linkes@pantheon.tech>
> Sent: Wednesday, October 25, 2023 8:57 PM
> To: thomas@monjalon.net; Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>;
> bruce.richardson@intel.com; Ruifeng Wang <Ruifeng.Wang@arm.com>
> Cc: dev@dpdk.org; Juraj Linkeš <juraj.linkes@pantheon.tech>
> Subject: [PATCH v3] config/arm: update aarch32 build with gcc13
> 
> The aarch32 with gcc13 fails with:
> 
> Compiler for C supports arguments -march=armv8-a: NO
> 
> ../config/arm/meson.build:714:12: ERROR: Problem encountered: No suitable armv8 march
> version found.
> 
> This is because we test -march=armv8-a alone (without the -mpfu option), which is no
> longer supported in gcc13 aarch32 builds.
> 
> The most recent recommendation from the compiler team is to build with -march=armv8-a+simd
> -mfpu=auto, which should work for compilers old and new. The suggestion is to first check
> -march=armv8-a+simd and only then check -mfpu=auto.
> 
> To address this, add a way to force the architecture (the value of the -march option).
> 
> Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> ---
>  config/arm/meson.build | 40 +++++++++++++++++++++++-----------------
>  1 file changed, 23 insertions(+), 17 deletions(-)
> 
> diff --git a/config/arm/meson.build b/config/arm/meson.build index 3f22d8a2fc..c3f763764a
> 100644
> --- a/config/arm/meson.build
> +++ b/config/arm/meson.build
> @@ -43,7 +43,9 @@ implementer_generic = {
>          },
>          'generic_aarch32': {
>              'march': 'armv8-a',
> -            'compiler_options': ['-mfpu=neon'],
> +            'force_march': true,
> +            'march_features': ['simd'],
> +            'compiler_options': ['-mfpu=auto'],
>              'flags': [
>                  ['RTE_ARCH_ARM_NEON_MEMCPY', false],
>                  ['RTE_ARCH_STRICT_ALIGN', true], @@ -695,21 +697,25 @@ if update_flags
>      # probe supported archs and their features
>      candidate_march = ''
>      if part_number_config.has_key('march')
> -        supported_marchs = ['armv8.6-a', 'armv8.5-a', 'armv8.4-a', 'armv8.3-a',
> -                            'armv8.2-a', 'armv8.1-a', 'armv8-a']
> -        check_compiler_support = false
> -        foreach supported_march: supported_marchs
> -            if supported_march == part_number_config['march']
> -                # start checking from this version downwards
> -                check_compiler_support = true
> -            endif
> -            if (check_compiler_support and
> -                cc.has_argument('-march=' + supported_march))
> -                candidate_march = supported_march
> -                # highest supported march version found
> -                break
> -            endif
> -        endforeach
> +        if part_number_config.get('force_march', false)
> +            candidate_march = part_number_config['march']
> +        else
> +            supported_marchs = ['armv8.6-a', 'armv8.5-a', 'armv8.4-a', 'armv8.3-a',
> +                                'armv8.2-a', 'armv8.1-a', 'armv8-a']
> +            check_compiler_support = false
> +            foreach supported_march: supported_marchs
> +                if supported_march == part_number_config['march']
> +                    # start checking from this version downwards
> +                    check_compiler_support = true
> +                endif
> +                if (check_compiler_support and
> +                    cc.has_argument('-march=' + supported_march))
> +                    candidate_march = supported_march
> +                    # highest supported march version found
> +                    break
> +                endif
> +            endforeach
> +        endif
>          if candidate_march == ''
>              error('No suitable armv8 march version found.')
>          endif
> @@ -741,7 +747,7 @@ if update_flags
>      # apply supported compiler options
>      if part_number_config.has_key('compiler_options')
>          foreach flag: part_number_config['compiler_options']
> -            if cc.has_argument(flag)
> +            if cc.has_multi_arguments(machine_args + [flag])
>                  machine_args += flag
>              else
>                  warning('Configuration compiler option ' +
> --
> 2.34.1

Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>


  reply	other threads:[~2023-10-26  7:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-21  9:59 [PATCH v1] " Juraj Linkeš
2023-10-09  9:53 ` [PATCH v2] " Juraj Linkeš
2023-10-10  2:55   ` Ruifeng Wang
2023-10-12 12:40   ` Paul Szczepanek
2023-10-13  7:35     ` Juraj Linkeš
2023-10-25 12:57   ` [PATCH v3] " Juraj Linkeš
2023-10-26  7:04     ` Ruifeng Wang [this message]
2023-11-01 12:57     ` Paul Szczepanek
2023-11-06 14:22       ` 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=AS8PR08MB7080538FBFBDA14C239C57EB9EDDA@AS8PR08MB7080.eurprd08.prod.outlook.com \
    --to=ruifeng.wang@arm.com \
    --cc=Honnappa.Nagarahalli@arm.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=juraj.linkes@pantheon.tech \
    --cc=nd@arm.com \
    --cc=thomas@monjalon.net \
    /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).