[dpdk-dev] [PATCH] test-meson-builds: add a 32-bit build
Bruce Richardson
bruce.richardson at intel.com
Thu Nov 5 18:19:00 CET 2020
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 <bruce.richardson at intel.com>
>
> 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
More information about the dev
mailing list