DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: Paul Szczepanek <paul.szczepanek@arm.com>,
	thomas@monjalon.net, dev@dpdk.org
Subject: Re: [RFC v1 1/1] devtools: allow libraries with no global section
Date: Wed, 6 Mar 2024 17:51:59 +0100	[thread overview]
Message-ID: <CAJFAV8zCXqh9Gh5m2_tUhQ69tnTBKbLjmk=A+ttB=MO=vLi7fA@mail.gmail.com> (raw)
In-Reply-To: <ZeicTOaQURfVXlQx@bricha3-mobl1.ger.corp.intel.com>

On Wed, Mar 6, 2024 at 5:40 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> On Wed, Mar 06, 2024 at 05:14:15PM +0100, David Marchand wrote:
> > On Wed, Mar 6, 2024 at 3:36 PM Paul Szczepanek <paul.szczepanek@arm.com> wrote:
> > >
> > > If a library has no global section in the version.map
> > > allow it not to have symbols and not report it as an error.
> > > This happens if a library doesn't export any functions
> > > if they're all inline.
> > >
> > > Signed-off-by: Paul Szczepanek <paul.szczepanek@arm.com>
> >
> > Added Bruce.
> >
> > Having a library without any actual code compiled is (I think) new in DPDK.
> >
> > On the other hand, for headers only, there should be no need for a
> > version.map file at all.
> >
> > The current meson code expects that every library provides some files
> > to compile via the sources variable and it expects a version.map file
> > too.
> > I wonder if we could skip the whole library generation at the
> > lib/meson.build level.
> > Something like:
> >
> > diff --git a/lib/meson.build b/lib/meson.build
> > index 179a272932..f0bbab6658 100644
> > --- a/lib/meson.build
> > +++ b/lib/meson.build
> > @@ -222,6 +222,10 @@ foreach l:libraries
> >      includes += include_directories(l)
> >      dpdk_includes += include_directories(l)
> >
> > +    if sources.length() == 0
> > +        continue
> > +    endif
> > +
> >      if developer_mode and is_windows and use_function_versioning
> >          message('@0@: Function versioning is not supported by
> > Windows.'.format(name))
> >      endif
> >
> > No version.map, no check to update :-)
> >
> Two thoughts/suggestions here:
>
> * in original meson port we did have support for header only libraries - I
>   think for rte_compat.h, but that was done away with when the header was
>   just merged into EAL. See [1]
> * for a header only lib - if we are prepared to forego being able to
>   disable it - the easiest enablement path may be to not add the directory
>   to the list of libraries, and just add the header file path to the global
>   include path, or perhaps some other library include path. How to make it
>   work best may depend on what the library does and what other DPDK libs, if
>   any, it depends upon.

If the goal is to provide those headers as public API, you still need
to call install_headers() somewhere.
And I don't like losing control over disabling about what is shipped.

I prefer [1].


-- 
David Marchand


  reply	other threads:[~2024-03-06 16:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-06 14:35 [RFC v1 0/1] allow header only libraries Paul Szczepanek
2024-03-06 14:35 ` [RFC v1 1/1] devtools: allow libraries with no global section Paul Szczepanek
2024-03-06 16:14   ` David Marchand
2024-03-06 16:39     ` Bruce Richardson
2024-03-06 16:51       ` David Marchand [this message]
2024-03-06 22:23         ` Paul Szczepanek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJFAV8zCXqh9Gh5m2_tUhQ69tnTBKbLjmk=A+ttB=MO=vLi7fA@mail.gmail.com' \
    --to=david.marchand@redhat.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=paul.szczepanek@arm.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).