DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: dev@dpdk.org
Cc: david.marchand@redhat.com, bruce.richardson@intel.com,
	drc@linux.vnet.ibm.com, dmitry.kozliuk@gmail.com
Subject: [dpdk-dev] [PATCH 2/4] devtools: allow non-standard toolchain in meson test
Date: Mon, 15 Jun 2020 00:57:45 +0200
Message-ID: <20200614225747.3839569-3-thomas@monjalon.net> (raw)
In-Reply-To: <20200614225747.3839569-1-thomas@monjalon.net>

If a compiler is not found in $PATH, the compilation test is skipped.
In some cases, the compiler could be found after extending $PATH
in an environment configuration script (called by load-devel-config).

The decision to skip is deferred to a later stage, after loading the
configuration script.

In such case, the variable DPDK_TARGET, used by the configuration script
as input, is the compiler name.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 devtools/test-meson-builds.sh | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index 602167e43a..1d80a029aa 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -52,9 +52,15 @@ load_env () # <target compiler>
 	export CFLAGS=$default_cflags
 	export LDFLAGS=$default_ldflags
 	unset DPDK_MESON_OPTIONS
-	command -v $targetcc >/dev/null 2>&1 || return 1
-	DPDK_TARGET=$($targetcc -v 2>&1 | sed -n 's,^Target: ,,p')
+	if command -v $targetcc >/dev/null 2>&1 ; then
+		DPDK_TARGET=$($targetcc -v 2>&1 | sed -n 's,^Target: ,,p')
+	else # toolchain not yet in PATH: its name should be enough
+		DPDK_TARGET=$targetcc
+	fi
+	# config input: $DPDK_TARGET
 	. $srcdir/devtools/load-devel-config
+	# config output: $DPDK_MESON_OPTIONS, $PATH, $PKG_CONFIG_PATH, etc
+	command -v $targetcc >/dev/null 2>&1 || return 1
 }
 
 config () # <dir> <builddir> <meson options>
-- 
2.26.2


  parent reply	other threads:[~2020-06-14 22:58 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-14 22:57 [dpdk-dev] [PATCH 0/4] add PPC and Windows to " Thomas Monjalon
2020-06-14 22:57 ` [dpdk-dev] [PATCH 1/4] devtools: shrink cross-compilation test definition Thomas Monjalon
2020-06-14 22:57 ` Thomas Monjalon [this message]
2020-06-14 22:57 ` [dpdk-dev] [PATCH 3/4] devtools: add ppc64 in meson build test Thomas Monjalon
2020-06-15 21:43   ` David Christensen
2020-06-15 22:13     ` Thomas Monjalon
2020-06-16 20:35       ` David Christensen
2020-06-16 21:26         ` Thomas Monjalon
2020-06-17 21:02           ` David Christensen
2020-06-14 22:57 ` [dpdk-dev] [PATCH 4/4] devtools: add Windows cross-build test with MinGW Thomas Monjalon
2020-06-14 23:09   ` Thomas Monjalon
2020-06-15  1:05     ` Dmitry Kozlyuk
2020-06-15  7:51       ` Thomas Monjalon
2020-06-15 22:22 ` [dpdk-dev] [PATCH v2 0/4] add PPC and Windows cross-compilation to meson test Thomas Monjalon
2020-06-15 22:22   ` [dpdk-dev] [PATCH v2 1/4] devtools: shrink cross-compilation test definition Thomas Monjalon
2020-06-17 21:05     ` David Christensen
2020-06-15 22:22   ` [dpdk-dev] [PATCH v2 2/4] devtools: allow non-standard toolchain in meson test Thomas Monjalon
2020-06-17 21:06     ` David Christensen
2020-06-15 22:22   ` [dpdk-dev] [PATCH v2 3/4] devtools: add ppc64 in meson build test Thomas Monjalon
2020-06-17 21:07     ` David Christensen
2020-06-15 22:22   ` [dpdk-dev] [PATCH v2 4/4] devtools: add Windows cross-build test with MinGW Thomas Monjalon
2020-06-29 23:15   ` [dpdk-dev] [PATCH v2 0/4] add PPC and Windows cross-compilation to meson test 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=20200614225747.3839569-3-thomas@monjalon.net \
    --to=thomas@monjalon.net \
    --cc=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=dmitry.kozliuk@gmail.com \
    --cc=drc@linux.vnet.ibm.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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git