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 76916A04B1; Thu, 5 Nov 2020 12:13:49 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BD0B4BE67; Thu, 5 Nov 2020 12:13:46 +0100 (CET) Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by dpdk.org (Postfix) with ESMTP id D907EBE47 for ; Thu, 5 Nov 2020 12:13:44 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 3CB765D5; Thu, 5 Nov 2020 06:13:40 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 05 Nov 2020 06:13:40 -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:content-type; s=fm2; bh= ppMWt4h7q4ifFNLXA/GsnPHzkRb4zteMl4J2UHh7KnI=; b=WvLB2DDl8LpQ0uty 4PHcbRYaIMxo2U8MSndZrbhE8eEN6t4X13R/H2HIvxPy/e1AIOBC5S46hDBY1IcN h17am9UBwM0V+3rfNdlh6+IpgalZtWqcr5C42E5BTrepq5pB0/XC1QR62RsVOWAZ Lq2CkvRmZchGdMlhnMzf2+P3x2S1ockGZE916z3gDi7ZTfo94Qs504u9ZNRBXphH Khbz9M6vDVuun/B7YKXjOqn0wWt2GzZi1ywAlrV0+RIOqKYIMh53tyQR/B/tcq2n b9b8UOW/JDBDiLNAgw1w/VV5ggRQVmTJKLBc4v5Mp1s3EZvQsDdtoJcAaUa6dK5l bw+Nqg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :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=ppMWt4h7q4ifFNLXA/GsnPHzkRb4zteMl4J2UHh7K nI=; b=OdnLJaQ17UJFgYxCROk+k7EE3yn4mZaKLIxTMMubPvKWWjp0Mzft5/RSs u6pzVD18xODX6jhARjp+apL93IUzr2MMT0paE1YNJdHKxN6Dc4VQ+oyINc4oyWRj olyHOE9E0ylLm8VWmr1qeOWj8gtYW4bJGRfsjaI1FAmfUx/c2oUzH2iUlvC1hw/C DuF/oggOIa4iaj9yfRJDIRzmD09J//J7XUNAocEk2V+wZzWe57Y0bVhIV2/DJX5t dJ5zJSSdlNA+Pmb4gYeYhbK2ZXjMQFagC/BqA6U8R9SV8Jwq7NXP1YvI2maBEjBD vlglBvX3Qy3F9afM9PMW3KlkpBjEw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedruddtjedgvdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepudeggfdvfeduffdtfeeglefghfeukefgfffhueejtdetuedtjeeu ieeivdffgeehnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvght X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id D0A833280261; Thu, 5 Nov 2020 06:13:38 -0500 (EST) From: Thomas Monjalon To: Bruce Richardson Cc: dev@dpdk.org, david.marchand@redhat.com Date: Thu, 05 Nov 2020 12:13:37 +0100 Message-ID: <2267482.6AlIP691sX@thomas> In-Reply-To: <20201105110728.220957-1-bruce.richardson@intel.com> References: <20201105110728.220957-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] test-meson-builds: add a 32-bit 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" 05/11/2020 12:07, Bruce Richardson: > It's reasonably common for patches to have issues when built on 32-bits, so > to prevent this, we can add a 32-bit build (if supported) to the > "test-meson-builds.sh" script. The tricky bit is using a valid > PKG_CONFIG_LIBDIR, so for now we use two common possibilities for where that > should point to in order to get a successful build. > > Signed-off-by: Bruce Richardson Thanks we really need such test. > +if echo "int main(void) { return 0; }" | cc -m32 -x c - -o /dev/null 2> /dev/null ; then I think a function would be cleaner, with -m32 passed as parameter. > + if [ -d "/usr/lib/i386-linux-gnu" ] ; then > + # 32-bit pkgconfig on debian/ubuntu > + export PKG_CONFIG_LIBDIR="/usr/lib/i386-linux-gnu/pkgconfig" > + else > + # 32-bit pkgconfig on RHEL/fedora (lib vs lib64) > + export PKG_CONFIG_LIBDIR="/usr/lib/pkgconfig" It is /usr/lib32 on my Arch Linux. I would prefer avoiding export, by assigning a local variable and use it below: PKG_CONFIG_LIBDIR=libdir32 build build-32-bit ... > + fi > + build build-32-bit cc -Dc_args='-m32' -Dc_link_args='-m32' Or just "build-32" as directory name. > + unset PKG_CONFIG_LIBDIR No need of unset if not using export above. > +fi