# Check for compiler and library settings.
LIBVIRT_COMPILE_WARNINGS
-LIBVIRT_COMPILE_PIE
LIBVIRT_LINKER_RELRO
LIBVIRT_LINKER_NO_INDIRECT
LIBVIRT_LINKER_NO_UNDEFINED
+++ /dev/null
-dnl
-dnl Check for support for position independent executables
-dnl
-dnl Copyright (C) 2013 Red Hat, Inc.
-dnl
-dnl This library is free software; you can redistribute it and/or
-dnl modify it under the terms of the GNU Lesser General Public
-dnl License as published by the Free Software Foundation; either
-dnl version 2.1 of the License, or (at your option) any later version.
-dnl
-dnl This library is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-dnl Lesser General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU Lesser General Public
-dnl License along with this library. If not, see
-dnl <http://www.gnu.org/licenses/>.
-dnl
-
-AC_DEFUN([LIBVIRT_COMPILE_PIE],[
- PIE_CFLAGS=
- PIE_LDFLAGS=
- case "$host" in
- *-*-mingw* )
- ;; dnl All code is position independent on Win32 target
- *)
- gl_COMPILER_OPTION_IF([-fPIE -DPIE -pie], [
- PIE_CFLAGS="-fPIE -DPIE"
- PIE_LDFLAGS="-pie"
- ])
- esac
- AC_SUBST([PIE_CFLAGS])
- AC_SUBST([PIE_LDFLAGS])
-])
meson_version: '>= 0.54.0',
default_options: [
'buildtype=debugoptimized',
+ 'b_pie=true',
'c_std=gnu99',
],
)
libvirt_iohelper_SOURCES = $(UTIL_IO_HELPER_SOURCES)
libvirt_iohelper_LDFLAGS = \
$(AM_LDFLAGS) \
- $(PIE_LDFLAGS) \
$(NULL)
libvirt_iohelper_LDADD = \
libvirt.la \
libvirt_iohelper_CFLAGS = \
$(AM_CFLAGS) \
- $(PIE_CFLAGS) \
$(NULL)
-I$(builddir)/locking \
-I$(builddir)/rpc \
$(AM_CFLAGS) \
- $(PIE_CFLAGS) \
$(XDR_CFLAGS) \
$(NULL)
virtlockd_LDFLAGS = \
$(AM_LDFLAGS) \
- $(PIE_LDFLAGS) \
$(XDR_LIBS) \
$(NO_UNDEFINED_LDFLAGS) \
$(NULL)
libvirt_sanlock_helper_CFLAGS = \
-I$(srcdir)/conf \
$(AM_CFLAGS) \
- $(PIE_CFLAGS) \
$(NULL)
libvirt_sanlock_helper_LDFLAGS = \
$(AM_LDFLAGS) \
- $(PIE_LDFLAGS) \
$(NULL)
libvirt_sanlock_helper_LDADD = \
libvirt.la \
-I$(builddir)/logging \
-I$(builddir)/rpc \
$(AM_CFLAGS) \
- $(PIE_CFLAGS) \
$(XDR_CFLAGS) \
$(NULL)
virtlogd_LDFLAGS = \
$(AM_LDFLAGS) \
- $(PIE_LDFLAGS) \
$(XDR_LIBS) \
$(NO_UNDEFINED_LDFLAGS) \
$(NULL)
$(NULL)
libvirt_lxc_LDFLAGS = \
$(AM_LDFLAGS) \
- $(PIE_LDFLAGS) \
$(CAPNG_LIBS) \
$(LIBXML_LIBS) \
$(GLIB_LIBS) \
-I$(builddir)/rpc \
-I$(srcdir)/hypervisor \
$(AM_CFLAGS) \
- $(PIE_CFLAGS) \
$(CAPNG_CFLAGS) \
$(LIBXML_CFLAGS) \
$(GLIB_CFLAGS) \
libvirt_leaseshelper_SOURCES = $(NETWORK_LEASES_HELPER_SOURCES)
libvirt_leaseshelper_LDFLAGS = \
$(AM_LDFLAGS) \
- $(PIE_LDFLAGS) \
$(NULL)
libvirt_leaseshelper_LDADD = \
libvirt.la \
libvirt_leaseshelper_CFLAGS = \
$(AM_CFLAGS) \
- $(PIE_CFLAGS) \
$(NULL)
INSTALL_DATA_DIRS += network
$(XDR_CFLAGS) \
$(DBUS_CFLAGS) \
$(LIBNL_CFLAGS) \
- $(PIE_CFLAGS) \
-I$(srcdir)/access \
-I$(builddir)/access \
-I$(srcdir)/conf \
REMOTE_DAEMON_LD_FLAGS = \
$(AM_LDFLAGS) \
- $(PIE_LDFLAGS) \
$(NO_UNDEFINED_LDFLAGS) \
$(NULL)
virt_aa_helper_LDFLAGS = \
$(AM_LDFLAGS) \
- $(PIE_LDFLAGS) \
$(NULL)
virt_aa_helper_LDADD = \
libvirt.la \
-I$(top_srcdir)/src/hypervisor \
-I$(srcdir)/security \
$(AM_CFLAGS) \
- $(PIE_CFLAGS) \
$(NULL)
endif WITH_LIBVIRTD
endif WITH_SECDRIVER_APPARMOR
libvirt_parthelper_SOURCES = $(STORAGE_HELPER_DISK_SOURCES)
libvirt_parthelper_LDFLAGS = \
$(AM_LDFLAGS) \
- $(PIE_LDFLAGS) \
$(NULL)
libvirt_parthelper_LDADD = \
$(LIBPARTED_LIBS) \
libvirt_parthelper_CFLAGS = \
$(LIBPARTED_CFLAGS) \
$(AM_CFLAGS) \
- $(PIE_CFLAGS) \
$(NULL)
endif WITH_STORAGE_DISK
AM_CFLAGS = \
$(WARN_CFLAGS) \
$(COVERAGE_CFLAGS) \
- $(PIE_CFLAGS) \
$(LIBXML_CFLAGS) \
$(GLIB_CFLAGS) \
$(NULL)
$(NULL)
libvirt_shell_la_LDFLAGS = \
$(AM_LDFLAGS) \
- $(PIE_LDFLAGS) \
$(COVERAGE_LDFLAGS) \
$(NULL)
libvirt_shell_la_LIBADD = \
virt_host_validate_LDFLAGS = \
$(AM_LDFLAGS) \
- $(PIE_LDFLAGS) \
$(COVERAGE_LDFLAGS) \
$(NULL)
virt_login_shell_helper_LDFLAGS = \
$(AM_LDFLAGS) \
- $(PIE_LDFLAGS) \
$(COVERAGE_LDFLAGS) \
$(NULL)
virt_login_shell_helper_LDADD = \
virsh_LDFLAGS = \
$(AM_LDFLAGS) \
- $(PIE_LDFLAGS) \
$(COVERAGE_LDFLAGS) \
$(NULL)
virsh_LDADD = \
$(AM_LDFLAGS) \
$(COVERAGE_LDFLAGS) \
$(STATIC_BINARIES) \
- $(PIE_LDFLAGS) \
$(NULL)
virt_admin_LDADD = \
../src/libvirt-admin.la \