Skip to content

Commit

Permalink
build: fix linker warnings about undefined symbols
Browse files Browse the repository at this point in the history
[ upstream commit 51c9428dca9fad10bd60ca668ffdf78e4a801e2f ]

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>
  • Loading branch information
bruce-richardson authored and kevintraynor committed Mar 5, 2024
1 parent 8fd1646 commit d27dfc1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions config/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,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
Expand Down

0 comments on commit d27dfc1

Please sign in to comment.