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 222D9A04B1; Thu, 5 Nov 2020 12:21:32 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CB1CCBE6F; Thu, 5 Nov 2020 12:21:30 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id B47C2BE67 for ; Thu, 5 Nov 2020 12:21:29 +0100 (CET) IronPort-SDR: Rhn0uSxZuNm0dRwlmpGGdT5n9aST1oYFmpe5n1dDIGO1F46vYJzzZVqugo0TQWMr7vmW5XX9nq 2jr0CpnY/MXQ== X-IronPort-AV: E=McAfee;i="6000,8403,9795"; a="149218975" X-IronPort-AV: E=Sophos;i="5.77,453,1596524400"; d="scan'208";a="149218975" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Nov 2020 03:21:27 -0800 IronPort-SDR: KDC/9NRIbneApUch4zqheuu8dhwAZdQOLw65hJBi5WSisTPeb6Uxz4BV5LankfdQ9+/3ImYzYB OsHNuuDNHy8g== X-IronPort-AV: E=Sophos;i="5.77,453,1596524400"; d="scan'208";a="539361314" 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 03:21:25 -0800 Date: Thu, 5 Nov 2020 11:21:18 +0000 From: Bruce Richardson To: Thomas Monjalon Cc: dev@dpdk.org, david.marchand@redhat.com Message-ID: <20201105112118.GA776@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 ... > > > + 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 Thanks for the quick review, I'll put together a v2 based on this feedback. /Bruce