DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>, stable@dpdk.org
Subject: [dpdk-dev] [PATCH 2/3] devtools/test-meson-builds: support older compilers
Date: Wed, 10 Apr 2019 21:52:23 +0100	[thread overview]
Message-ID: <20190410205224.69977-3-bruce.richardson@intel.com> (raw)
In-Reply-To: <20190410205224.69977-1-bruce.richardson@intel.com>

Older versions of GCC, such as on Redhat/CentOS 7, don't support
-march=nehalem, but need -march=corei7 instead.

CC: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 devtools/test-meson-builds.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index 60e4168..0b14030 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -63,7 +63,12 @@ for c in gcc clang ; do
 done
 
 # test compilation with minimal x86 instruction set
-build build-x86-default -Dmachine=nehalem $use_shared
+default_machine='nehalem'
+ok=$(cc -march=$default_machine -E - < /dev/null > /dev/null 2>&1 || echo false)
+if [ "$ok" = "false" ] ; then
+	default_machine='corei7'
+fi
+build build-x86-default -Dmachine=$default_machine $use_shared
 
 # enable cross compilation if gcc cross-compiler is found
 c=aarch64-linux-gnu-gcc
-- 
1.8.3.1

  parent reply	other threads:[~2019-04-10 20:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-10 20:52 [dpdk-dev] [PATCH 0/3] fix test-meson-builds for older distros Bruce Richardson
2019-04-10 20:52 ` Bruce Richardson
2019-04-10 20:52 ` [dpdk-dev] [PATCH 1/3] devtools/test-meson-builds: skip missing compilers Bruce Richardson
2019-04-10 20:52   ` Bruce Richardson
2019-04-17 14:59   ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2019-04-17 14:59     ` Thomas Monjalon
2019-04-17 15:04     ` Bruce Richardson
2019-04-17 15:04       ` Bruce Richardson
2019-04-10 20:52 ` Bruce Richardson [this message]
2019-04-10 20:52   ` [dpdk-dev] [PATCH 2/3] devtools/test-meson-builds: support older compilers Bruce Richardson
2019-04-10 20:52 ` [dpdk-dev] [PATCH 3/3] devtools/test-meson-builds: fix bash-isms Bruce Richardson
2019-04-10 20:52   ` Bruce Richardson
2019-04-11  8:48 ` [dpdk-dev] [PATCH 0/3] fix test-meson-builds for older distros Luca Boccassi
2019-04-11  8:48   ` Luca Boccassi
2019-04-17 15:17   ` Thomas Monjalon
2019-04-17 15:17     ` 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=20190410205224.69977-3-bruce.richardson@intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    /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).