[Bug,1251] PPC64le: 23.07 RC1 build failed for power10 on RHEL 9.0

Message ID bug-1251-3-bKsSR0vx4O@http.bugs.dpdk.org/ (mailing list archive)
State Not Applicable, archived
Delegated to: Thomas Monjalon
Headers
Series [Bug,1251] PPC64le: 23.07 RC1 build failed for power10 on RHEL 9.0 |

Checks

Context Check Description
ci/Intel-compilation warning apply issues

Commit Message

bugzilla@dpdk.org June 26, 2023, 4:54 p.m. UTC
  https://bugs.dpdk.org/show_bug.cgi?id=1251

David Christensen (drc@linux.vnet.ibm.com) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|IN_PROGRESS                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from David Christensen (drc@linux.vnet.ibm.com) ---
GCC bugzilla has been opened:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110411 to track the issue.

Suggested workaround is to enable "-mno-block-ops-vector-pair" for gcc < 11.4
when building for power10 architecture. (GCC 11.4 enables this option by
default when -mcpu=power10.)


Proposed fix:

 dpdk_conf.set('RTE_MACHINE', cpu_instruction_set)
  

Patch

diff --git a/config/ppc/meson.build b/config/ppc/meson.build
index 1cba44011f..160b203cb1 100644
--- a/config/ppc/meson.build
+++ b/config/ppc/meson.build
@@ -105,6 +105,14 @@  else
     endif
 endif
 machine_args = ['-mcpu=' + cpu_instruction_set, '-mtune=' +
cpu_instruction_set]
+
+# gcc versions < 11.4 may fail to build for power10, see
https://bugs.dpdk.org/show_bug.cgi?id=1251.
+# Explicitly specify a default used in gcc 11.4 and later to workaround the
issue
+if (cpu_instruction_set == 'power10' and cc.get_id() == 'gcc' and
+        cc.version().version_compare('<=11.4'))
+    machine_args += '-mno-block-ops-vector-pair'
+endif
+