]> xenbits.xensource.com Git - libvirt.git/commitdiff
tests: Make references to global symbols indirect in test drivers
authorRoman Bolshakov <r.bolshakov@yadro.com>
Wed, 21 Aug 2019 16:13:23 +0000 (19:13 +0300)
committerDaniel P. Berrangé <berrange@redhat.com>
Fri, 23 Aug 2019 10:26:26 +0000 (11:26 +0100)
A library has to be built with -flat_namespace to get all references to
global symbols indirected. That can also be achieved with two-level
namespace interposition but we're not using explicit symbol
interposition since it's more verbose and requires massive changes to
the mocks.

This provides a way to interpose a mock for virQEMUCapsProbeHostCPU from
qemucpumock and fixes domaincapstest on macOS.

Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
tests/Makefile.am

index 460efb6b7b35dad4129cbfa4e67707c7d334ccba..f92710db435f1a934d5b11cc536d1fe8bfd54a8d 100644 (file)
@@ -56,6 +56,9 @@ DRIVERLIB_LDFLAGS = \
        -avoid-version \
        -rpath /evil/libtool/hack/to/force/shared/lib/creation \
        $(MINGW_EXTRA_LDFLAGS)
+if WITH_MACOS
+DRIVERLIB_LDFLAGS += -Wl,-flat_namespace
+endif WITH_MACOS
 
 PROBES_O =
 if WITH_DTRACE_PROBES