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 B439FA04C0; Fri, 25 Sep 2020 16:48:41 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 08CE71E985; Fri, 25 Sep 2020 16:48:40 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 2A8521E88C for ; Fri, 25 Sep 2020 16:48:37 +0200 (CEST) IronPort-SDR: DyuLZ9BAIN5BA+VCyH8/yhSi1eX9onFI1vQv5+yoVKbCd1XzLakeMn3+x3nR1UJaVqsSRx4kD9 yjTOmRhTyQ0w== X-IronPort-AV: E=McAfee;i="6000,8403,9755"; a="158899380" X-IronPort-AV: E=Sophos;i="5.77,302,1596524400"; d="scan'208";a="158899380" 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:48:35 -0700 IronPort-SDR: zeXJ0TuMkfKlxA+1iyYPCOmW0PTs87K2li0uLkgw1jm0BVAza9txuQgm63mf0Zb5Uty1q+NpfZ NYcxvB/suYQA== X-IronPort-AV: E=Sophos;i="5.77,302,1596524400"; d="scan'208";a="487497414" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.252.10.211]) ([10.252.10.211]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Sep 2020 07:48:33 -0700 To: Bruce Richardson , Lance Richardson Cc: dev@dpdk.org References: <20200924163742.321600-1-lance.richardson@broadcom.com> <20200925091341.GB923@bricha3-MOBL.ger.corp.intel.com> <20200925134436.GB943@bricha3-MOBL.ger.corp.intel.com> <20200925142830.GC943@bricha3-MOBL.ger.corp.intel.com> From: Ferruh Yigit Message-ID: Date: Fri, 25 Sep 2020 15:48:30 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.2.2 MIME-Version: 1.0 In-Reply-To: <20200925142830.GC943@bricha3-MOBL.ger.corp.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit 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 9/25/2020 3:28 PM, Bruce Richardson wrote: > 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. :-( > I did hit similar thing with arm cross compile recently, the values provided in the 'config/arm/arm64_armv8_linux_gcc' doesn't match with the cross compiler I installed, so had to update it manually. Not sure if it is possible to cover all options, or should we add a config file to cover each case, perhaps we can document it and go with common values.