From 57efb14f0519e0b20a789c274db7777f16c98b35 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Sat, 13 Oct 2018 23:10:33 +0200 Subject: [PATCH 1/2] grefcount: add missing gatomic.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without gatomic.h, build fails on: In file included from garcbox.c:24:0: garcbox.c: In function ‘g_atomic_rc_box_acquire’: grefcount.h:101:13: error: implicit declaration of function ‘g_atomic_int_get’; did you mean ‘__atomic_store’? [-Werror=implicit-function-declaration] (void) (g_atomic_int_get (rc) == G_MAXINT ? 0 : g_atomic_int_inc ((rc))); \ ^ garcbox.c:292:3: note: in expansion of macro ‘g_atomic_ref_count_inc’ g_atomic_ref_count_inc (&real_box->ref_count); Signed-off-by: Fabrice Fontaine --- glib/grefcount.h | 1 + 1 file changed, 1 insertion(+) diff --git a/glib/grefcount.h b/glib/grefcount.h index dec9a5ffb..b6eced1b7 100644 --- a/glib/grefcount.h +++ b/glib/grefcount.h @@ -23,6 +23,7 @@ #error "Only can be included directly." #endif +#include #include G_BEGIN_DECLS From 452eb1df01b2c1cc8b9c105bb874af1252c76bf6 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mon, 15 Oct 2018 21:50:31 +0000 Subject: [PATCH 2/2] build-sys: Pass CFLAGS to $(DTRACE) Fedora is using https://fedoraproject.org/wiki/Changes/Annobin to try to ensure that all objects are built with hardening flags. Pass down `CFLAGS` to ensure the SystemTap objects use them. --- gio/Makefile.am | 2 +- glib/Makefile.am | 2 +- gobject/Makefile.am | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gio/Makefile.am b/gio/Makefile.am index fc0b91855..05b20cdef 100644 --- a/gio/Makefile.am +++ b/gio/Makefile.am @@ -896,7 +896,7 @@ gio_probes.h: gio_probes.d < $@.tmp > $@ && rm -f $@.tmp gio_probes.lo: gio_probes.d - $(AM_V_GEN) $(LIBTOOL) --mode=compile $(AM_V_lt) --tag=CC $(DTRACE) -G -s $< -o $@ + $(AM_V_GEN) $(LIBTOOL) --mode=compile $(AM_V_lt) --tag=CC env CFLAGS="$(CFLAGS)" $(DTRACE) -G -s $< -o $@ BUILT_SOURCES += gio_probes.h gio_probes.lo CLEANFILES += gio_probes.h gio_probes.h.tmp diff --git a/glib/Makefile.am b/glib/Makefile.am index 90d33d082..39163aa7f 100644 --- a/glib/Makefile.am +++ b/glib/Makefile.am @@ -386,7 +386,7 @@ glib_probes.h: glib_probes.d < $@.tmp > $@ && rm -f $@.tmp glib_probes.lo: glib_probes.d - $(AM_V_GEN) $(LIBTOOL) --mode=compile $(AM_V_lt) --tag=CC $(DTRACE) -G -s $< -o $@ + $(AM_V_GEN) $(LIBTOOL) --mode=compile $(AM_V_lt) --tag=CC env CFLAGS="$(CFLAGS)" $(DTRACE) -G -s $< -o $@ BUILT_SOURCES += glib_probes.h glib_probes.lo CLEANFILES += glib_probes.h glib_probes.h.tmp diff --git a/gobject/Makefile.am b/gobject/Makefile.am index 4c28acdff..78748e96c 100644 --- a/gobject/Makefile.am +++ b/gobject/Makefile.am @@ -119,7 +119,7 @@ gobject_probes.h: gobject_probes.d < $@.tmp > $@ && rm -f $@.tmp gobject_probes.lo: gobject_probes.d - $(AM_V_GEN) $(LIBTOOL) --mode=compile $(AM_V_lt) --tag=CC $(DTRACE) -G -s $< -o $@ + $(AM_V_GEN) $(LIBTOOL) --mode=compile $(AM_V_lt) --tag=CC env CFLAGS="$(CFLAGS)" $(DTRACE) -G -s $< -o $@ BUILT_SOURCES += gobject_probes.h gobject_probes.lo CLEANFILES += gobject_probes.h