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 ca67c17c5c..8867a4bd74 100644
--- a/doc/guides/rel_notes/release_25_03.rst
+++ b/doc/guides/rel_notes/release_25_03.rst
@@ -188,6 +188,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.
+
 * net: Changed the API for CRC calculation to be thread-safe.
   An opaque context argument was introduced to the net CRC API
   containing the algorithm type and length.
diff --git a/lib/eal/include/rte_common.h b/lib/eal/include/rte_common.h
index 3f77b7624e..4be65376a5 100644
--- a/lib/eal/include/rte_common.h
+++ b/lib/eal/include/rte_common.h
@@ -179,7 +179,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

Reply via email to