| Message ID | 20261108160143.1662655-1-khem.raj@oss.qualcomm.com |
|---|---|
| State | New |
| Headers | show |
| Series | [meta-networking,1/2] waf-samba: Link with --undefined-version | expand |
diff --git a/meta-networking/classes/waf-samba.bbclass b/meta-networking/classes/waf-samba.bbclass index fcec1bea16..d6c03c45a7 100644 --- a/meta-networking/classes/waf-samba.bbclass +++ b/meta-networking/classes/waf-samba.bbclass @@ -24,6 +24,10 @@ CONFIGUREOPTS = " --prefix=${prefix} \ # avoids build breaks when using no-static-libs.inc DISABLE_STATIC = "" +# wafsamba version scripts name symbols that may not exist (_end, __bss_start, +# _edata, and symbols from older ABI versions); lld rejects those by default +LDFLAGS += "-Wl,--undefined-version" + def get_waf_parallel_make(d): pm = d.getVar('PARALLEL_MAKE') if pm:
wafsamba generates version scripts that name symbols which may not exist in the library: _end, __bss_start and _edata are always listed as local, and the per-version nodes carry symbols from older ABI signature files that were later removed (e.g. tdb_do_delete). GNU ld ignores these, but lld rejects them by default: ld.lld: error: version script assignment of 'local' to symbol '_end' failed: symbol not defined meta-clang used to add -Wl,--undefined-version for libtalloc, libtdb, libtevent, libldb and samba. Since the scripts are generated by design this way, do it once in the class for all its users; binutils accepts the option too. FreeBSD ports do the same for talloc and tdb. Tested: libtalloc, libtdb, libtevent, libldb ptest images pass on qemux86-64 with clang/lld; samba builds. AI-Generated: Uses Claude Code Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com> --- meta-networking/classes/waf-samba.bbclass | 4 ++++ 1 file changed, 4 insertions(+)