patch 'config/arm: fix aarch32 build with GCC 13' has been queued to stable release 22.11.4

Xueming Li xuemingl at nvidia.com
Mon Dec 11 11:11:28 CET 2023


Hi,

FYI, your patch has been queued to stable release 22.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/13/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=cb225e1ae9d8f204d0e6b7d9a463540fe97cbab3

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From cb225e1ae9d8f204d0e6b7d9a463540fe97cbab3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Juraj=20Linke=C5=A1?= <juraj.linkes at pantheon.tech>
Date: Wed, 25 Oct 2023 14:57:14 +0200
Subject: [PATCH] config/arm: fix aarch32 build with GCC 13
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 7bfb0d4eaf51d329464e6c041315cf2025b97784 ]

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 at pantheon.tech>
Acked-by: Ruifeng Wang <ruifeng.wang at arm.com>
Reviewed-by: Paul Szczepanek <paul.szczepanek at arm.com>
---
 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 6442ec9596..5028c74613 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],
@@ -613,21 +615,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
@@ -659,7 +665,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.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-12-11 17:56:25.155140200 +0800
+++ 0063-config-arm-fix-aarch32-build-with-GCC-13.patch	2023-12-11 17:56:23.067652300 +0800
@@ -1 +1 @@
-From 7bfb0d4eaf51d329464e6c041315cf2025b97784 Mon Sep 17 00:00:00 2001
+From cb225e1ae9d8f204d0e6b7d9a463540fe97cbab3 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 7bfb0d4eaf51d329464e6c041315cf2025b97784 ]
@@ -27,2 +29,0 @@
-Cc: stable at dpdk.org
-
@@ -37 +38 @@
-index efd0bf32bc..36f21d2259 100644
+index 6442ec9596..5028c74613 100644
@@ -51 +52 @@
-@@ -696,21 +698,25 @@ if update_flags
+@@ -613,21 +615,25 @@ if update_flags
@@ -92 +93 @@
-@@ -742,7 +748,7 @@ if update_flags
+@@ -659,7 +665,7 @@ if update_flags


More information about the stable mailing list