From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_SBL,URIBL_SBL_A,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 59678C31E49 for ; Wed, 19 Jun 2019 10:46:21 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id EBD24214AF for ; Wed, 19 Jun 2019 10:46:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EBD24214AF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3298C1C2C3; Wed, 19 Jun 2019 12:46:20 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 3482E1C2BD for ; Wed, 19 Jun 2019 12:46:18 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Jun 2019 03:46:17 -0700 X-IronPort-AV: E=Sophos;i="5.63,392,1557212400"; d="scan'208";a="335156088" Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.51]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Jun 2019 03:46:15 -0700 Date: Wed, 19 Jun 2019 11:46:12 +0100 From: Bruce Richardson To: Neil Horman Cc: dev@dpdk.org, Jerin Jacob Kollanukkaran , Thomas Monjalon Message-ID: <20190619104612.GA699@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> <20190613144401.GA479@bricha3-MOBL.ger.corp.intel.com> <20190619103900.GA19712@hmswarspite.think-freely.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190619103900.GA19712@hmswarspite.think-freely.org> 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 Wed, Jun 19, 2019 at 06:39:00AM -0400, Neil Horman wrote: > On Thu, Jun 13, 2019 at 03:44:02PM +0100, Bruce Richardson wrote: > > 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. > > > That sounds like it makes sense to me, but reading the documentation for meson, > I'm not sure I see the behavioral difference. Can you elaborate on how > add_project_arguments behaves differently here? > The end result should be the same. The key differences are: 1. Only ever needs to be set in one place 2. Cannot be overridden by the individual objects in the build. So it's just slightly cleaner. If you prefer your existing approach, I'm ok with that. /Bruce