From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58]) by dpdk.org (Postfix) with ESMTP id 1293F1B53 for ; Thu, 7 Sep 2017 18:25:37 +0200 (CEST) Received: from [2606:a000:111b:41f4:2201:d2d7:1fb:4ffb] (helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1dpzcQ-0000cH-0e; Thu, 07 Sep 2017 12:25:35 -0400 Date: Thu, 7 Sep 2017 12:25:29 -0400 From: Neil Horman To: Bruce Richardson Cc: dev@dpdk.org Message-ID: <20170907162529.GB18344@hmswarspite.think-freely.org> References: <20170901100416.80264-3-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170901100416.80264-3-bruce.richardson@intel.com> User-Agent: Mutt/1.8.3 (2017-05-23) X-Spam-Score: -2.9 (--) X-Spam-Status: No 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: Thu, 07 Sep 2017 16:25:37 -0000 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. > +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