From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id F1ACA4CC3 for ; Mon, 27 Aug 2018 13:24:18 +0200 (CEST) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Aug 2018 04:24:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,295,1531810800"; d="scan'208";a="258347208" Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.107]) by fmsmga006.fm.intel.com with SMTP; 27 Aug 2018 04:24:15 -0700 Received: by (sSMTP sendmail emulation); Mon, 27 Aug 2018 12:24:12 +0100 Date: Mon, 27 Aug 2018 12:24:11 +0100 From: Bruce Richardson To: Nelio Laranjeiro Cc: dev@dpdk.org, Yongseok Koh , Shahaf Shuler Message-ID: <20180827112411.GA26392@bricha3-MOBL.ger.corp.intel.com> References: <7812af2267017898332783e934bef9478814ae96.1535361299.git.nelio.laranjeiro@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7812af2267017898332783e934bef9478814ae96.1535361299.git.nelio.laranjeiro@6wind.com> Organization: Intel Research and Development Ireland Ltd. User-Agent: Mutt/1.10.1 (2018-07-13) Subject: Re: [dpdk-dev] [PATCH 1/2] build: add extra cflags ldflags to meson option 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: , X-List-Received-Date: Mon, 27 Aug 2018 11:24:19 -0000 On Mon, Aug 27, 2018 at 01:10:52PM +0200, Nelio Laranjeiro wrote: > Almost equivalent to the make system build which uses those options > through environment variables (EXTRA_{CFLAGS,LDFLAGS}). > > Signed-off-by: Nelio Laranjeiro > --- > drivers/meson.build | 2 +- > meson_options.txt | 2 ++ > 2 files changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/meson.build b/drivers/meson.build > index f94e2fe67..008aac62c 100644 > --- a/drivers/meson.build > +++ b/drivers/meson.build > @@ -11,7 +11,7 @@ driver_classes = ['common', > 'event', # depends on common, bus, mempool and net. > 'raw'] # depends on common, bus, mempool, net and event. > > -default_cflags = machine_args > +default_cflags = machine_args + [get_option('extra_cflags'), get_option('extra_ldflags')] > if cc.has_argument('-Wno-format-truncation') > default_cflags += '-Wno-format-truncation' > endif > diff --git a/meson_options.txt b/meson_options.txt > index c84327858..da6373a2c 100644 > --- a/meson_options.txt > +++ b/meson_options.txt > @@ -22,3 +22,5 @@ option('use_hpet', type: 'boolean', value: false, > description: 'use HPET timer in EAL') > option('tests', type: 'boolean', value: true, > description: 'build unit tests') > +option('extra_cflags', type: 'string', description: 'Extra compiler flags') > +option('extra_ldflags', type: 'string', description: 'Extra linker flags') This should not be needed. Meson should pick up CFLAGS and LDFLAGS from the environment without having to add options for them. https://mesonbuild.com/howtox.html#set-extra-compiler-and-linker-flags-from-the-outside-when-eg-building-distro-packages /Bruce