[libvirt] [dbus PATCH 08/15] src: Make CFLAGS and LDFLAGS global

Andrea Bolognani posted 15 patches 7 years, 5 months ago
[libvirt] [dbus PATCH 08/15] src: Make CFLAGS and LDFLAGS global
Posted by Andrea Bolognani 7 years, 5 months ago
There's nothing target-specific about either. This is
going to be useful later on.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
---
 src/Makefile.am | 35 ++++++++++++++++-------------------
 1 file changed, 16 insertions(+), 19 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 688dfb5..1b73c8d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,6 +1,22 @@
 AM_CPPFLAGS = \
 	-I$(top_srcdir)/src \
 	-DVIRT_DBUS_INTERFACES_DIR=\"$(DBUS_INTERFACES_DIR)\"
+AM_CFLAGS = \
+	$(GIO2_CFLAGS) \
+	$(GLIB2_CFLAGS) \
+	$(LIBVIRT_CFLAGS) \
+	$(LIBVIRT_GLIB_CFLAGS) \
+	$(WARN_CFLAGS) \
+	$(PIE_CFLAGS) \
+	$(NULL)
+AM_LDFLAGS = \
+	$(GIO2_LDFLAGS) \
+	$(GLIB2_LDFLAGS) \
+	$(LIBVIRT_LDFLAGS) \
+	$(LIBVIRT_GLIB_LDFLAGS) \
+	$(RELRO_LDFLAGS) \
+	$(PID_LDFLAGS) \
+	$(NULL)
 
 bin_PROGRAMS = libvirt-dbus
 
@@ -18,25 +34,6 @@ libvirt_dbus_SOURCES = \
 	storagepool.c storagepool.h \
 	storagevol.c storagevol.h \
 	$(NULL)
-
-libvirt_dbus_CFLAGS = \
-	$(GIO2_CFLAGS) \
-	$(GLIB2_CFLAGS) \
-	$(LIBVIRT_CFLAGS) \
-	$(LIBVIRT_GLIB_CFLAGS) \
-	$(WARN_CFLAGS) \
-	$(PIE_CFLAGS) \
-	$(NULL)
-
-libvirt_dbus_LDFLAGS = \
-	$(GIO2_LDFLAGS) \
-	$(GLIB2_LDFLAGS) \
-	$(LIBVIRT_LDFLAGS) \
-	$(LIBVIRT_GLIB_LDFLAGS) \
-	$(RELRO_LDFLAGS) \
-	$(PIE_LDFLAGS) \
-	$(NULL)
-
 libvirt_dbus_LDADD = \
 	$(GIO2_LIBS) \
 	$(GLIB2_LIBS) \
-- 
2.17.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [dbus PATCH 08/15] src: Make CFLAGS and LDFLAGS global
Posted by Pavel Hrdina 7 years, 5 months ago
On Fri, Jun 29, 2018 at 06:01:15PM +0200, Andrea Bolognani wrote:
> There's nothing target-specific about either. This is
> going to be useful later on.
> 
> Signed-off-by: Andrea Bolognani <abologna@redhat.com>
> ---
>  src/Makefile.am | 35 ++++++++++++++++-------------------
>  1 file changed, 16 insertions(+), 19 deletions(-)
> 
> diff --git a/src/Makefile.am b/src/Makefile.am
> index 688dfb5..1b73c8d 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -1,6 +1,22 @@
>  AM_CPPFLAGS = \
>  	-I$(top_srcdir)/src \
>  	-DVIRT_DBUS_INTERFACES_DIR=\"$(DBUS_INTERFACES_DIR)\"
> +AM_CFLAGS = \
> +	$(GIO2_CFLAGS) \
> +	$(GLIB2_CFLAGS) \
> +	$(LIBVIRT_CFLAGS) \
> +	$(LIBVIRT_GLIB_CFLAGS) \
> +	$(WARN_CFLAGS) \
> +	$(PIE_CFLAGS) \
> +	$(NULL)
> +AM_LDFLAGS = \
> +	$(GIO2_LDFLAGS) \
> +	$(GLIB2_LDFLAGS) \
> +	$(LIBVIRT_LDFLAGS) \
> +	$(LIBVIRT_GLIB_LDFLAGS) \
> +	$(RELRO_LDFLAGS) \
> +	$(PID_LDFLAGS) \

s/PID/PIE/

Pavel
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [dbus PATCH 08/15] src: Make CFLAGS and LDFLAGS global
Posted by Andrea Bolognani 7 years, 5 months ago
On Fri, 2018-06-29 at 19:02 +0200, Pavel Hrdina wrote:
> On Fri, Jun 29, 2018 at 06:01:15PM +0200, Andrea Bolognani wrote:
> > +AM_LDFLAGS = \
> > +	$(GIO2_LDFLAGS) \
> > +	$(GLIB2_LDFLAGS) \
> > +	$(LIBVIRT_LDFLAGS) \
> > +	$(LIBVIRT_GLIB_LDFLAGS) \
> > +	$(RELRO_LDFLAGS) \
> > +	$(PID_LDFLAGS) \
> 
> s/PID/PIE/

Good catch, must have gotten lost in the rebases O:-)

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list