summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Marchand <david.marchand@redhat.com>2019-10-02 18:55:47 +0200
committerThomas Monjalon <thomas@monjalon.net>2019-11-28 00:33:58 +0100
commitbd711af366273ddcb78d4a877feac578b7040e81 (patch)
tree6928f0d6d3ef3aedd9891cb08a5baf79ed393f36
parent808b3fce7ed76572b16b699d2845c3e83d9f59e7 (diff)
downloaddpdk-next-eventdev-bd711af366273ddcb78d4a877feac578b7040e81.zip
dpdk-next-eventdev-bd711af366273ddcb78d4a877feac578b7040e81.tar.gz
dpdk-next-eventdev-bd711af366273ddcb78d4a877feac578b7040e81.tar.xz
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 <david.marchand@redhat.com>
-rwxr-xr-xdevtools/test-meson-builds.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index 07d4298..50a3263 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 () # <target compiler>
{
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')