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 187F67CC9 for ; Wed, 6 Sep 2017 18:19:16 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Sep 2017 09:19:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,484,1500966000"; d="scan'208";a="308655544" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.221.24]) by fmsmga004.fm.intel.com with SMTP; 06 Sep 2017 09:18:48 -0700 Received: by (sSMTP sendmail emulation); Wed, 06 Sep 2017 17:18:47 +0100 Date: Wed, 6 Sep 2017 17:18:46 +0100 From: Bruce Richardson To: "Van Haaren, Harry" Cc: "dev@dpdk.org" Message-ID: <20170906161846.GA26160@bricha3-MOBL3.ger.corp.intel.com> References: <20170901100416.80264-1-bruce.richardson@intel.com> <20170901100416.80264-2-bruce.richardson@intel.com> <20170904135101.GB22056@bricha3-MOBL3.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170904135101.GB22056@bricha3-MOBL3.ger.corp.intel.com> Organization: Intel Research and =?iso-8859-1?Q?De=ACvel?= =?iso-8859-1?Q?opment?= Ireland Ltd. User-Agent: Mutt/1.8.3 (2017-05-23) Subject: Re: [dpdk-dev] [PATCH 01/17] build: add initial infrastructure for meson & ninja builds 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: Wed, 06 Sep 2017 16:19:17 -0000 On Mon, Sep 04, 2017 at 02:51:01PM +0100, Bruce Richardson wrote: > On Mon, Sep 04, 2017 at 02:36:42PM +0100, Van Haaren, Harry wrote: > > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Bruce > > > Richardson Sent: Friday, September 1, 2017 11:04 AM To: > > > dev@dpdk.org Cc: Richardson, Bruce > > > Subject: [dpdk-dev] [PATCH 01/17] build: add initial > > > infrastructure for meson & ninja builds > > > > > > To build with meson and ninja, we need some initial infrastructure > > > in place. The build files for meson always need to be called > > > "meson.build", and options get placed in meson_options.txt > > > > > > This commit adds a top-level meson.build file, which sets up the > > > global variables for tracking drivers, libraries, etc., and then > > > includes other build files, before finishing by writing the global > > > build configuration header file and a DPDK pkgconfig file at the > > > end, using some of those same globals. > > > > > > From the top level build file, the only include file thus far is > > > for the config folder, which does some other setup of global > > > configuration parameters, including pulling in architecture > > > specific parameters from an architectural subdirectory. A number > > > of configuration build options are provided for the project to > > > tune a number of global variables which will be used later e.g. > > > max numa nodes, max cores, etc. These settings all make their way > > > to the global build config header "rte_build_config.h". There is > > > also a file "rte_config.h", which includes "rte_build_config.h", > > > and this file is meant to hold other build-time values which are > > > present in our current static build configuration but are not > > > normally meant for user-configuration. Ideally, over time, the > > > values placed here should be moved to the individual libraries or > > > drivers which want those values. > > > > > > Signed-off-by: Bruce Richardson > > > > Comments inline below; > > > > > > > > > diff --git a/config/meson.build b/config/meson.build > > > > > +# disable any unwanted warnings +unwanted_warnings = [ + > > > '-Wno-address-of-packed-member', + '-Wno-format-truncation' > > > +] +foreach arg: unwanted_warnings + if cc.has_argument(arg) > > > + add_project_arguments(arg, language: 'c') + endif > > > +endforeach > > > > I can't fault the code here, or Meson, just noting that the > > disabling of these warnings causes prints on GCC 4.8.5 and GCC > > 5.4.0, GCC 7 only prints on -Wno-address-of-packed-member. Clang > > handles it correctly - and no out-of-the-ordinary prints occur. No > > code changes required here. > > > > Strange. Just tested with gcc 4.8.5 and gcc 5.4, and everything worked > as expected, no errors or warnings. > Dug into the invalid flag warnings a bit more and found a number of items in the root cause. First is that gcc only complains about invalid -Wno-* parameters in the case where there is another error or warning being printed. This explains why the warnings are only seen for some files, rather than others. Second is that, because of this meson, is not correctly identifying the relevant flags as unsupported by the compiler. I'm looking to upstream to meson a fix for this. Third is that there are more warnings that need to be disabled for some files when compiled with gcc 5.4. So long as there are no other problems with the code, gcc will never print the errors about the invalid warning disable flags. So, for V2 of this, I hope to fix point 3. /Bruce