From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 028602BBB for ; Thu, 8 Jun 2017 10:59:06 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP; 08 Jun 2017 01:59:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,314,1493708400"; d="scan'208";a="96998175" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.221.28]) by orsmga002.jf.intel.com with SMTP; 08 Jun 2017 01:59:03 -0700 Received: by (sSMTP sendmail emulation); Thu, 08 Jun 2017 09:59:02 +0100 Date: Thu, 8 Jun 2017 09:59:01 +0100 From: Bruce Richardson To: Stephen Hemminger Cc: dev@dpdk.org Message-ID: <20170608085901.GC58216@bricha3-MOBL3.ger.corp.intel.com> References: <20170607104743.275149-1-bruce.richardson@intel.com> <20170607162617.00d009ff@xeon-e3> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170607162617.00d009ff@xeon-e3> Organization: Intel Research and =?iso-8859-1?Q?De=ACvel?= =?iso-8859-1?Q?opment?= Ireland Ltd. User-Agent: Mutt/1.8.1 (2017-04-11) Subject: Re: [dpdk-dev] [RFC PATCH] replace DPDK config and build system 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: Thu, 08 Jun 2017 08:59:07 -0000 On Wed, Jun 07, 2017 at 04:26:17PM -0700, Stephen Hemminger wrote: > On Wed, 7 Jun 2017 11:47:42 +0100 > Bruce Richardson wrote: > > > The prototype is incomplete, but it does build a reasonable number of our > > libraries, some unit tests, the i40e PMD and the testpmd binary, and I have > > successfully passed traffic using testpmd from the build. Some things are > > not fully correct, e.g. static builds aren't working right now, as I haven't > > correctly done all the dependency tracking, I think, and the cpu flag > > detection has issues. It also has only been tried on x86_64 linux, on a > > couple of systems, so YMMV. However, I feel it's a reasonable enough start > > point to show what we might be able to achieve. > > Remember that in many cases the build system and the target system are different. > One of the problems with previous DPDK builds where build system was on bare metal > but deployment target was on a more limited VM environment. I sweated through > lots of pain on that. Yep, and I'm not going to claim that this is going to solve world hunger here :-) or that switching is going to be easy. However, talking of building and deploying on different targets, meson is designed to allow cross-compilation, see for example the built-in objects for "build_machine", "host_machine" and "target_machine": http://mesonbuild.com/Reference-manual.html#build_machine-object Also, one thing I did add into this prototype was some build argument support to test how that would work. By default, when you run meson, it will set up the cflags to pass in -march=native, much as is done by our default targets now. However, this is easily changed when doing your own builds, for example, to do two different builds in different directories: $ meson native_build ... Checking for value of define "__PCLMUL__": 1 Checking for value of define "__AVX__": 1 Checking for value of define "__AVX2__": 1 ... $ meson -Dmachine=ivybridge ivybridge_build ... Checking for value of define "__PCLMUL__": 1 Checking for value of define "__AVX__": 1 Checking for value of define "__AVX2__": ... This way you can easily set up different builds for different machine targets, with different instruction set levels, as seen from where the second case above did not report AVX2 support. The project-specific options are given in meson_options.txt. See also relevant section in meson docs: http://mesonbuild.com/Build-options.html Regards, /Bruce