[dpdk-dev] [PATCH 01/17] build: add initial infrastructure for meson & ninja builds

Bruce Richardson bruce.richardson at intel.com
Tue Sep 12 11:56:03 CEST 2017


On Fri, Sep 08, 2017 at 04:13:58PM +0000, Richardson, Bruce wrote:
> 
> 
> > -----Original Message-----
> > From: Van Haaren, Harry
> > Sent: Friday, September 8, 2017 5:03 PM
> > To: Richardson, Bruce <bruce.richardson at intel.com>; dev at dpdk.org
> > Cc: Richardson, Bruce <bruce.richardson at intel.com>
> > Subject: RE: [dpdk-dev] [PATCH 01/17] build: add initial infrastructure
> > for meson & ninja builds
> > 
> > > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Bruce Richardson
> > > Sent: Friday, September 1, 2017 11:04 AM
> > > To: dev at dpdk.org
> > > Cc: Richardson, Bruce <bruce.richardson at intel.com>
> > > Subject: [dpdk-dev] [PATCH 01/17] build: add initial infrastructure
> > > for meson & ninja builds
> > 
> > <snip commit message etc>
> > 
> > > diff --git a/config/meson.build b/config/meson.build
> > <snip>
> > > +# set the machine type and cflags for it machine =
> > > +get_option('machine') dpdk_conf.set('RTE_MACHINE', machine)
> > > +add_project_arguments('-march=@0@'.format(machine), language: 'c') #
> > > +some libs depend on maths lib add_project_link_arguments('-lm',
> > > +language: 'c')
> > > +
> > > +# add -include rte_config to cflags
> > > +add_project_arguments('-include', 'rte_config.h', language: 'c')
> > > +
> > > +# disable any unwanted warnings
> > > +unwanted_warnings = [
> > > +	'-Wno-address-of-packed-member',
> > > +	'-Wno-format-truncation'
> > > +]
> > 
> > 
> > Feedback from usage while developing new features;
> > - Mis-matched integer sign comparison doesn't cause a warning
> > - And -Werror isn't set by default
> > 
> Will fix the former in V2.
> For the latter, I already have a patch for it that approximates the behavior of the existing system - i.e. a "developer build" setting, which is "off" by default, except when you are building from a git checkout in which case it defaults to "on". However, I don't think I'll include that in V2, as having Werror when we are not reasonably sure we have fixed all warnings in the code for all supported compilers and distros is a bad idea IMHO.
> 
> > Adding these as per below fixes things... but for cleanliness "unwanted
> > warnings" should probably be renamed, we want more warnings! :D
> > 
> > # disable any unwanted warnings
> > unwanted_warnings = [
> > 	'-Werror',
> > 	'-Wno-address-of-packed-member',
> > 	'-Wno-format-truncation',
> > 	'-Wsign-compare',
> > ]
> > 
> Actually, I'd rather keep it as a list of warnings to disable for now. Enabling warnings should be handled differently, as we may only enable specific warnings depending on the build type being done.
> 
On second-thoughts, for V2 I will do as you suggest and add in the extra
warnings '-Wsign-compare' and '-Wcast-qual', to the existing warnings
list. It simplifies the code and we can just split them out later if we
want them only for certain build targets. For now, I don't think that is
needed, so I'll keep it simple.

/Bruce


More information about the dev mailing list