[PATCH v4] build: update DPDK to use C11 standard
David Marchand
david.marchand at redhat.com
Tue Aug 1 15:34:03 CEST 2023
On Tue, Aug 1, 2023 at 3:29 PM Bruce Richardson
<bruce.richardson at intel.com> wrote:
>
> On Tue, Aug 01, 2023 at 03:24:19PM +0200, David Marchand wrote:
> > On Tue, Aug 1, 2023 at 3:16 PM Bruce Richardson
> > <bruce.richardson at intel.com> wrote:
> > >
> > > As previously announced, DPDK 23.11 will require a C11 supporting
> > > compiler and will use the C11 standard in all builds.
> > >
> > > Forcing use of the C standard, rather than the standard with
> > > GNU extensions, means that some posix definitions which are not in
> > > the C standard are unavailable by default. We fix this by ensuring
> > > the correct defines or cflags are passed to the components that
> > > need them.
> > >
> > > Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
> > > Acked-by: Morten Brørup <mb at smartsharesystems.com>
> > > Acked-by: Tyler Retzlaff <roretzla at linux.microsoft.com>
> > > ---
> > > V4:
> > > * pass cflags to the structure and definition checks in mlx* drivers
> > > to ensure posix definitions - as well as C-standard ones - are
> > > available.
> >
> > With this v4, mlx4 builds fine in my Ubuntu 20.04.6 container.
> > However, I think the mlx4dv.h includes are probably faulty: as this
> > header is using off_t, it should include sys/types.h in the first
> > place.
> > https://github.com/linux-rdma/rdma-core/blob/master/providers/mlx4/mlx4dv.h#L36
> >
> > This had been fixed in the mlx5 header in some rdma-core change in the
> > past: https://github.com/linux-rdma/rdma-core/commit/d2389b34ccc5
> >
> Even if that were fixed, I still think the correct behaviour in our build
> here is to test the structures using the same flags as will be used to
> build the final lib.
Yes, compiling for testing and using the structures must be aligned.
--
David Marchand
More information about the dev
mailing list