From: David Marchand Date: Wed, 2 Oct 2019 16:55:47 +0000 (+0200) Subject: devtools: reset compilation flags for each target X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=bd711af366273ddcb78d4a877feac578b7040e81;p=dpdk.git devtools: reset compilation flags for each target Same idea than overriding PATH and PKG_CONFIG_PATH, it can be quite useful to override compilation flags like CFLAGS, CPPFLAGS and LDFLAGS for cross compilation or libraries that won't provide a pkg-config file. Fixes: 272236741258 ("devtools: load target-specific compilation environment") Signed-off-by: David Marchand --- diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index 07d42985e6..50a3263c7b 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -36,12 +36,18 @@ fi default_path=$PATH default_pkgpath=$PKG_CONFIG_PATH +default_cppflags=$CPPFLAGS +default_cflags=$CFLAGS +default_ldflags=$LDFLAGS load_env () # { targetcc=$1 export PATH=$default_path export PKG_CONFIG_PATH=$default_pkgpath + export CPPFLAGS=$default_cppflags + 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')