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 AFEB0A00E6 for ; Thu, 13 Jun 2019 16:44:09 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 470781D657; Thu, 13 Jun 2019 16:44:08 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 8E27A1D63C for ; Thu, 13 Jun 2019 16:44:06 +0200 (CEST) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Jun 2019 07:44:05 -0700 X-ExtLoop1: 1 Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.51]) by orsmga008.jf.intel.com with SMTP; 13 Jun 2019 07:44:03 -0700 Received: by (sSMTP sendmail emulation); Thu, 13 Jun 2019 15:44:02 +0100 Date: Thu, 13 Jun 2019 15:44:02 +0100 From: Bruce Richardson To: Neil Horman Cc: dev@dpdk.org, Jerin Jacob Kollanukkaran , Thomas Monjalon Message-ID: <20190613144401.GA479@bricha3-MOBL.ger.corp.intel.com> References: <20190525184346.27932-1-nhorman@tuxdriver.com> <20190613142344.9188-1-nhorman@tuxdriver.com> <20190613142344.9188-3-nhorman@tuxdriver.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190613142344.9188-3-nhorman@tuxdriver.com> User-Agent: Mutt/1.11.4 (2019-03-13) Subject: Re: [dpdk-dev] [PATCH v2 02/10] meson: add BUILDING_RTE_SDK 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" On Thu, Jun 13, 2019 at 10:23:36AM -0400, Neil Horman wrote: > The __rte_internal macro is defined dependent on the value of the build > environment variable BUILDING_RTE_SDK. This variable was set in the > Makefile environment but not the meson environment, so lets reconcile > the two by defining it for meson in the lib and drivers directories, but > not the examples/apps directories, which should be treated as they are > not part of the core DPDK library > > Signed-off-by: Neil Horman > CC: Jerin Jacob Kollanukkaran > CC: Bruce Richardson > CC: Thomas Monjalon > --- > drivers/meson.build | 1 + > lib/meson.build | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/drivers/meson.build b/drivers/meson.build > index 4c444f495..a312277d1 100644 > --- a/drivers/meson.build > +++ b/drivers/meson.build > @@ -23,6 +23,7 @@ endif > > # specify -D_GNU_SOURCE unconditionally > default_cflags += '-D_GNU_SOURCE' > +default_cflags += '-DBUILDING_RTE_SDK' > > foreach class:dpdk_driver_classes > drivers = [] > diff --git a/lib/meson.build b/lib/meson.build > index e067ce5ea..0e398d534 100644 > --- a/lib/meson.build > +++ b/lib/meson.build > @@ -35,6 +35,7 @@ if is_windows > endif > > default_cflags = machine_args > +default_cflags += '-DBUILDING_RTE_SDK' > if cc.has_argument('-Wno-format-truncation') > default_cflags += '-Wno-format-truncation' > endif While this will work, it's not something that individual components should ever need to override so I think using "add_project_arguments()" function is a better way to add this to the C builds. add_project_arguments('-DBUILDING_RTE_SDK', language: 'c') Ref: http://mesonbuild.com/Adding-arguments.html Ref: http://mesonbuild.com/Reference-manual.html#add_project_arguments /Bruce