DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] devtools: reset compilation flags for each target
@ 2019-10-02 16:55 David Marchand
  2019-10-03  9:21 ` Bruce Richardson
  2019-11-27 23:07 ` Thomas Monjalon
  0 siblings, 2 replies; 5+ messages in thread
From: David Marchand @ 2019-10-02 16:55 UTC (permalink / raw)
  To: dev; +Cc: Thomas Monjalon

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>
---
 devtools/test-meson-builds.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index 08e83eb..6091347 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_cflags=$CFLAGS
+default_cppflags=$CPPFLAGS
+default_ldflags=$LDFLAGS
 
 load_env () # <target compiler>
 {
 	targetcc=$1
 	export PATH=$default_path
 	export PKG_CONFIG_PATH=$default_pkgpath
+	export CFLAGS=$default_cflags
+	export CPPFLAGS=$default_cppflags
+	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')
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-11-27 23:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-02 16:55 [dpdk-dev] [PATCH] devtools: reset compilation flags for each target David Marchand
2019-10-03  9:21 ` Bruce Richardson
2019-10-03 10:08   ` David Marchand
2019-10-03 10:35     ` Bruce Richardson
2019-11-27 23:07 ` Thomas Monjalon

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).