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 91796A2EEB for ; Fri, 13 Sep 2019 09:34:44 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0067E1F077; Fri, 13 Sep 2019 09:34:42 +0200 (CEST) Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by dpdk.org (Postfix) with ESMTP id 80DA71F05E for ; Fri, 13 Sep 2019 09:34:41 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 2B5C3601; Fri, 13 Sep 2019 03:34:40 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Fri, 13 Sep 2019 03:34:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=mesmtp; bh=ijiNSYUBK05asuEMr0+vp1k R1McGYLiWY+U3Fq0VOgc=; b=JlWTtC/w4rrpY8EgYPIFf6CCEBNNMnKva6b2Dsm ZNb82Q2buJk4Qxm+WI4uIyEm6tjNbFmmT0ZO4FmG32J8Z1u0o86kUBid05Cgf7qe xJUWUcmD5cIU2kP1CtkPr80WmPXlTjw/shu86bZz+a3Kmc8QIqaFSVoMwBgjhnMx FmRM= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=ijiNSYUBK05asuEMr 0+vp1kR1McGYLiWY+U3Fq0VOgc=; b=EkwJwTTmw5pV0tWPBHvUVR/Lbg8U2NVW7 SrwQnp+ntc1pVLn5hmrLOnKw7Oh7jsb53WPwgl/vzcifjLbLZJEKiJimFY7aWA0A 0floMNRbeBwrpMSCYU2c3uv+t7hleqj+lACMRSUi5ZERBphh5OyzXQt12JtNBep1 icRq2syAZEeGAyB2ArXNaNVoi+R0h34xiO5HZTGBNtRYQwHif5KMfM+W9nuiNf/V jruPfhQ12a9dc2t5ZxaN9kswP9ZuZr7l+ZpQXbvs341ui1X7aFHgVjxMzalW2XDV 8+7GgV/gXUFxWJadFsj5wRsgvQQ3Au4Xg0S7HJ0FY6i9DbR/hAssw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrtdeigdduvddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgggfestdekredtre dttdenucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhho nhhjrghlohhnrdhnvghtqeenucfkphepjeejrddufeegrddvtdefrddukeegnecurfgrrh grmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtnecuvehl uhhsthgvrhfuihiivgeptd 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 8833BD6005D; Fri, 13 Sep 2019 03:34:38 -0400 (EDT) From: Thomas Monjalon To: bruce.richardson@intel.com Cc: bluca@debian.org, dev@dpdk.org Date: Fri, 13 Sep 2019 09:34:25 +0200 Message-Id: <20190913073425.13363-1-thomas@monjalon.net> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] devtools: fix check of ccache for meson build 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" The meson build test fails if ccache is not available. The use of ccache must be optional. And if used, the compiler to check is the last word of $CC. Fixes: e0ae780e6569 ("devtools: test compiler availability only once") Signed-off-by: Thomas Monjalon --- This script is failing now because a real check of ccache availability is done in commit e0ae780e6569. It was not failing before, which means $CC is not used by meson? --- devtools/test-meson-builds.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index a9d9360a6..2eb9b23b0 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -28,6 +28,11 @@ else echo "ERROR: ninja is not found" >&2 exit 1 fi +if command -v ccache >/dev/null 2>&1 ; then + CCACHE=ccache +else + CCACHE= +fi default_path=$PATH default_pkgpath=$PKG_CONFIG_PATH @@ -46,7 +51,7 @@ build () # targetcc=$1 shift # skip build if compiler not available - command -v $CC >/dev/null 2>&1 || return 0 + command -v ${CC##* } >/dev/null 2>&1 || return 0 command -v $targetcc >/dev/null 2>&1 || return 0 reset_env DPDK_TARGET=$($targetcc -v 2>&1 | sed -n 's,^Target: ,,p') @@ -90,7 +95,7 @@ fi for c in gcc clang ; do command -v $c >/dev/null 2>&1 || continue for s in static shared ; do - export CC="ccache $c" + export CC="$CCACHE $c" build build-$c-$s $c --default-library=$s done done @@ -112,7 +117,7 @@ build build-arm64-host-clang $c $use_shared \ --cross-file $srcdir/config/arm/arm64_armv8_linux_gcc # all gcc/arm configurations for f in $srcdir/config/arm/arm*gcc ; do - export CC="ccache gcc" + export CC="$CCACHE gcc" build build-$(basename $f | tr '_' '-' | cut -d'-' -f-2) $c \ $use_shared --cross-file $f done -- 2.23.0