[RFC,10/10] eal: deprecate weak symbols
Checks
Commit Message
Mark __rte_weak as deprecated.
It will avoid having to support such feature with other linkers,
plus this was never really needed.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
doc/guides/rel_notes/release_25_03.rst | 2 ++
lib/eal/include/rte_common.h | 6 +++++-
2 files changed, 7 insertions(+), 1 deletion(-)
@@ -125,6 +125,8 @@ API Changes
* eal: The ``__rte_packed`` macro for packing data is replaced with
``__rte_packed_begin`` / ``__rte_packed_end``.
+* eal: The ``__rte_weak`` macro is deprecated and will be removed in a future release.
+
* build: The Intel networking drivers:
cpfl, e1000, fm10k, i40e, iavf, ice, idpf, igc, ipn3ke and ixgbe,
have been moved from ``drivers/net`` to a new ``drivers/net/intel`` directory.
@@ -181,7 +181,11 @@ typedef uint16_t unaligned_uint16_t;
/**
* Mark a function or variable to a weak reference.
*/
-#define __rte_weak __attribute__((__weak__))
+#ifdef RTE_TOOLCHAIN_MSVC
+#define __rte_weak RTE_DEPRECATED(__rte_weak)
+#else
+#define __rte_weak RTE_DEPRECATED(__rte_weak) __attribute__((__weak__))
+#endif
/**
* Mark a function to be pure.