DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Smoczynski, MarcinX" <marcinx.smoczynski@intel.com>
To: "Richardson, Bruce" <bruce.richardson@intel.com>
Cc: "thomas@monjalon.net" <thomas@monjalon.net>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
	"adrien.mazarguil@6wind.com" <adrien.mazarguil@6wind.com>
Subject: Re: [dpdk-dev] [PATCH] build: enable BSD features visibility for FreeBSD
Date: Tue, 14 May 2019 13:15:04 +0000	[thread overview]
Message-ID: <2F25558C1648FA498380EAC12A86126251FF08@HASMSX110.ger.corp.intel.com> (raw)
Message-ID: <20190514131504.hKsf44Pho0NbeZWnqAeCd9y6ZWqK3fleS-DRss97bpU@z> (raw)
In-Reply-To: <20190514122007.GA600@bricha3-MOBL.ger.corp.intel.com>



> -----Original Message-----
> From: Richardson, Bruce
> Sent: Tuesday, May 14, 2019 2:20 PM
> To: Smoczynski, MarcinX <marcinx.smoczynski@intel.com>
> Cc: thomas@monjalon.net; dev@dpdk.org; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>; adrien.mazarguil@6wind.com
> Subject: Re: [PATCH] build: enable BSD features visibility for FreeBSD
> 
> On Tue, May 14, 2019 at 01:43:54PM +0200, Marcin Smoczynski wrote:
> > When a component uses either XOPEN_SOURCE or POSIX_C_SOURCE
> macro
> > explicitly in its build recipe, it restricts visibility of a non POSIX
> > features subset, such as IANA protocol numbers (IPPROTO_* macros).
> > Non standard features are enabled by default for DPDK both for Linux
> > thanks to _GNU_SOURCE and for FreeBSD thanks to __BSD_VISIBLE.
> However
> > using XOPEN_SOURCE or POSIX_(C_)SOURCE in a component causes
> > __BSD_VISIBLE to be defined to 0 for FreeBSD, causing different
> > feature sets visibility for Linux and FreeBSD. It restricts from using
> > IPPROTO macros in public headers, such as rte_ip.h, despite the fact
> > they are already widely used in sources.
> >
> > Add __BSD_VISIBLE macro specified unconditionally for FreeBSD targets
> > which enforces feature sets visibility unification between Linux and
> > FreeBSD.
> >
> > This patch solves the problem of build breaks for [1] on FreeBSD [2]
> > following the discussion [3].
> >
> > [1] https://mails.dpdk.org/archives/dev/2019-May/131885.html
> > [2] http://mails.dpdk.org/archives/test-report/2019-May/082263.html
> > [3] https://mails.dpdk.org/archives/dev/2019-May/132110.html
> >
> > Signed-off-by: Marcin Smoczynski <marcinx.smoczynski@intel.com>
> > ---
> >  app/meson.build               | 5 +++++
> >  drivers/meson.build           | 5 +++++
> >  examples/meson.build          | 5 +++++
> >  lib/meson.build               | 5 +++++
> >  mk/target/generic/rte.vars.mk | 5 +++++
> >  5 files changed, 25 insertions(+)
> >
> Rather than adding this in 4 places to the meson build, would it break
> anything to just add it using add_project_arguments() in
> config/meson.build?

Sounds good to me. I was following the way -D_GNU_SOURCE was added.
Should I move -D_GNU_SOURCE to config/meson.build too? It looks like
it is the same situation as it is with __BSD_VISIBLE.

> 
> Also, does this flag need to be used by external apps when compiling against
> DPDK headers? If so, we need to add this to the pkg-config file for DPDK on
> BSD.

Lack of this flag may break external applications builds for FreeBSD depending
of other feature flags they use. I'll add it then to the pc file.

Marcin

  parent reply	other threads:[~2019-05-14 13:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-14 11:43 Marcin Smoczynski
2019-05-14 11:43 ` Marcin Smoczynski
2019-05-14 11:49 ` Adrien Mazarguil
2019-05-14 11:49   ` Adrien Mazarguil
2019-05-14 12:20 ` Bruce Richardson
2019-05-14 12:20   ` Bruce Richardson
2019-05-14 13:15   ` Smoczynski, MarcinX [this message]
2019-05-14 13:15     ` Smoczynski, MarcinX
2019-05-14 13:19     ` Bruce Richardson
2019-05-14 13:19       ` Bruce Richardson

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=2F25558C1648FA498380EAC12A86126251FF08@HASMSX110.ger.corp.intel.com \
    --to=marcinx.smoczynski@intel.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.ananyev@intel.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).