From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 47C16FFA for ; Fri, 8 Sep 2017 10:51:52 +0200 (CEST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP; 08 Sep 2017 01:51:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,360,1500966000"; d="scan'208";a="149597050" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.221.24]) by fmsmga006.fm.intel.com with SMTP; 08 Sep 2017 01:51:49 -0700 Received: by (sSMTP sendmail emulation); Fri, 08 Sep 2017 09:51:48 +0100 Date: Fri, 8 Sep 2017 09:51:48 +0100 From: Bruce Richardson To: Neil Horman Cc: dev@dpdk.org Message-ID: <20170908085147.GB35580@bricha3-MOBL3.ger.corp.intel.com> References: <20170901100416.80264-3-bruce.richardson@intel.com> <20170907162529.GB18344@hmswarspite.think-freely.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170907162529.GB18344@hmswarspite.think-freely.org> 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] [dpdk-dev, 02/17] eal: add eal library to 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, 08 Sep 2017 08:51:53 -0000 On Thu, Sep 07, 2017 at 12:25:29PM -0400, Neil Horman wrote: > On Fri, Sep 01, 2017 at 11:04:01AM +0100, Bruce Richardson wrote: > > Support building the EAL with meson and ninja. This involves a number of > > different meson.build files for iterating through all the different > > subdirectories in the EAL. The library itself will be compiled on build but > > the header files are only copied from their initial location once "ninja > > install" is run. Instead, we use meson dependency tracking to ensure that > > other libraries which use the EAL headers can find them in their original > > locations. > > > > Note: this does not include building kernel modules on either BSD or Linux > > > > Signed-off-by: Bruce Richardson > > Reviewed-by: Harry van Haaren > > --- > > config/rte_config.h | 11 ++++ > > lib/librte_eal/bsdapp/eal/meson.build | 67 ++++++++++++++++++++ > > lib/librte_eal/bsdapp/meson.build | 32 ++++++++++ > > lib/librte_eal/common/arch/meson.build | 33 ++++++++++ > > lib/librte_eal/common/arch/x86/meson.build | 32 ++++++++++ > > lib/librte_eal/common/include/arch/meson.build | 33 ++++++++++ > > lib/librte_eal/common/include/arch/x86/meson.build | 48 +++++++++++++++ > > lib/librte_eal/common/include/meson.build | 71 +++++++++++++++++++++ > > lib/librte_eal/common/meson.build | 71 +++++++++++++++++++++ > > lib/librte_eal/linuxapp/eal/meson.build | 72 ++++++++++++++++++++++ > > lib/librte_eal/linuxapp/meson.build | 32 ++++++++++ > > lib/librte_eal/meson.build | 44 +++++++++++++ > > lib/meson.build | 32 ++++++++++ > > meson.build | 3 +- > > 14 files changed, 580 insertions(+), 1 deletion(-) > > create mode 100644 lib/librte_eal/bsdapp/eal/meson.build > > create mode 100644 lib/librte_eal/bsdapp/meson.build > > create mode 100644 lib/librte_eal/common/arch/meson.build > > create mode 100644 lib/librte_eal/common/arch/x86/meson.build > > create mode 100644 lib/librte_eal/common/include/arch/meson.build > > create mode 100644 lib/librte_eal/common/include/arch/x86/meson.build > > create mode 100644 lib/librte_eal/common/include/meson.build > > create mode 100644 lib/librte_eal/common/meson.build > > create mode 100644 lib/librte_eal/linuxapp/eal/meson.build > > create mode 100644 lib/librte_eal/linuxapp/meson.build > > create mode 100644 lib/librte_eal/meson.build > > create mode 100644 lib/meson.build > > > > diff --git a/config/rte_config.h b/config/rte_config.h > > index 79b0db90f..252b087ad 100644 > > --- a/config/rte_config.h > > +++ b/config/rte_config.h > > @@ -47,4 +47,15 @@ > > > > #include > > > > +/****** library defines ********/ > > + > > +/* EAL defines */ > > +#define RTE_MAX_MEMSEG 512 > > +#define RTE_MAX_MEMZONE 2560 > > +#define RTE_MAX_TAILQ 32 > > +#define RTE_LOG_LEVEL RTE_LOG_INFO > > +#define RTE_LOG_DP_LEVEL RTE_LOG_INFO > > +#define RTE_BACKTRACE 1 > > +#define RTE_EAL_VFIO 1 > > + > > #endif /* _RTE_CONFIG_H_ */ > > diff --git a/lib/librte_eal/bsdapp/eal/meson.build b/lib/librte_eal/bsdapp/eal/meson.build > > new file mode 100644 > > index 000000000..bc9c3f0cb > > --- /dev/null > > +++ b/lib/librte_eal/bsdapp/eal/meson.build > > @@ -0,0 +1,67 @@ > > +# BSD LICENSE > > +# > > +# Copyright(c) 2017 Intel Corporation. All rights reserved. > > +# All rights reserved. > > +# > > +# Redistribution and use in source and binary forms, with or without > > +# modification, are permitted provided that the following conditions > > +# are met: > > +# > > +# * Redistributions of source code must retain the above copyright > > +# notice, this list of conditions and the following disclaimer. > > +# * Redistributions in binary form must reproduce the above copyright > > +# notice, this list of conditions and the following disclaimer in > > +# the documentation and/or other materials provided with the > > +# distribution. > > +# * Neither the name of Intel Corporation nor the names of its > > +# contributors may be used to endorse or promote products derived > > +# from this software without specific prior written permission. > > +# > > +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS > > +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT > > +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR > > +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT > > +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, > > +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT > > +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, > > +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY > > +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT > > +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE > > +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > > + > > +eal_inc += include_directories('include') > > +install_subdir('include/exec-env', install_dir: 'include') > > + > > +sources = ['eal_alarm.c', > > + 'eal_debug.c', > > + 'eal_hugepage_info.c', > > + 'eal_interrupts.c', > > + 'eal_lcore.c', > > + 'eal_thread.c', > > + 'eal_timer.c', > > + 'eal.c', > > + 'eal_memory.c', > > + 'eal_pci.c', > > +] > > + > > +eal_extra_link_arg = '-lexecinfo' > > + > > +version_map = join_paths(meson.current_source_dir(), 'rte_eal_version.map') > Odd quesion, only for my own education. Does the version map get treated as a > dependency here? That is to say, if I update it, does the assocated library get > rebuilt? The current build system missed this, and it would be nice if it got > included in the new one. > That should be the case, as it explicitly called out as link dependency in the library call below. > > +eal_lib = library('rte_eal', sources, eal_common_sources, eal_common_arch_sources, > > + dependencies: dependency('threads'), > > + include_directories : eal_inc, > > + version: '@0@.1'.format(version), > > + c_args: '-D_GNU_SOURCE', > > + link_depends: version_map, > > + link_args: [eal_extra_link_arg, > > + '-Wl,--version-script=' + version_map], > > + install: true > > +) > > + > > > Neil >