[dpdk-dev] [PATCH] build: support i686 target on x86 64-bit hosts

Bruce Richardson bruce.richardson at intel.com
Fri Sep 25 16:28:30 CEST 2020


On Fri, Sep 25, 2020 at 10:08:35AM -0400, Lance Richardson wrote:
> On Fri, Sep 25, 2020 at 9:44 AM Bruce Richardson
> <bruce.richardson at intel.com> 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
> > > <bruce.richardson at intel.com> 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 <lance.richardson at broadcom.com>
> > > > > ---
> > > > > 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. :-(


More information about the dev mailing list