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.march...@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(-) diff --git a/doc/guides/rel_notes/release_25_03.rst b/doc/guides/rel_notes/release_25_03.rst index 269ab6f68a..e9a9abbb13 100644 --- a/doc/guides/rel_notes/release_25_03.rst +++ b/doc/guides/rel_notes/release_25_03.rst @@ -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. diff --git a/lib/eal/include/rte_common.h b/lib/eal/include/rte_common.h index 7a252c1997..2e0ee9dc7e 100644 --- a/lib/eal/include/rte_common.h +++ b/lib/eal/include/rte_common.h @@ -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. -- 2.48.1