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 C7C1CA04E7; Thu, 5 Nov 2020 18:19:35 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0B6B92BE2; Thu, 5 Nov 2020 18:19:34 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 82F8F160 for ; Thu, 5 Nov 2020 18:19:32 +0100 (CET) IronPort-SDR: jlDNrf+rlk/MdFj3PZwE8mSP3OSV8vMHEurjrSVUjbknDSKS1WTF8mvikkGhD81i7xn+E4t201 hOYOnqRs6URA== X-IronPort-AV: E=McAfee;i="6000,8403,9796"; a="169532663" X-IronPort-AV: E=Sophos;i="5.77,454,1596524400"; d="scan'208";a="169532663" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Nov 2020 09:19:09 -0800 IronPort-SDR: 989S0mVGcRQyf+ltF7o0xHoZjBsst7LbKgh+LK6gSmLJR6CGDnBlGm6awe5wWFKwDsQOB4oRic PA1X0B/tdyQw== X-IronPort-AV: E=Sophos;i="5.77,454,1596524400"; d="scan'208";a="539491195" Received: from bricha3-mobl.ger.corp.intel.com ([10.251.177.138]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 05 Nov 2020 09:19:07 -0800 Date: Thu, 5 Nov 2020 17:19:00 +0000 From: Bruce Richardson To: Thomas Monjalon Cc: dev@dpdk.org, david.marchand@redhat.com Message-ID: <20201105171900.GB781@bricha3-MOBL.ger.corp.intel.com> References: <20201105110728.220957-1-bruce.richardson@intel.com> <2267482.6AlIP691sX@thomas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2267482.6AlIP691sX@thomas> 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" On Thu, Nov 05, 2020 at 12:13:37PM +0100, Thomas Monjalon wrote: > 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 ... > Not having the variable exported means that it does not seem to be passed through to the meson (and other) subprocesses. Therefore keeping the export as is in V2. /Bruce