From patchwork Tue Oct 8 14:36:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 60702 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 666581D427; Tue, 8 Oct 2019 16:36:45 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 928B73256 for ; Tue, 8 Oct 2019 16:36:42 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Oct 2019 07:36:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,270,1566889200"; d="scan'208";a="193394072" Received: from silpixa00399126.ir.intel.com (HELO silpixa00399126.ger.corp.intel.com) ([10.237.223.2]) by fmsmga007.fm.intel.com with ESMTP; 08 Oct 2019 07:36:37 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: thomas@monjalon.net, Neil Horman , bluca@debian.org, ray.kinsella@intel.com, Bruce Richardson Date: Tue, 8 Oct 2019 15:36:26 +0100 Message-Id: <20191008143628.46054-2-bruce.richardson@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191008143628.46054-1-bruce.richardson@intel.com> References: <20191008143628.46054-1-bruce.richardson@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH 1/3] check-experimental-syms: remove use of environmental var 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" The check-experimental-syms.sh script was finding the map-list-symbol.sh script using $RTE_SDK, which is the variable set when using the "make" build system. To make this script more independent, we just use the current path of the script as the location to find its companion script. Signed-off-by: Bruce Richardson --- buildtools/check-experimental-syms.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildtools/check-experimental-syms.sh b/buildtools/check-experimental-syms.sh index 0f6c62dbe..a95de33b1 100755 --- a/buildtools/check-experimental-syms.sh +++ b/buildtools/check-experimental-syms.sh @@ -5,7 +5,7 @@ MAPFILE=$1 OBJFILE=$2 -LIST_SYMBOL=$RTE_SDK/buildtools/map-list-symbol.sh +LIST_SYMBOL=$(dirname $(readlink -f $0))/map-list-symbol.sh # added check for "make -C test/" usage if [ ! -e $MAPFILE ] || [ ! -f $OBJFILE ] From patchwork Tue Oct 8 14:36:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 60703 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 794701D444; Tue, 8 Oct 2019 16:36:47 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id EB2531D414 for ; Tue, 8 Oct 2019 16:36:42 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Oct 2019 07:36:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,270,1566889200"; d="scan'208";a="193394087" Received: from silpixa00399126.ir.intel.com (HELO silpixa00399126.ger.corp.intel.com) ([10.237.223.2]) by fmsmga007.fm.intel.com with ESMTP; 08 Oct 2019 07:36:40 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: thomas@monjalon.net, Neil Horman , bluca@debian.org, ray.kinsella@intel.com, Bruce Richardson Date: Tue, 8 Oct 2019 15:36:27 +0100 Message-Id: <20191008143628.46054-3-bruce.richardson@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191008143628.46054-1-bruce.richardson@intel.com> References: <20191008143628.46054-1-bruce.richardson@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH 2/3] lib: add experimental symbols check 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" Call check-experimental-syms.sh script as part of the meson build to ensure that all functions are correctly tagged. Signed-off-by: Bruce Richardson --- buildtools/meson.build | 2 ++ lib/meson.build | 12 +++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/buildtools/meson.build b/buildtools/meson.build index 32c79c130..8d0b9e0cd 100644 --- a/buildtools/meson.build +++ b/buildtools/meson.build @@ -5,6 +5,8 @@ subdir('pmdinfogen') pmdinfo = find_program('gen-pmdinfo-cfile.sh') +check_experimental_syms = find_program('check-experimental-syms.sh') + # set up map-to-def script using python, either built-in or external python3 = import('python').find_installation(required: false) if python3.found() diff --git a/lib/meson.build b/lib/meson.build index e5ff83893..5be5c8559 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -128,11 +128,21 @@ foreach l:libraries command: [map_to_def_cmd, '@INPUT@', '@OUTPUT@'], input: version_map, output: 'rte_@0@_exports.def'.format(name)) + lk_deps = [version_map, def_file] if is_windows lk_args = ['-Wl,/def:' + def_file.full_path(), '-Wl,/implib:lib\\' + implib] else lk_args = ['-Wl,--version-script=' + version_map] + # on unix systems check the output of the + # experimental syms script, using it as a + # dependency of the .so build + lk_deps += custom_target(name + '.exp_chk', + command: [check_experimental_syms, + version_map, '@INPUT@'], + capture: true, + input: static_lib, + output: name + '.exp_chk') endif shared_lib = shared_library(libname, @@ -142,7 +152,7 @@ foreach l:libraries dependencies: shared_deps, include_directories: includes, link_args: lk_args, - link_depends: [version_map, def_file], + link_depends: lk_deps, version: lib_version, soversion: so_version, install: true) From patchwork Tue Oct 8 14:36:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 60704 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 34F3C1D44B; Tue, 8 Oct 2019 16:36:49 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id B803C1D424 for ; Tue, 8 Oct 2019 16:36:44 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Oct 2019 07:36:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,270,1566889200"; d="scan'208";a="193394098" Received: from silpixa00399126.ir.intel.com (HELO silpixa00399126.ger.corp.intel.com) ([10.237.223.2]) by fmsmga007.fm.intel.com with ESMTP; 08 Oct 2019 07:36:42 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: thomas@monjalon.net, Neil Horman , bluca@debian.org, ray.kinsella@intel.com, Bruce Richardson Date: Tue, 8 Oct 2019 15:36:28 +0100 Message-Id: <20191008143628.46054-4-bruce.richardson@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191008143628.46054-1-bruce.richardson@intel.com> References: <20191008143628.46054-1-bruce.richardson@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH 3/3] drivers: process shared lib link dependencies as for libs 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" For the public APIs of DPDK libraries we run checks for correct use of experimental tags, and also do dynamic generation of the version file to its window's equivalent. Although must drivers don't export APIs, some do, so these checks are relevant and should be copied from lib/meson.build to drivers/meson.build. Signed-off-by: Bruce Richardson --- drivers/meson.build | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/drivers/meson.build b/drivers/meson.build index 2ed2e9541..fd5a8aa59 100644 --- a/drivers/meson.build +++ b/drivers/meson.build @@ -131,14 +131,37 @@ foreach class:dpdk_driver_classes version_map = '@0@/@1@/@2@_version.map'.format( meson.current_source_dir(), drv_path, lib_name) + implib = dir_name + '.dll.a' + + def_file = custom_target(lib_name + '_def', + command: [map_to_def_cmd, '@INPUT@', '@OUTPUT@'], + input: version_map, + output: '@0@_exports.def'.format(lib_name)) + lk_deps = [version_map, def_file] + if is_windows + lk_args = ['-Wl,/def:' + def_file.full_path(), + '-Wl,/implib:lib\\' + implib] + else + lk_args = ['-Wl,--version-script=' + version_map] + # on unix systems check the output of the + # experimental syms script, using it as a + # dependency of the .so build + lk_deps += custom_target(lib_name + '.exp_chk', + command: [check_experimental_syms, + version_map, '@INPUT@'], + capture: true, + input: static_lib, + output: lib_name + '.exp_chk') + endif + shared_lib = shared_library(lib_name, sources, objects: objs, include_directories: includes, dependencies: shared_objs, c_args: cflags, - link_args: '-Wl,--version-script=' + version_map, - link_depends: version_map, + link_args: lk_args, + link_depends: lk_deps, version: lib_version, soversion: so_version, install: true,