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 00218A04C0; Fri, 25 Sep 2020 16:28:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C90491E97F; Fri, 25 Sep 2020 16:28:42 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id BCD011E96D for ; Fri, 25 Sep 2020 16:28:40 +0200 (CEST) IronPort-SDR: rnvGzX1Iprly9rpLDxL71Fs/IDqjp1xiuwV2s2WhVOgaJPaWNPTofBGq+9TD4Cgh623xW83r7i GM4esME/O7dQ== X-IronPort-AV: E=McAfee;i="6000,8403,9755"; a="158890565" X-IronPort-AV: E=Sophos;i="5.77,302,1596524400"; d="scan'208";a="158890565" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Sep 2020 07:28:37 -0700 IronPort-SDR: 4mKIi3dGcwrEkJm0MkJZm6rL+PLd5pqaYJ1GQEFaWO1EpY98wlwj8hShqxLeMC3lKg+rr3VVCo Eb+szLj6UE7g== X-IronPort-AV: E=Sophos;i="5.77,302,1596524400"; d="scan'208";a="487491988" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.51.38]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 25 Sep 2020 07:28:36 -0700 Date: Fri, 25 Sep 2020 15:28:30 +0100 From: Bruce Richardson To: Lance Richardson Cc: dev@dpdk.org Message-ID: <20200925142830.GC943@bricha3-MOBL.ger.corp.intel.com> References: <20200924163742.321600-1-lance.richardson@broadcom.com> <20200925091341.GB923@bricha3-MOBL.ger.corp.intel.com> <20200925134436.GB943@bricha3-MOBL.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [dpdk-dev] [PATCH] build: support i686 target on x86 64-bit hosts 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 Fri, Sep 25, 2020 at 10:08:35AM -0400, Lance Richardson wrote: > On Fri, Sep 25, 2020 at 9:44 AM Bruce Richardson > wrote: > > > > On Fri, Sep 25, 2020 at 09:27:25AM -0400, Lance Richardson wrote: > > > On Fri, Sep 25, 2020 at 5:13 AM Bruce Richardson > > > wrote: > > > > > > > > On Thu, Sep 24, 2020 at 12:37:42PM -0400, Lance Richardson wrote: > > > > > Add meson cross files for building i686 targets using gcc on x86_64 > > > > > linux hosts. > > > > > > > > > > Uusage example: > > > > > > > > > > meson --cross-file config/x86/cross-i686-linux-gcc build-i686 > > > > > ninja -C build-i686 > > > > > > > > > > Signed-off-by: Lance Richardson > > > > > --- > > > > > Red Hat distros use a different name for the 32-bit pkg-config > > > > > command from most other distros, maybe there is a better way > > > > > to handle this than using separate files. > > > > > > > > > > Others will probably have better naming suggestions for the files. > > > > > > > > > Just to note that rather than using cross-files, building i686 on x86_64 > > > > should be possible by just setting environment variables. > > > > > > > > For example, on Ubuntu 20.04, this works for me: > > > > > > > > PKG_CONFIG_LIBDIR=/usr/lib/i386-linux-gnu/pkgconfig CFLAGS='-m32' LDFLAGS='-m32' meson --werror build-32bit > > > > ninja -C build-32bit/ > > > > > > > > For Fedora or Redhat system the PKG_CONFIG_LIBDIR will be different (I > > > > think just /usr/lib/pkgconfig), but the rest should work identically. > > > > > > > > /Bruce > > > > > > Thanks, that does work, although I'll have some trouble remembering it > > > for future > > > use (unlike using cross-files). Googling for "PKG_CONFIG_LIBDIR meson dpdk" > > > did lead me to this discussion, which makes it sound like cross-files > > > might still > > > worthy of consideration: > > > > > > https://patches.dpdk.org/patch/69067/ > > > > > > > Yes, absolutely the cross-file is worthy of consideration. The most awkward > > part in both cases is getting the 32-bit pkg-config right. > > Agreed, having the distro-specific bits is not pretty. > > Would it be possible to set the pkgconfig binary name or > PKG_CONFIG_LIBDIR in config/x86/meson.build? If so, > maybe we could have a single cross-file and probe for the > distro-specifics in meson.build. Sadly, I'm not aware of any way to do that right now. It probably requires changes in meson itself. :-(