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 5B425A0093; Mon, 15 Jun 2020 00:58:51 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 88A154CA6; Mon, 15 Jun 2020 00:58:44 +0200 (CEST) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id AF7B74C90 for ; Mon, 15 Jun 2020 00:58:43 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id EBC335C00C6; Sun, 14 Jun 2020 18:58:42 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Sun, 14 Jun 2020 18:58:42 -0400 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=fm1; bh=eBbSeJGh0psHY kZLFlA1afguXVBE2uk1mkxh7nV7mew=; b=AcFpYdVj5ikPadBGuo4IAPH83VPJx 2dShpzedF4i5w+FUOE0MRLXUMtap1CZmBTjBA57vwIy5Eza+h6sam76urWo4gf6g 0XwBF9Z8KU4L2eMmMMwRSHlVHiHSoGAi5YTQemHadvcdqG44GpXli9yxX33c/BLi VETpxXmCVVng6AdQIiPRFlWeVx5BZqT7yrD0Gagp92MPypgq7GKFrSEgl8xk+5/I xZZbqNMHSrCgC5EXUqRwYPkdmigDm6snuXGB5qYH49LcGvE8XhVXjWtBK3ylcYED GK2rMRkMJXF+ZI9EMF+aIIS6Raw0WJZgueugz01tqQH5Jnow0dtnhIXXw== 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= fm3; bh=eBbSeJGh0psHYkZLFlA1afguXVBE2uk1mkxh7nV7mew=; b=DNS63ulO 9FTsim5BYA3iM8rdbxEZTHmYvNa/QN0v6S2TDObdwJG4r2/VNQkcFeJd2TD7k/ME LDXVlsVgnQGLxcb4PZ+WqZinlwhh48VK3+u7pPuom/8TRAQHKUytfQypxZpxQISS Y6+dPwhPogxYGBpBm+dkhzypBEFfXb/zDX6etk30QraqmlMdbE6yVTMLu825aecY Yu0ljFqHQVINQkzxSRCG1dmTnQRsbcsi5JbV81uaBnnAuLh4lZSv876u85ju4k0Z eA5MzldC5IKT4X97yEs/8DpPRaxjobWWO26L3A2HBZ88o+y3IPs/GcsK6Xuf6IPD yyFk86JGVi3RMw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudeijedgudekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcuoehthhhomhgrshes mhhonhhjrghlohhnrdhnvghtqeenucggtffrrghtthgvrhhnpedvhefgiedvjeegtdevhe efhfetleefgfeivefgffevfeejgedtgfeutdehtdegveenucfkphepjeejrddufeegrddv tdefrddukeegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth 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 14BA93280059; Sun, 14 Jun 2020 18:58:41 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: david.marchand@redhat.com, bruce.richardson@intel.com, drc@linux.vnet.ibm.com, dmitry.kozliuk@gmail.com Date: Mon, 15 Jun 2020 00:57:44 +0200 Message-Id: <20200614225747.3839569-2-thomas@monjalon.net> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200614225747.3839569-1-thomas@monjalon.net> References: <20200614225747.3839569-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 1/4] devtools: shrink cross-compilation test definition 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" Each cross-compilation case needs to define the target compiler and the meson cross file. Given the compiler is already defined in the cross file, the latter is enough. The function "build" is changed to accept a cross file alternatively to the compiler name. In the case of a file (detected if readable), the compiler is extracted with sed and tr, and the option --cross-file is automatically added. Signed-off-by: Thomas Monjalon --- devtools/test-meson-builds.sh | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index 18b874fac5..602167e43a 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -117,16 +117,24 @@ install_target () # fi } -build () # +build () # { targetdir=$1 shift - targetcc=$1 + crossfile= + [ -r $1 ] && crossfile=$1 || targetcc=$1 shift # skip build if compiler not available command -v ${CC##* } >/dev/null 2>&1 || return 0 + if [ -n "$crossfile" ] ; then + cross="--cross-file $crossfile" + targetcc=$(sed -n 's,^c[[:space:]]*=[[:space:]]*,,p' \ + $crossfile | tr -d "'" | tr -d '"') + else + cross= + fi load_env $targetcc || return 0 - config $srcdir $builds_dir/$targetdir --werror $* + config $srcdir $builds_dir/$targetdir $cross --werror $* compile $builds_dir/$targetdir if [ -n "$DPDK_ABI_REF_VERSION" ]; then abirefdir=${DPDK_ABI_REF_DIR:-reference}/$DPDK_ABI_REF_VERSION @@ -186,17 +194,15 @@ if [ "$ok" = "false" ] ; then fi build build-x86-default cc -Dlibdir=lib -Dmachine=$default_machine $use_shared -c=aarch64-linux-gnu-gcc # generic armv8a with clang as host compiler +f=$srcdir/config/arm/arm64_armv8_linux_gcc export CC="clang" -build build-arm64-host-clang $c $use_shared \ - --cross-file $srcdir/config/arm/arm64_armv8_linux_gcc +build build-arm64-host-clang $f $use_shared unset CC -# all gcc/arm configurations +# some gcc/arm configurations for f in $srcdir/config/arm/arm64_[bdo]*gcc ; do export CC="$CCACHE gcc" - build build-$(basename $f | tr '_' '-' | cut -d'-' -f-2) $c \ - $use_shared --cross-file $f + build build-$(basename $f | tr '_' '-' | cut -d'-' -f-2) $f $use_shared unset CC done -- 2.26.2