Skip to content

build: Use weak bindings in gvdb to fix linking with LLD

Ting-Wei Lan requested to merge wip/lantw/use-weak-symbols-in-gvdb into master

Since tests/dconf-mock-gvdb.c has functions conflicting with the real gvdb and it is intended for the former to override the latter in tests, we have to make functions in gvdb library have weak bindings instead of the default strong bindings to avoid duplicate symbol errors.

This change should not affect exported symbols of shared libraries because these symbols are already have visibility set to hidden.

Fixes #47 (closed)

I am not sure whether this is the right way to fix the problem, but I confirm that this patch fixes the build of dconf on FreeBSD 11.2 with LLD 6. All tests pass and nm -D client/libdconf.so shows there is no gvdb symbols exported.

Merge request reports