From 71b54636f045bbc712e267084d5f1ef7431798b2 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Mon, 13 May 2013 12:50:22 +0100 Subject: [PATCH] Don't duplicate compiler warning flags when linking Automake already passes all CFLAGS to the linker too, so it is not necessary to set WARN_LDFLAGS in addition to the WARN_CFLAGS variable. Signed-off-by: Daniel P. Berrange --- daemon/Makefile.am | 1 - m4/virt-compile-warnings.m4 | 4 ---- src/Makefile.am | 5 ----- tools/Makefile.am | 4 +--- 4 files changed, 1 insertion(+), 13 deletions(-) diff --git a/daemon/Makefile.am b/daemon/Makefile.am index 64126e55e0..f48dc85121 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -111,7 +111,6 @@ libvirtd_CFLAGS = \ -DQEMUD_PID_FILE="\"$(QEMUD_PID_FILE)\"" libvirtd_LDFLAGS = \ - $(WARN_LDFLAGS) \ $(PIE_LDFLAGS) \ $(RELRO_LDFLAGS) \ $(COVERAGE_LDFLAGS) diff --git a/m4/virt-compile-warnings.m4 b/m4/virt-compile-warnings.m4 index 59091a6a52..dc0e7d7e8c 100644 --- a/m4/virt-compile-warnings.m4 +++ b/m4/virt-compile-warnings.m4 @@ -224,10 +224,6 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[ gl_WARN_ADD([-Werror]) fi - WARN_LDFLAGS=$WARN_CFLAGS - AC_SUBST([WARN_CFLAGS]) - AC_SUBST([WARN_LDFLAGS]) - dnl Needed to keep compile quiet on python 2.4 save_WARN_CFLAGS=$WARN_CFLAGS WARN_CFLAGS= diff --git a/src/Makefile.am b/src/Makefile.am index 9b9f9f2d28..6c626ace2c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1979,7 +1979,6 @@ if WITH_LIBVIRTD libexec_PROGRAMS += libvirt_iohelper libvirt_iohelper_SOURCES = $(UTIL_IO_HELPER_SOURCES) libvirt_iohelper_LDFLAGS = \ - $(WARN_LDFLAGS) \ $(AM_LDFLAGS) \ $(PIE_LDFLAGS) \ $(RELRO_LDFLAGS) \ @@ -2003,7 +2002,6 @@ libexec_PROGRAMS += libvirt_parthelper libvirt_parthelper_SOURCES = $(STORAGE_HELPER_DISK_SOURCES) libvirt_parthelper_LDFLAGS = \ - $(WARN_LDFLAGS) \ $(AM_LDFLAGS) \ $(PIE_LDFLAGS) \ $(RELRO_LDFLAGS) \ @@ -2036,7 +2034,6 @@ libvirt_sanlock_helper_CFLAGS = \ $(PIE_CFLAGS) \ $(NULL) libvirt_sanlock_helper_LDFLAGS = \ - $(WARN_LDFLAGS) \ $(AM_LDFLAGS) \ $(PIE_LDFLAGS) \ $(RELRO_LDFLAGS) \ @@ -2053,7 +2050,6 @@ libvirt_lxc_SOURCES = \ $(NODE_INFO_SOURCES) \ $(DATATYPES_SOURCES) libvirt_lxc_LDFLAGS = \ - $(WARN_LDFLAGS) \ $(AM_LDFLAGS) \ $(PIE_LDFLAGS) \ $(RELRO_LDFLAGS) \ @@ -2098,7 +2094,6 @@ libexec_PROGRAMS += virt-aa-helper virt_aa_helper_SOURCES = $(SECURITY_DRIVER_APPARMOR_HELPER_SOURCES) virt_aa_helper_LDFLAGS = \ - $(WARN_LDFLAGS) \ $(AM_LDFLAGS) \ $(PIE_LDFLAGS) \ $(RELRO_LDFLAGS) \ diff --git a/tools/Makefile.am b/tools/Makefile.am index 07c9f43503..4136b848dc 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -98,7 +98,6 @@ virt_host_validate_SOURCES = \ $(NULL) virt_host_validate_LDFLAGS = \ - $(WARN_LDFLAGS) \ $(PIE_LDFLAGS) \ $(RELRO_LDFLAGS) \ $(COVERAGE_LDFLAGS) \ @@ -131,10 +130,9 @@ virsh_SOURCES = \ virsh-volume.c virsh-volume.h \ $(NULL) -virsh_LDFLAGS = $(WARN_LDFLAGS) $(COVERAGE_LDFLAGS) +virsh_LDFLAGS = $(COVERAGE_LDFLAGS) virsh_LDADD = \ $(STATIC_BINARIES) \ - $(WARN_LDFLAGS) \ $(PIE_LDFLAGS) \ $(RELRO_LDFLAGS) \ ../src/libvirt.la \