From: Dariusz Sosnowski <dsosnowski@nvidia.com>
To: David Marchand <david.marchand@redhat.com>,
Bruce Richardson <bruce.richardson@intel.com>
Cc: <dev@dpdk.org>, Yu Jiang <yux.jiang@intel.com>
Subject: [PATCH v4 2/4] build: support function versioning for drivers
Date: Thu, 25 Jun 2026 18:06:41 +0200 [thread overview]
Message-ID: <20260625160645.1341914-3-dsosnowski@nvidia.com> (raw)
In-Reply-To: <20260625160645.1341914-1-dsosnowski@nvidia.com>
Add support for enabling function versioning
(through use_function_versioning meson variable) for drivers,
similar to libraries.
Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
drivers/meson.build | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/drivers/meson.build b/drivers/meson.build
index 4d95604ecd..79c215a7c8 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -171,6 +171,7 @@ foreach subpath:subdirs
pkgconfig_extra_libs = []
testpmd_sources = []
require_iova_in_mbuf = true
+ use_function_versioning = false
# for handling base code files which may need extra cflags
base_sources = []
base_cflags = []
@@ -273,6 +274,13 @@ foreach subpath:subdirs
endif
dpdk_conf.set(lib_name.to_upper(), 1)
+ if developer_mode and is_windows and use_function_versioning
+ message('@0@: Function versioning is not supported by Windows.'.format(name))
+ endif
+ if use_function_versioning
+ cflags += '-DRTE_USE_FUNCTION_VERSIONING'
+ endif
+
dpdk_extra_ldflags += pkgconfig_extra_libs
dpdk_headers += headers
@@ -363,7 +371,18 @@ foreach subpath:subdirs
depends: [version_map])
endif
- shared_lib = shared_library(lib_name, sources_pmd_info,
+ if not use_function_versioning or is_windows
+ # Use pre-built objects and pmdinfo sources to build shared library.
+ shared_sources = [sources_pmd_info]
+ else
+ # For compat we need to rebuild with RTE_BUILD_SHARED_LIB defined.
+ # Use original sources and pmdinfo sources.
+ cflags += '-DRTE_BUILD_SHARED_LIB'
+ shared_sources = sources + [sources_pmd_info]
+ objs = []
+ endif
+
+ shared_lib = shared_library(lib_name, shared_sources,
objects: objs,
include_directories: includes,
dependencies: shared_deps,
--
2.47.3
next prev parent reply other threads:[~2026-06-25 16:08 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-23 11:37 [PATCH 0/5] add versioned symbols for recently stabilized APIs Dariusz Sosnowski
2026-06-23 11:37 ` [PATCH 1/5] eal: fix macro for versioned experimental symbol Dariusz Sosnowski
2026-06-23 13:50 ` Stephen Hemminger
2026-06-23 15:26 ` Dariusz Sosnowski
2026-06-23 16:05 ` Stephen Hemminger
2026-06-23 11:37 ` [PATCH 2/5] drivers: support function versioning Dariusz Sosnowski
2026-06-23 11:37 ` [PATCH 3/5] net/mlx5: fix stabilized function versions Dariusz Sosnowski
2026-06-23 11:37 ` [PATCH 4/5] eal: support aliases for versioned variable symbols Dariusz Sosnowski
2026-06-23 11:37 ` [PATCH 5/5] ethdev: fix promoted flow metadata symbols Dariusz Sosnowski
2026-06-23 13:48 ` [PATCH 0/5] add versioned symbols for recently stabilized APIs Stephen Hemminger
2026-06-23 13:50 ` David Marchand
2026-06-23 15:43 ` Dariusz Sosnowski
2026-06-24 13:13 ` [PATCH v2 0/4] " Dariusz Sosnowski
2026-06-24 13:13 ` [PATCH v2 1/4] eal: fix macro for versioned experimental symbol Dariusz Sosnowski
2026-06-25 7:34 ` David Marchand
2026-06-24 13:13 ` [PATCH v2 2/4] build: support function versioning for drivers Dariusz Sosnowski
2026-06-25 7:38 ` David Marchand
2026-06-25 12:35 ` Dariusz Sosnowski
2026-06-24 13:13 ` [PATCH v2 3/4] net/mlx5: fix stabilized function versions Dariusz Sosnowski
2026-06-25 7:41 ` David Marchand
2026-06-24 13:13 ` [PATCH v2 4/4] ethdev: fix promoted flow metadata symbols Dariusz Sosnowski
2026-06-25 7:44 ` David Marchand
2026-06-25 9:22 ` Dariusz Sosnowski
2026-06-25 3:45 ` [PATCH v2 0/4] add versioned symbols for recently stabilized APIs Jiang, YuX
2026-06-25 13:33 ` [PATCH v3 " Dariusz Sosnowski
2026-06-25 13:33 ` [PATCH v3 1/4] eal: fix macro for versioned experimental symbol Dariusz Sosnowski
2026-06-25 13:33 ` [PATCH v3 2/4] build: support function versioning for drivers Dariusz Sosnowski
2026-06-25 14:45 ` David Marchand
2026-06-25 16:12 ` Dariusz Sosnowski
2026-06-25 13:33 ` [PATCH v3 3/4] net/mlx5: fix stabilized function versions Dariusz Sosnowski
2026-06-25 13:33 ` [PATCH v3 4/4] ethdev: fix promoted flow metadata symbols Dariusz Sosnowski
2026-06-25 16:06 ` [PATCH v4 0/4] add versioned symbols for recently stabilized APIs Dariusz Sosnowski
2026-06-25 16:06 ` [PATCH v4 1/4] eal: fix macro for versioned experimental symbol Dariusz Sosnowski
2026-06-25 16:06 ` Dariusz Sosnowski [this message]
2026-06-25 16:06 ` [PATCH v4 3/4] net/mlx5: fix stabilized function versions Dariusz Sosnowski
2026-06-25 16:06 ` [PATCH v4 4/4] ethdev: fix promoted flow metadata symbols Dariusz Sosnowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260625160645.1341914-3-dsosnowski@nvidia.com \
--to=dsosnowski@nvidia.com \
--cc=bruce.richardson@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=yux.jiang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox