mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
configure: introduce FLAT_NAMESPACE_FLAGS
Set FLAT_NAMESPACE_FLAGS to -Wl,-flat_namespace in configure only for macOS and use it unconditionally in Makefiles. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
83131d9714
commit
9bc09df873
13
configure.ac
13
configure.ac
@ -189,6 +189,19 @@ esac
|
|||||||
AC_MSG_RESULT([$VERSION_SCRIPT_FLAGS])
|
AC_MSG_RESULT([$VERSION_SCRIPT_FLAGS])
|
||||||
AC_SUBST([VERSION_SCRIPT_FLAGS])
|
AC_SUBST([VERSION_SCRIPT_FLAGS])
|
||||||
|
|
||||||
|
dnl macOS has two-level namespaces by default.
|
||||||
|
dnl Override it to allow symbol replacement with DYLD_INSERT_LIBRARIES
|
||||||
|
case "$host" in
|
||||||
|
*-*-darwin*)
|
||||||
|
FLAT_NAMESPACE_FLAGS=-Wl,-flat_namespace
|
||||||
|
;;
|
||||||
|
* )
|
||||||
|
FLAT_NAMESPACE_FLAGS=""
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
AC_MSG_RESULT([$FLAT_NAMESPACE_FLAGS])
|
||||||
|
AC_SUBST([FLAT_NAMESPACE_FLAGS])
|
||||||
|
|
||||||
dnl Specify if we rely on ifconfig instead of iproute2 (e.g. in case
|
dnl Specify if we rely on ifconfig instead of iproute2 (e.g. in case
|
||||||
dnl we're working on BSD)
|
dnl we're working on BSD)
|
||||||
want_ifconfig=no
|
want_ifconfig=no
|
||||||
|
@ -431,13 +431,9 @@ libvirt_la_LDFLAGS = \
|
|||||||
-version-info $(LIBVIRT_VERSION_INFO) \
|
-version-info $(LIBVIRT_VERSION_INFO) \
|
||||||
$(LIBVIRT_NODELETE) \
|
$(LIBVIRT_NODELETE) \
|
||||||
$(NO_UNDEFINED_LDFLAGS) \
|
$(NO_UNDEFINED_LDFLAGS) \
|
||||||
$(AM_LDFLAGS)
|
$(FLAT_NAMESPACE_FLAGS) \
|
||||||
if WITH_MACOS
|
$(AM_LDFLAGS) \
|
||||||
# macOS has two-level namespaces by default.
|
$(NULL)
|
||||||
# Override it to allow symbol replacement with DYLD_INSERT_LIBRARIES
|
|
||||||
libvirt_la_LDFLAGS += -Wl,-flat_namespace
|
|
||||||
endif WITH_MACOS
|
|
||||||
libvirt_la_LDFLAGS += $(NULL)
|
|
||||||
libvirt_la_LIBADD += \
|
libvirt_la_LIBADD += \
|
||||||
$(DLOPEN_LIBS)
|
$(DLOPEN_LIBS)
|
||||||
libvirt_la_CFLAGS = -DIN_LIBVIRT $(AM_CFLAGS)
|
libvirt_la_CFLAGS = -DIN_LIBVIRT $(AM_CFLAGS)
|
||||||
|
@ -55,10 +55,9 @@ MOCKLIBS_LDFLAGS = -avoid-version \
|
|||||||
DRIVERLIB_LDFLAGS = \
|
DRIVERLIB_LDFLAGS = \
|
||||||
-avoid-version \
|
-avoid-version \
|
||||||
-rpath /evil/libtool/hack/to/force/shared/lib/creation \
|
-rpath /evil/libtool/hack/to/force/shared/lib/creation \
|
||||||
$(MINGW_EXTRA_LDFLAGS)
|
$(MINGW_EXTRA_LDFLAGS) \
|
||||||
if WITH_MACOS
|
$(FLAT_NAMESPACE_FLAGS) \
|
||||||
DRIVERLIB_LDFLAGS += -Wl,-flat_namespace
|
$(NULL)
|
||||||
endif WITH_MACOS
|
|
||||||
|
|
||||||
PROBES_O =
|
PROBES_O =
|
||||||
if WITH_DTRACE_PROBES
|
if WITH_DTRACE_PROBES
|
||||||
|
Loading…
Reference in New Issue
Block a user