DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] build: fix linker warnings about undefined symbols
@ 2024-01-10 15:01 Bruce Richardson
  2024-01-10 16:58 ` Tyler Retzlaff
  0 siblings, 1 reply; 11+ messages in thread
From: Bruce Richardson @ 2024-01-10 15:01 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

The default behaviour of "ld.lld" has changed, so it now prints out
warnings about entries in the version.map file which don't exist in
the current build. Since we use our version.map file simply to filter
out the functions we don't want made public, we include in it all
functions across all OS's and builds that we want public if present.
This causes these ld warnings to be emitted, e.g. on BSD, which is
missing functionality found on Linux. For example:

* hpet functions in EAL
* regexdev enqueue and dequeue burst
* eventdev event_timer functions

Easiest solution, without major rework of how we use our version.map
files, and without dynamically generating them per-build, is to pass
the --undefined-version flag to the linker, to restore the old
behaviour.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 config/meson.build | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/config/meson.build b/config/meson.build
index 73737921c3..cfc29ba757 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -187,6 +187,9 @@ dpdk_conf.set('RTE_ARCH_32', cc.sizeof('void *') == 4)
 
 if not is_windows
     add_project_link_arguments('-Wl,--no-as-needed', language: 'c')
+    if cc.has_link_argument('-Wl,--undefined-version')
+        add_project_link_arguments('-Wl,--undefined-version', language: 'c')
+    endif
 endif
 
 # use pthreads if available for the platform
-- 
2.40.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-02-20 17:02 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-10 15:01 [PATCH] build: fix linker warnings about undefined symbols Bruce Richardson
2024-01-10 16:58 ` Tyler Retzlaff
2024-01-11  9:38   ` Morten Brørup
2024-01-11  9:48     ` Bruce Richardson
2024-01-12 20:11       ` Tyler Retzlaff
2024-01-12 20:49         ` Morten Brørup
2024-01-12 22:22           ` Stephen Hemminger
2024-01-15  8:56           ` David Marchand
2024-01-15 16:17             ` Tyler Retzlaff
2024-02-18 17:38   ` Thomas Monjalon
2024-02-20 17:02     ` Tyler Retzlaff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).