From 3932237f10b99451d205515f7a266a59986ff29d Mon Sep 17 00:00:00 2001 From: Thomas Monjalon Date: Mon, 15 Jun 2020 00:18:44 +0200 Subject: [PATCH] devtools: allow non-standard toolchain in meson test 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 Reviewed-by: David Christensen --- 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 bee55ec038..9781eaf415 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -52,9 +52,15 @@ load_env () # 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 () # -- 2.20.1