提交 9e3c9af9 编写于 作者: D Daniel P. Berrangé

build: provide a AM_FLAGS_MOD for loadable modules

Dynamic loadable modules all need a common set of linker flags

  -module -avoid-version $(AM_LDFLAGS)

Bundle those up into a $(AM_LDFLAGS_MOD) to avoid repetition.
Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 21639744
......@@ -51,6 +51,7 @@ AM_LDFLAGS = $(DRIVER_MODULES_LDFLAGS) \
$(CYGWIN_EXTRA_LDFLAGS) \
$(MINGW_EXTRA_LDFLAGS) \
$(NULL)
AM_LDFLAGS_MOD = -module -avoid-version $(AM_LDFLAGS)
POD2MAN = pod2man -c "Virtualization Support" -r "$(PACKAGE)-$(VERSION)"
......@@ -1341,7 +1342,7 @@ libvirt_driver_xen_la_SOURCES =
libvirt_driver_xen_la_LIBADD = libvirt_driver_xen_impl.la
mod_LTLIBRARIES += libvirt_driver_xen.la
libvirt_driver_xen_la_LIBADD += libvirt.la ../gnulib/lib/libgnu.la
libvirt_driver_xen_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
libvirt_driver_xen_la_LDFLAGS = $(AM_LDFLAGS_MOD)
libvirt_driver_xen_impl_la_CFLAGS = \
$(XEN_CFLAGS) \
......@@ -1387,7 +1388,7 @@ libvirt_driver_vbox_la_LIBADD = libvirt_driver_vbox_impl.la
mod_LTLIBRARIES += \
libvirt_driver_vbox.la
libvirt_driver_vbox_la_LIBADD += libvirt.la ../gnulib/lib/libgnu.la
libvirt_driver_vbox_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
libvirt_driver_vbox_la_LDFLAGS = $(AM_LDFLAGS_MOD)
libvirt_driver_vbox_impl_la_CFLAGS = \
-I$(srcdir)/conf \
......@@ -1416,7 +1417,7 @@ libvirt_driver_libxl_la_SOURCES =
libvirt_driver_libxl_la_LIBADD = libvirt_driver_libxl_impl.la
mod_LTLIBRARIES += libvirt_driver_libxl.la
libvirt_driver_libxl_la_LIBADD += libvirt.la ../gnulib/lib/libgnu.la
libvirt_driver_libxl_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
libvirt_driver_libxl_la_LDFLAGS = $(AM_LDFLAGS_MOD)
libvirt_driver_libxl_impl_la_CFLAGS = \
$(LIBXL_CFLAGS) \
......@@ -1445,7 +1446,7 @@ libvirt_driver_qemu_la_SOURCES =
libvirt_driver_qemu_la_LIBADD = libvirt_driver_qemu_impl.la
mod_LTLIBRARIES += libvirt_driver_qemu.la
libvirt_driver_qemu_la_LIBADD += libvirt.la ../gnulib/lib/libgnu.la
libvirt_driver_qemu_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
libvirt_driver_qemu_la_LDFLAGS = $(AM_LDFLAGS_MOD)
libvirt_driver_qemu_impl_la_CFLAGS = \
$(GNUTLS_CFLAGS) \
......@@ -1480,7 +1481,7 @@ libvirt_driver_lxc_la_SOURCES =
libvirt_driver_lxc_la_LIBADD = libvirt_driver_lxc_impl.la
mod_LTLIBRARIES += libvirt_driver_lxc.la
libvirt_driver_lxc_la_LIBADD += libvirt.la ../gnulib/lib/libgnu.la
libvirt_driver_lxc_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
libvirt_driver_lxc_la_LDFLAGS = $(AM_LDFLAGS_MOD)
libvirt_driver_lxc_impl_la_CFLAGS = \
$(LIBNL_CFLAGS) \
......@@ -1517,7 +1518,7 @@ libvirt_driver_uml_la_SOURCES =
libvirt_driver_uml_la_LIBADD = libvirt_driver_uml_impl.la
mod_LTLIBRARIES += libvirt_driver_uml.la
libvirt_driver_uml_la_LIBADD += libvirt.la ../gnulib/lib/libgnu.la
libvirt_driver_uml_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
libvirt_driver_uml_la_LDFLAGS = $(AM_LDFLAGS_MOD)
libvirt_driver_uml_impl_la_CFLAGS = \
-I$(srcdir)/access \
......@@ -1589,7 +1590,7 @@ libvirt_driver_vz_la_SOURCES =
libvirt_driver_vz_la_LIBADD = libvirt_driver_vz_impl.la
mod_LTLIBRARIES += libvirt_driver_vz.la
libvirt_driver_vz_la_LIBADD += libvirt.la ../gnulib/lib/libgnu.la
libvirt_driver_vz_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
libvirt_driver_vz_la_LDFLAGS = $(AM_LDFLAGS_MOD)
libvirt_driver_vz_impl_la_CFLAGS = \
-I$(srcdir)/conf \
-I$(srcdir)/access \
......@@ -1605,7 +1606,7 @@ libvirt_driver_bhyve_la_SOURCES =
libvirt_driver_bhyve_la_LIBADD = libvirt_driver_bhyve_impl.la
mod_LTLIBRARIES += libvirt_driver_bhyve.la
libvirt_driver_bhyve_la_LIBADD += libvirt.la ../gnulib/lib/libgnu.la
libvirt_driver_bhyve_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
libvirt_driver_bhyve_la_LDFLAGS = $(AM_LDFLAGS_MOD)
libvirt_driver_bhyve_impl_la_CFLAGS = \
-I$(srcdir)/access \
......@@ -1631,7 +1632,7 @@ libvirt_driver_network_la_LIBADD += libvirt.la ../gnulib/lib/libgnu.la \
$(LIBNL_LIBS) \
$(DBUS_LIBS) \
$(NULL)
libvirt_driver_network_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
libvirt_driver_network_la_LDFLAGS = $(AM_LDFLAGS_MOD)
libvirt_driver_network_impl_la_CFLAGS = \
$(LIBNL_CFLAGS) \
......@@ -1651,7 +1652,7 @@ libvirt_driver_interface_la_CFLAGS = \
-I$(srcdir)/access \
-I$(srcdir)/conf \
$(AM_CFLAGS) $(LIBNL_CFLAGS)
libvirt_driver_interface_la_LDFLAGS = $(AM_LDFLAGS)
libvirt_driver_interface_la_LDFLAGS = $(AM_LDFLAGS_MOD)
libvirt_driver_interface_la_LIBADD =
if WITH_NETCF
libvirt_driver_interface_la_CFLAGS += $(NETCF_CFLAGS)
......@@ -1662,7 +1663,6 @@ libvirt_driver_interface_la_CFLAGS += $(UDEV_CFLAGS)
libvirt_driver_interface_la_LIBADD += $(UDEV_LIBS)
endif WITH_UDEV
libvirt_driver_interface_la_LIBADD += libvirt.la ../gnulib/lib/libgnu.la
libvirt_driver_interface_la_LDFLAGS += -module -avoid-version
libvirt_driver_interface_la_SOURCES = $(INTERFACE_DRIVER_SOURCES)
endif WITH_INTERFACE
......@@ -1673,7 +1673,7 @@ libvirt_driver_secret_la_CFLAGS = \
-I$(srcdir)/conf \
$(AM_CFLAGS)
libvirt_driver_secret_la_LIBADD = libvirt.la ../gnulib/lib/libgnu.la
libvirt_driver_secret_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
libvirt_driver_secret_la_LDFLAGS = $(AM_LDFLAGS_MOD)
libvirt_driver_secret_la_SOURCES = $(SECRET_DRIVER_SOURCES)
endif WITH_SECRETS
......@@ -1701,7 +1701,7 @@ libvirt_driver_storage_la_SOURCES =
libvirt_driver_storage_la_LIBADD = libvirt_driver_storage_impl.la
mod_LTLIBRARIES += libvirt_driver_storage.la
libvirt_driver_storage_la_LIBADD += libvirt.la ../gnulib/lib/libgnu.la
libvirt_driver_storage_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
libvirt_driver_storage_la_LDFLAGS = $(AM_LDFLAGS_MOD)
libvirt_driver_storage_impl_la_SOURCES += $(STORAGE_DRIVER_SOURCES)
......@@ -1711,8 +1711,7 @@ libvirt_storage_backend_fs_la_CFLAGS = \
$(AM_CFLAGS)
storagebackend_LTLIBRARIES += libvirt_storage_backend_fs.la
libvirt_storage_backend_fs_la_LDFLAGS = \
-module -avoid-version $(AM_LDFLAGS)
libvirt_storage_backend_fs_la_LDFLAGS = $(AM_LDFLAGS_MOD)
libvirt_storage_backend_fs_la_LIBADD = libvirt.la ../gnulib/lib/libgnu.la
endif WITH_STORAGE
......@@ -1724,8 +1723,7 @@ libvirt_storage_backend_logical_la_CFLAGS = \
$(AM_CFLAGS)
storagebackend_LTLIBRARIES += libvirt_storage_backend_logical.la
libvirt_storage_backend_logical_la_LDFLAGS = \
-module -avoid-version $(AM_LDFLAGS)
libvirt_storage_backend_logical_la_LDFLAGS = $(AM_LDFLAGS_MOD)
libvirt_storage_backend_logical_la_LIBADD = libvirt.la ../gnulib/lib/libgnu.la
endif WITH_STORAGE_LVM
......@@ -1738,8 +1736,7 @@ libvirt_storage_backend_iscsi_la_CFLAGS = \
$(AM_CFLAGS)
storagebackend_LTLIBRARIES += libvirt_storage_backend_iscsi.la
libvirt_storage_backend_iscsi_la_LDFLAGS = \
-module -avoid-version $(AM_LDFLAGS)
libvirt_storage_backend_iscsi_la_LDFLAGS = $(AM_LDFLAGS_MOD)
libvirt_storage_backend_iscsi_la_LIBADD = libvirt.la ../gnulib/lib/libgnu.la
endif WITH_STORAGE_ISCSI
......@@ -1750,8 +1747,7 @@ libvirt_storage_backend_scsi_la_CFLAGS = \
$(AM_CFLAGS)
storagebackend_LTLIBRARIES += libvirt_storage_backend_scsi.la
libvirt_storage_backend_scsi_la_LDFLAGS = \
-module -avoid-version $(AM_LDFLAGS)
libvirt_storage_backend_scsi_la_LDFLAGS = $(AM_LDFLAGS_MOD)
libvirt_storage_backend_scsi_la_LIBADD = libvirt.la ../gnulib/lib/libgnu.la
endif WITH_STORAGE_SCSI
......@@ -1765,8 +1761,7 @@ libvirt_storage_backend_mpath_la_CFLAGS = \
$(AM_CFLAGS)
storagebackend_LTLIBRARIES += libvirt_storage_backend_mpath.la
libvirt_storage_backend_mpath_la_LDFLAGS = \
-module -avoid-version $(AM_LDFLAGS)
libvirt_storage_backend_mpath_la_LDFLAGS = $(AM_LDFLAGS_MOD)
libvirt_storage_backend_mpath_la_LIBADD += libvirt.la ../gnulib/lib/libgnu.la
endif WITH_STORAGE_MPATH
......@@ -1777,8 +1772,7 @@ libvirt_storage_backend_disk_la_CFLAGS = \
$(AM_CFLAGS)
storagebackend_LTLIBRARIES += libvirt_storage_backend_disk.la
libvirt_storage_backend_disk_la_LDFLAGS = \
-module -avoid-version $(AM_LDFLAGS)
libvirt_storage_backend_disk_la_LDFLAGS = $(AM_LDFLAGS_MOD)
libvirt_storage_backend_disk_la_LIBADD = libvirt.la ../gnulib/lib/libgnu.la
endif WITH_STORAGE_DISK
......@@ -1791,8 +1785,7 @@ libvirt_storage_backend_rbd_la_CFLAGS = \
$(AM_CFLAGS)
storagebackend_LTLIBRARIES += libvirt_storage_backend_rbd.la
libvirt_storage_backend_rbd_la_LDFLAGS = \
-module -avoid-version $(AM_LDFLAGS)
libvirt_storage_backend_rbd_la_LDFLAGS = $(AM_LDFLAGS_MOD)
libvirt_storage_backend_rbd_la_LIBADD += libvirt.la ../gnulib/lib/libgnu.la
endif WITH_STORAGE_RBD
......@@ -1812,8 +1805,7 @@ libvirt_storage_backend_sheepdog_priv_la_CFLAGS = \
noinst_LTLIBRARIES += libvirt_storage_backend_sheepdog_priv.la
storagebackend_LTLIBRARIES += libvirt_storage_backend_sheepdog.la
libvirt_storage_backend_sheepdog_la_LDFLAGS = \
-module -avoid-version $(AM_LDFLAGS)
libvirt_storage_backend_sheepdog_la_LDFLAGS = $(AM_LDFLAGS_MOD)
libvirt_storage_backend_sheepdog_la_LIBADD = libvirt.la ../gnulib/lib/libgnu.la
endif WITH_STORAGE_SHEEPDOG
......@@ -1827,8 +1819,7 @@ libvirt_storage_backend_gluster_la_CFLAGS = \
$(AM_CFLAGS)
storagebackend_LTLIBRARIES += libvirt_storage_backend_gluster.la
libvirt_storage_backend_gluster_la_LDFLAGS = \
-module -avoid-version $(AM_LDFLAGS)
libvirt_storage_backend_gluster_la_LDFLAGS = $(AM_LDFLAGS_MOD)
libvirt_storage_backend_gluster_la_LIBADD += libvirt.la ../gnulib/lib/libgnu.la
endif WITH_STORAGE_GLUSTER
......@@ -1839,8 +1830,7 @@ libvirt_storage_backend_zfs_la_CFLAGS = \
$(AM_CFLAGS)
storagebackend_LTLIBRARIES += libvirt_storage_backend_zfs.la
libvirt_storage_backend_zfs_la_LDFLAGS = \
-module -avoid-version $(AM_LDFLAGS)
libvirt_storage_backend_zfs_la_LDFLAGS = $(AM_LDFLAGS_MOD)
libvirt_storage_backend_zfs_la_LIBADD = libvirt.la ../gnulib/lib/libgnu.la
endif WITH_STORAGE_ZFS
......@@ -1852,8 +1842,7 @@ libvirt_storage_backend_vstorage_la_CFLAGS = \
$(AM_CFLAGS)
storagebackend_LTLIBRARIES += libvirt_storage_backend_vstorage.la
libvirt_storage_backend_vstorage_la_LDFLAGS = \
-module -avoid-version $(AM_LDFLAGS)
libvirt_storage_backend_vstorage_la_LDFLAGS = $(AM_LDFLAGS_MOD)
libvirt_storage_backend_vstorage_la_LIBADD = libvirt.la ../gnulib/lib/libgnu.la
endif WITH_STORAGE_VSTORAGE
......@@ -1866,7 +1855,7 @@ libvirt_driver_nodedev_la_CFLAGS = \
-I$(srcdir)/access \
-I$(srcdir)/conf \
$(AM_CFLAGS) $(LIBNL_CFLAGS)
libvirt_driver_nodedev_la_LDFLAGS = $(AM_LDFLAGS)
libvirt_driver_nodedev_la_LDFLAGS = $(AM_LDFLAGS_MOD)
libvirt_driver_nodedev_la_LIBADD =
if WITH_LIBVIRTD
......@@ -1883,7 +1872,6 @@ endif WITH_UDEV
endif WITH_LIBVIRTD
libvirt_driver_nodedev_la_LIBADD += libvirt.la ../gnulib/lib/libgnu.la
libvirt_driver_nodedev_la_LDFLAGS += -module -avoid-version
endif WITH_NODE_DEVICES
......@@ -1892,7 +1880,7 @@ noinst_LTLIBRARIES += libvirt_driver_nwfilter_impl.la
libvirt_driver_nwfilter_la_SOURCES =
libvirt_driver_nwfilter_la_LIBADD = libvirt_driver_nwfilter_impl.la
mod_LTLIBRARIES += libvirt_driver_nwfilter.la
libvirt_driver_nwfilter_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
libvirt_driver_nwfilter_la_LDFLAGS = $(AM_LDFLAGS_MOD)
libvirt_driver_nwfilter_impl_la_CFLAGS = \
$(LIBPCAP_CFLAGS) \
$(LIBNL_CFLAGS) \
......@@ -1906,7 +1894,6 @@ libvirt_driver_nwfilter_impl_la_LIBADD = \
$(LIBNL_LIBS) \
$(DBUS_LIBS)
libvirt_driver_nwfilter_impl_la_LIBADD += libvirt.la ../gnulib/lib/libgnu.la
libvirt_driver_nwfilter_impl_la_LDFLAGS += -module -avoid-version
libvirt_driver_nwfilter_impl_la_SOURCES = $(NWFILTER_DRIVER_SOURCES)
endif WITH_NWFILTER
......@@ -2604,7 +2591,7 @@ lockd_la_SOURCES = \
lockd_la_CFLAGS = -I$(srcdir)/conf \
$(XDR_CFLAGS) \
$(AM_CFLAGS)
lockd_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
lockd_la_LDFLAGS = $(AM_LDFLAGS_MOD)
lockd_la_LIBADD = libvirt.la ../gnulib/lib/libgnu.la
augeas_DATA += locking/libvirt_lockd.aug
if WITH_DTRACE_PROBES
......@@ -2885,7 +2872,7 @@ if WITH_SANLOCK
lockdriver_LTLIBRARIES += sanlock.la
sanlock_la_SOURCES = $(LOCK_DRIVER_SANLOCK_SOURCES)
sanlock_la_CFLAGS = -I$(srcdir)/conf $(AM_CFLAGS)
sanlock_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
sanlock_la_LDFLAGS = $(AM_LDFLAGS_MOD)
sanlock_la_LIBADD = -lsanlock_client libvirt.la ../gnulib/lib/libgnu.la
augeas_DATA += locking/libvirt_sanlock.aug
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册