From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7E02EA2EDB for ; Wed, 2 Oct 2019 18:56:00 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 64E5B1BF00; Wed, 2 Oct 2019 18:55:59 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 8B9151BEF0 for ; Wed, 2 Oct 2019 18:55:57 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BC21D81F10; Wed, 2 Oct 2019 16:55:56 +0000 (UTC) Received: from dmarchan.remote.csb (ovpn-204-157.brq.redhat.com [10.40.204.157]) by smtp.corp.redhat.com (Postfix) with ESMTP id BD57C19481; Wed, 2 Oct 2019 16:55:55 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: Thomas Monjalon Date: Wed, 2 Oct 2019 18:55:47 +0200 Message-Id: <1570035347-18360-1-git-send-email-david.marchand@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 02 Oct 2019 16:55:56 +0000 (UTC) Subject: [dpdk-dev] [PATCH] devtools: reset compilation flags for each target X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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 () # { 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