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 354C4A04A3; Tue, 16 Jun 2020 00:22:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 35D154C90; Tue, 16 Jun 2020 00:22:45 +0200 (CEST) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 107294C89 for ; Tue, 16 Jun 2020 00:22:43 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id B36665C00E6; Mon, 15 Jun 2020 18:22:42 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Mon, 15 Jun 2020 18:22: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=VST1DNRxmLsl5 eOHMKZ4dw6cwc1pH83mfwEWZIf7NYY=; b=uddNxZA8qpK20SKjXpYlLdVzAwmda COsl3Fgp4rHIL3E70/PORIPhx30whOJVxZMtALrQD2DiM3Ss4FdesyyZ5Peox4C/ EbeQsKYB9/uf/DZfmJJQKaqU6Mcopr1TOLsCc57u5T8VdU+SDlt+KjstOUDaosKm +a9tV9LZv84T4VSLkgWNNcQrgQvsxG0RvbzrKkNhFrWi446uWXfPI5/tgLDpBmMR VFEvt3FxZMjK34bbHT6A4lQcnIvUuvu/1RULAxp58cOCffNNq34GiVZ2Tys/snyW oc+4Ttn6VfftbfkUXLtPdZ4lRYIOQ6asEkcY1pvxFaJS/utdmivMnhjQw== 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=VST1DNRxmLsl5eOHMKZ4dw6cwc1pH83mfwEWZIf7NYY=; b=aIwNo5xf dXzBx/PE5mmjhYIVRey6ikUWbbBpAo04GI2lwt9RxfE8PWwDMqWi+xBqisEdjEOs jDq/E+vaYCauubbVERRYXMFyhNT/FLeKxslx7mwG+m7gkcz/P4oWrg4Dys0a4Taw stXCSulm1cjpNz5V2tDcv+rI9s417EjMD9OAslaTr2liuHbCYBgKciH5nlqHlVzK /o2NvkdZ2zMWR66Q9P6nk6EzUvtZZRPIVMSuhbb5Y5fa6GrZQej5VedrGIUHDOHG 4y9dxCfLxlazDJVnWZpq8Xas5P3tp/3Gsv0Po34Wwnxq4KBprRaOdfEnv6hZsHbc KtN/PKmFhyav1g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudeiledguddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcuoehthhhomhgrshes mhhonhhjrghlohhnrdhnvghtqeenucggtffrrghtthgvrhhnpedvhefgiedvjeegtdevhe efhfetleefgfeivefgffevfeejgedtgfeutdehtdegveenucfkphepjeejrddufeegrddv tdefrddukeegnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehmrghilhhfrh 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 C9C573060FE7; Mon, 15 Jun 2020 18:22: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: Tue, 16 Jun 2020 00:22:33 +0200 Message-Id: <20200615222236.1894695-2-thomas@monjalon.net> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200615222236.1894695-1-thomas@monjalon.net> References: <20200614225747.3839569-1-thomas@monjalon.net> <20200615222236.1894695-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 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 --- v2: fix ABI check config (thanks David) --- devtools/test-meson-builds.sh | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index 18b874fac5..bee55ec038 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 @@ -140,7 +148,7 @@ build () # fi rm -rf $abirefdir/build - config $abirefdir/src $abirefdir/build $* + config $abirefdir/src $abirefdir/build $cross $* compile $abirefdir/build install_target $abirefdir/build $abirefdir/$targetdir $srcdir/devtools/gen-abi.sh $abirefdir/$targetdir @@ -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