From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 1AC951B19F for ; Tue, 12 Sep 2017 13:30:15 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Sep 2017 04:30:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,382,1500966000"; d="scan'208";a="1194186194" Received: from silpixa00399126.ir.intel.com (HELO silpixa00399126.ger.corp.intel.com) ([10.237.223.223]) by fmsmga001.fm.intel.com with ESMTP; 12 Sep 2017 04:30:14 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: nhorman@tuxdriver.com, luca.boccassi@gmail.com, harry.van.haaren@intel.com, Bruce Richardson Date: Tue, 12 Sep 2017 11:38:08 +0100 Message-Id: <20170912103809.140473-17-bruce.richardson@intel.com> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170912103809.140473-1-bruce.richardson@intel.com> References: <20170901100416.80264-1-bruce.richardson@intel.com> <20170912103809.140473-1-bruce.richardson@intel.com> Subject: [dpdk-dev] [PATCH v2 16/17] build: add option to version libs using DPDK version 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: Tue, 12 Sep 2017 11:30:16 -0000 Normally, each library has it's own version number based on the ABI. Add an option to have all libs just use the DPDK version number as the .so version. Signed-off-by: Bruce Richardson Reviewed-by: Harry van Haaren --- drivers/meson.build | 8 +++++++- lib/meson.build | 8 +++++++- meson_options.txt | 1 + 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/drivers/meson.build b/drivers/meson.build index f19da16fb..0c251bd61 100644 --- a/drivers/meson.build +++ b/drivers/meson.build @@ -92,6 +92,12 @@ foreach class:driver_classes depends: [pmdinfogen, tmp_lib]) endforeach + if get_option('per_library_versions') + so_version = '@0@.1'.format(version) + else + so_version = meson.project_version() + endif + # now build the driver itself, and add to the drivers list lib_name = driver_name_fmt.format(name) version_map = '@0@/@1@/@2@_version.map'.format( @@ -105,7 +111,7 @@ foreach class:driver_classes c_args: cflags, link_args: '-Wl,--version-script=' + version_map, link_depends: version_map, - version: '@0@.1'.format(version), + version: so_version, install: true, install_dir: driver_install_path) diff --git a/lib/meson.build b/lib/meson.build index d814721de..36652cfe1 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -76,6 +76,12 @@ foreach l:libraries dep_objs += [get_variable('dep_rte_' + d)] endforeach + if get_option('per_library_versions') + so_version = '@0@.1'.format(version) + else + so_version = meson.project_version() + endif + version_map = '@0@/@1@/rte_@2@_version.map'.format( meson.current_source_dir(), dir_name, name) libname = 'rte_' + name @@ -87,7 +93,7 @@ foreach l:libraries include_directories: include_directories(dir_name), link_args: '-Wl,--version-script=' + version_map, link_depends: version_map, - version: '@0@.1'.format(version), + version: so_version, install: true) dep = declare_dependency(link_with: lib, include_directories: include_directories(dir_name), diff --git a/meson_options.txt b/meson_options.txt index 9c45b8159..636226ce8 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -6,3 +6,4 @@ option('allow_invalid_socket_id', type: 'boolean', value: false, description: 'allow out-of-range NUMA socket id\'s for platforms that don\'t report the value correctly') option('enable_kmods', type: 'boolean', value: true, description: 'build kernel modules') option('kernel_dir', type: 'string', value: '', description: 'path to the kernel for building kernel modules') +option('per_library_versions', type: 'boolean', value: true, description: 'true: each lib gets its own version number, false: DPDK version used for each lib') -- 2.13.5