From a5044a8e78eeab79172a28991c4676e19b2bdbfa Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Sun, 7 Aug 2016 11:24:41 +0100 Subject: [PATCH] build: Fix SystemTap build to disable semaphores as before MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit At some point, upstream SystemTap changed from using a STAP_HAS_SEMAPHORES preprocessor variable for this, to using _SDT_HAS_SEMAPHORES instead. We need to update our build system to disable that as well. The original discussion about use of semaphores is here: https://bugzilla.gnome.org/show_bug.cgi?id=606044 This was breaking the build with -flto enabled, either because -flto doesn’t work with semaphores. https://bugzilla.gnome.org/show_bug.cgi?id=768198 --- gio/Makefile.am | 5 ++++- glib/Makefile.am | 5 ++++- gobject/Makefile.am | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/gio/Makefile.am b/gio/Makefile.am index ce1c2abda..ffe5ee28a 100644 --- a/gio/Makefile.am +++ b/gio/Makefile.am @@ -818,7 +818,10 @@ dist_its_DATA = gschema.loc gschema.its if ENABLE_DTRACE gio_probes.h: gio_probes.d $(AM_V_GEN) $(DTRACE) -C -h -s $< -o $@.tmp - @$(SED) -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," < $@.tmp > $@ && rm -f $@.tmp + @$(SED) \ + -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," \ + -e "s,define _SDT_HAS_SEMAPHORES 1,undef _SDT_HAS_SEMAPHORES," \ + < $@.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 $@ diff --git a/glib/Makefile.am b/glib/Makefile.am index 0726b58a8..82a7d3a2a 100644 --- a/glib/Makefile.am +++ b/glib/Makefile.am @@ -364,7 +364,10 @@ INSTALL_PROGS= if ENABLE_DTRACE glib_probes.h: glib_probes.d $(AM_V_GEN) $(DTRACE) -C -h -s $< -o $@.tmp - @$(SED) -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," < $@.tmp > $@ && rm -f $@.tmp + @$(SED) \ + -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," \ + -e "s,define _SDT_HAS_SEMAPHORES 1,undef _SDT_HAS_SEMAPHORES," \ + < $@.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 $@ diff --git a/gobject/Makefile.am b/gobject/Makefile.am index 04b8e1362..948e86974 100644 --- a/gobject/Makefile.am +++ b/gobject/Makefile.am @@ -113,7 +113,10 @@ if ENABLE_DTRACE gobject_probes.h: gobject_probes.d $(AM_V_GEN) $(DTRACE) -C -h -s $< -o $@.tmp - @$(SED) -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," < $@.tmp > $@ && rm -f $@.tmp + @$(SED) \ + -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," \ + -e "s,define _SDT_HAS_SEMAPHORES 1,undef _SDT_HAS_SEMAPHORES," \ + < $@.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 $@