dev.dpdk.org archive mirror
 help / color / mirror / Atom feed
From: David Christensen <drc@linux.vnet.ibm.com>
To: maxime.coquelin@redhat.com, tiwei.bie@intel.com
Cc: dev@dpdk.org, David Christensen <drc@linux.vnet.ibm.com>
Subject: [dpdk-dev] [PATCH 1/2] config: fix RHEL7.6 build errors on Power 9 systems
Date: Wed, 14 Aug 2019 13:36:40 -0500	[thread overview]
Message-ID: <1565807801-72546-2-git-send-email-drc@linux.vnet.ibm.com> (raw)
In-Reply-To: <1565807801-72546-1-git-send-email-drc@linux.vnet.ibm.com>

gcc 4.8.5 used on RHEL 7.6 can identify a Power 9 CPU but cannot generate
Power 9 code when the "-mcpu=native" command line argument is used. Test
whether the compiler can generate Power 9 code and adjust the machine
setting appropriately.

Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
---
 config/ppc_64/meson.build | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/config/ppc_64/meson.build b/config/ppc_64/meson.build
index 0e65f9d..495ef6f 100644
--- a/config/ppc_64/meson.build
+++ b/config/ppc_64/meson.build
@@ -7,6 +7,16 @@ endif
 dpdk_conf.set('RTE_ARCH', 'ppc_64')
 dpdk_conf.set('RTE_ARCH_PPC_64', 1)
 
+# RHEL 7.x uses gcc 4.8.X which doesn't generate code for Power 9 CPUs,
+# though it will detect a Power 9 CPU when the "-mcpu=native" argument
+# is used, resulting in a build failure.
+power9_supported = cc.has_argument('-mcpu=power9')
+if not power9_supported
+	machine = 'power8'
+	machine_args = ['-mcpu=power8', '-mtune=power8']
+  dpdk_conf.set('RTE_MACHINE','power8')
+endif
+
 # overrides specific to ppc64
 dpdk_conf.set('RTE_MAX_LCORE', 1536)
 dpdk_conf.set('RTE_MAX_NUMA_NODES', 32)
-- 
1.8.3.1


  reply	other threads:[~2019-08-14 18:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-14 18:36 [dpdk-dev] [PATCH 0/2] fixes to resolve meson build issues on Power systems David Christensen
2019-08-14 18:36 ` David Christensen [this message]
2019-10-25 18:52   ` [dpdk-dev] [PATCH 1/2] config: fix RHEL7.6 build errors on Power 9 systems David Christensen
2019-10-27 10:04   ` David Marchand
2019-08-14 18:36 ` [dpdk-dev] [PATCH 2/2] vhost: fix build error caused by 64bit print formatting David Christensen
2019-08-15  6:53   ` David Marchand
2019-08-15 16:16     ` David Christensen
2019-08-19  8:40       ` David Marchand
2019-08-19 11:41         ` Maxime Coquelin
2019-10-24 19:27           ` David Marchand
2019-10-25  4:38             ` Tiwei Bie
2019-10-25  4:41   ` Tiwei Bie
2019-10-27 10:04     ` David Marchand

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=1565807801-72546-2-git-send-email-drc@linux.vnet.ibm.com \
    --to=drc@linux.vnet.ibm.com \
    --cc=dev@dpdk.org \
    --cc=maxime.coquelin@redhat.com \
    --cc=tiwei.bie@intel.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).