From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 7695DA00E6 for ; Tue, 14 May 2019 15:19:46 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6569ED18D; Tue, 14 May 2019 15:19:45 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id C310C5F34 for ; Tue, 14 May 2019 15:19:42 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 May 2019 06:19:41 -0700 X-ExtLoop1: 1 Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.96]) by orsmga002.jf.intel.com with SMTP; 14 May 2019 06:19:38 -0700 Received: by (sSMTP sendmail emulation); Tue, 14 May 2019 14:19:38 +0100 Date: Tue, 14 May 2019 14:19:38 +0100 From: Bruce Richardson To: "Smoczynski, MarcinX" Cc: "thomas@monjalon.net" , "dev@dpdk.org" , "Ananyev, Konstantin" , "adrien.mazarguil@6wind.com" Message-ID: <20190514131938.GC600@bricha3-MOBL.ger.corp.intel.com> References: <20190514114354.16212-1-marcinx.smoczynski@intel.com> <20190514122007.GA600@bricha3-MOBL.ger.corp.intel.com> <2F25558C1648FA498380EAC12A86126251FF08@HASMSX110.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline In-Reply-To: <2F25558C1648FA498380EAC12A86126251FF08@HASMSX110.ger.corp.intel.com> User-Agent: Mutt/1.11.4 (2019-03-13) Subject: Re: [dpdk-dev] [PATCH] build: enable BSD features visibility for FreeBSD X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190514131938.vJcJCeBBCSF2uz0azd-1wnobBnuvcfuk9fWMfDzBFvA@z> On Tue, May 14, 2019 at 02:15:04PM +0100, Smoczynski, MarcinX wrote: > > > > -----Original Message----- > > From: Richardson, Bruce > > Sent: Tuesday, May 14, 2019 2:20 PM > > To: Smoczynski, MarcinX > > Cc: thomas@monjalon.net; dev@dpdk.org; Ananyev, Konstantin > > ; 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 > > > --- > > > 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. > If it's being added everywhere then that seems best, yes.