From patchwork Mon Aug 14 09:51:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 27556 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 7CC6A99E8; Mon, 14 Aug 2017 12:04:08 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 18E4C996A for ; Mon, 14 Aug 2017 12:03:33 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Aug 2017 03:03:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,372,1498546800"; d="scan'208";a="118723818" Received: from silpixa00399126.ir.intel.com (HELO silpixa00399126.ger.corp.intel.com) ([10.237.223.223]) by orsmga004.jf.intel.com with ESMTP; 14 Aug 2017 03:03:32 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: thomas@monjalon.net, Bruce Richardson Date: Mon, 14 Aug 2017 10:51:49 +0100 Message-Id: <20170814095208.166496-22-bruce.richardson@intel.com> X-Mailer: git-send-email 2.13.4 In-Reply-To: <20170814095208.166496-1-bruce.richardson@intel.com> References: <20170814095208.166496-1-bruce.richardson@intel.com> Subject: [dpdk-dev] [RFCv2 21/40] eal: add version information 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Signed-off-by: Bruce Richardson --- lib/librte_eal/bsdapp/eal/meson.build | 6 +++++- lib/librte_eal/linuxapp/eal/meson.build | 6 +++++- lib/librte_eal/meson.build | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/librte_eal/bsdapp/eal/meson.build b/lib/librte_eal/bsdapp/eal/meson.build index ff2c2fee8..6c5f5e93d 100644 --- a/lib/librte_eal/bsdapp/eal/meson.build +++ b/lib/librte_eal/bsdapp/eal/meson.build @@ -44,11 +44,15 @@ sources = ['eal_alarm.c', 'eal_pci.c', ] +version_map = join_paths(meson.current_source_dir(), 'rte_eal_version.map') 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_args: '-lexecinfo', + link_depends: version_map, + link_args: ['-lexecinfo', + '-Wl,--version-script=' + version_map], install: true ) diff --git a/lib/librte_eal/linuxapp/eal/meson.build b/lib/librte_eal/linuxapp/eal/meson.build index d290ae65e..57bb5d52d 100644 --- a/lib/librte_eal/linuxapp/eal/meson.build +++ b/lib/librte_eal/linuxapp/eal/meson.build @@ -49,11 +49,15 @@ sources = ['eal_alarm.c', 'eal_pci.c', ] +version_map = join_paths(meson.current_source_dir(), 'rte_eal_version.map') 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_args: '-ldl', + link_depends: version_map, + link_args: ['-ldl', + '-Wl,--version-script=' + version_map], install: true ) diff --git a/lib/librte_eal/meson.build b/lib/librte_eal/meson.build index dec6baedd..1b2556121 100644 --- a/lib/librte_eal/meson.build +++ b/lib/librte_eal/meson.build @@ -29,6 +29,7 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +version = 4 # the version of the EAL API eal_inc = [global_inc] subdir('common')