From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 087CC2BE1 for ; Fri, 2 Feb 2018 17:18:34 +0100 (CET) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Feb 2018 08:18:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,448,1511856000"; d="scan'208";a="15414740" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.221.77]) by orsmga006.jf.intel.com with SMTP; 02 Feb 2018 08:18:31 -0800 Received: by (sSMTP sendmail emulation); Fri, 02 Feb 2018 16:18:30 +0000 Date: Fri, 2 Feb 2018 16:18:30 +0000 From: Bruce Richardson To: Andrew Rybchenko Cc: dev@dpdk.org, Ivan Malov Message-ID: <20180202161829.GC20444@bricha3-MOBL3.ger.corp.intel.com> References: <1517575438-8609-1-git-send-email-arybchenko@solarflare.com> <1517575438-8609-2-git-send-email-arybchenko@solarflare.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1517575438-8609-2-git-send-email-arybchenko@solarflare.com> Organization: Intel Research and Development Ireland Ltd. User-Agent: Mutt/1.9.1 (2017-09-22) Subject: Re: [dpdk-dev] [PATCH 2/2] net/sfc: add support for meson build 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: Fri, 02 Feb 2018 16:18:35 -0000 On Fri, Feb 02, 2018 at 12:43:58PM +0000, Andrew Rybchenko wrote: > From: Ivan Malov > > Signed-off-by: Ivan Malov > Signed-off-by: Andrew Rybchenko > --- > drivers/net/meson.build | 2 +- > drivers/net/sfc/base/meson.build | 69 ++++++++++++++++++++++++++++++++++++++++ > drivers/net/sfc/meson.build | 61 +++++++++++++++++++++++++++++++++++ > 3 files changed, 131 insertions(+), 1 deletion(-) > create mode 100644 drivers/net/sfc/base/meson.build > create mode 100644 drivers/net/sfc/meson.build Hi, looks pretty good in general. I have a few comments below to improve things. Unfortunately, this will break the ARM builds in it's current form too (or at least it broke the builds using the cross-files that I tested). I think you need to add a check at the top of the driver meson.build file for unsupported architectures, and set "build = false" for those platforms. /Bruce > diff --git a/drivers/net/sfc/meson.build b/drivers/net/sfc/meson.build > new file mode 100644 > index 0000000..b603579 > --- /dev/null > +++ b/drivers/net/sfc/meson.build > @@ -0,0 +1,61 @@ > +# SPDX-License-Identifier: BSD-3-Clause > +# > +# Copyright (c) 2016-2018 Solarflare Communications Inc. > +# All rights reserved. > +# > +# This software was jointly developed between OKTET Labs (under contract > +# for Solarflare) and Solarflare Communications, Inc. > + > +allow_experimental_apis = true > + > +extra_flags = [] > +extra_flags += '-I' + meson.current_source_dir() + '/base' > +extra_flags += '-I' + meson.current_source_dir() The driver's own directory is already set in the include path, so it should not necessary to add it as a cflag. For the base folder, the "includes" variable should be used rather than the cflags one. These two lines should just be replaced by: includes += include_directories('base') You may also need to put "include_directories: includes," into the static_library call in the base folder if you have things being included by base files from the root folder too. > +extra_flags += '-O3' The optimisation level is set for the project as a whole, and should not be overridden in the driver. Otherwise a debug build will not be a debug build for your driver.