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 E45F0A09DE for ; Thu, 12 Nov 2020 15:22:49 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B4313593A; Thu, 12 Nov 2020 15:22:48 +0100 (CET) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 0870C569B; Thu, 12 Nov 2020 15:22:44 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 771B75C0126; Thu, 12 Nov 2020 09:22:43 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 12 Nov 2020 09:22:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=8vnFy3dDmc/dW erD/lLC3qS0JA5XLngnQ4T7lkTpJRE=; b=o3tC5Iu4aPnFOqglxq0PNY8HXlv9e WgzdMFjmk+LzcUtSOvfRQ6m4yeVBRIRiRXU0mxqKFlyacjQ0oA5Y9TkKvQZoIpUo U37lpiRagRr0bWytdZ4ASGmXhlUdFvs//DL8nPtDXt1lZvfAAMMSiaS+R9PAOdlO IZYMoHeAZlHPYJvMuK+cLU3xZORLWw4LQlymBaVtrgCJpAK+dYPwjHdKYm2Pct3N 4mNjvt4tVKrT0ZIX81F24Wg8Hy21WtSjPEhrllVQIih36hxZyJeCSVx9Ky5nqJWU G9AN/aQhDX/pEK/ecKVzB9cqtsRnaU3WL1D6nfuaMDmJjAWEbMtqc2CfQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=8vnFy3dDmc/dWerD/lLC3qS0JA5XLngnQ4T7lkTpJRE=; b=j8qA44UT w6n/4MuMh3Jd2h1Kw1O8uKe0DhSjAJW4GzjLJ97tZ2rnkw27MwNYYmPYkGoIk3/G TVmOjDI0esD0NNNkscgginqnVb3cA61fNdCSA3nLuC4N5ELoWpcvT/m/qxTmuLXR LlrgCwEGO1mME8Xg/bcpzhrweGvRDWZKCjYzYr9lMfY8/pvnMV+PVuD+5u1SgOXW xm5tBzhg52oHROvcrfnbyTa/GKdpT8ba0uNIPQiTifiQmmK0VTvz9+0TK1h436ih U0BXI3uj8NzQEZVnnZykeHgOsuKdD48d+YLpJAMGyMm/+SKjrcI8LuEJIIPK96kY IcI7/EtmHDzYDQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedruddvfedgfeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepvdehgfeivdejgedtveehfefhteelfefgieevgfffveefjeegtdfg uedthedtgeevnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvght X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 1DC2D3280059; Thu, 12 Nov 2020 09:22:42 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Cc: ferruh.yigit@intel.com, david.marchand@redhat.com, bruce.richardson@intel.com, stable@dpdk.org, Jerin Jacob , Luca Boccassi Date: Thu, 12 Nov 2020 15:22:33 +0100 Message-Id: <20201112142233.1433309-1-thomas@monjalon.net> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201109210009.919129-1-thomas@monjalon.net> References: <20201109210009.919129-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH v2 1/1] devtools: fix build test config inheritance from env X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" The variables DPDK_MESON_OPTIONS, PATH, PKG_CONFIG_PATH, CPPFLAGS, CFLAGS and LDFLAGS can be customized in the config file loaded by devtools/load-devel-config at each build. The configuration can be adjusted per target thanks to the value set in the DPDK_TARGET variable. PKG_CONFIG_PATH is specific to each target, so it must be empty before configuring each build from the file according to DPDK_TARGET. Inheriting a default PKG_CONFIG_PATH for all targets does not make sense and is prone to confusion. DPDK_MESON_OPTIONS might take a global initial value from environment to customize a build test from the shell. Example: DPDK_MESON_OPTIONS="b_lto=true" Some target-specific options can be added in the configuration file: DPDK_MESON_OPTIONS="$DPDK_MESON_OPTIONS kernel_dir=$MYKERNEL" Fixes: 272236741258 ("devtools: load target-specific compilation environment") Cc: stable@dpdk.org Signed-off-by: Thomas Monjalon Acked-by: Bruce Richardson Acked-by: Ferruh Yigit Tested-by: Jerin Jacob --- v2: - unset PKG_CONFIG_PATH because empty is printed by meson - add more comments --- devtools/test-meson-builds.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index 0c95d1cc98..f32b5784f4 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -38,10 +38,10 @@ else fi default_path=$PATH -default_pkgpath=$PKG_CONFIG_PATH default_cppflags=$CPPFLAGS default_cflags=$CFLAGS default_ldflags=$LDFLAGS +default_meson_options=$DPDK_MESON_OPTIONS check_cc_flags () # ... { @@ -52,12 +52,14 @@ check_cc_flags () # ... load_env () # { targetcc=$1 + # reset variables before target-specific config export PATH=$default_path - export PKG_CONFIG_PATH=$default_pkgpath + unset PKG_CONFIG_PATH # global default makes no sense export CPPFLAGS=$default_cppflags export CFLAGS=$default_cflags export LDFLAGS=$default_ldflags - unset DPDK_MESON_OPTIONS + export DPDK_MESON_OPTIONS=$default_meson_options + # set target hint for use in the loaded config file if [ -n "$target_override" ] ; then DPDK_TARGET=$target_override elif command -v $targetcc >/dev/null 2>&1 ; then -- 2.28.0