From 7b939efa6fad289c2878c64c1edd932200cf5f33 Mon Sep 17 00:00:00 2001 From: Erik van Pienbroek Date: Thu, 8 Mar 2012 20:29:18 +0100 Subject: [PATCH] Use native glib-genmarshal when cross-compiling The ability to cross-compile glib got broken after the merge of the 'signal-performance' branch as the assumption was made that the generated glib-genmarshal can be executed on the host (which isn't valid when cross-compiling). Fixed this by using the just-built glib-genmarshal for normal compilations and the native (host) glib-genmarshal when doing a cross-compilation as was also done in several other areas of GLib Tested for host=x86_64-unknown-linux-gnu, target=x86_64-unknown-linux-gnu and host=x86_64-unknown-linux-gnu, target=i686-w64-mingw32 https://bugzilla.gnome.org/show_bug.cgi?id=671676 --- gobject/tests/Makefile.am | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gobject/tests/Makefile.am b/gobject/tests/Makefile.am index dec840dbf..a150b0a52 100644 --- a/gobject/tests/Makefile.am +++ b/gobject/tests/Makefile.am @@ -2,6 +2,12 @@ include $(top_srcdir)/Makefile.decl INCLUDES = -g $(gobject_INCLUDES) $(GLIB_DEBUG_FLAGS) +if CROSS_COMPILING + glib_genmarshal=$(GLIB_GENMARSHAL) +else + glib_genmarshal=$(top_builddir)/gobject/glib-genmarshal +endif + noinst_PROGRAMS = $(TEST_PROGS) LDADD = ../libgobject-2.0.la $(top_builddir)/gthread/libgthread-2.0.la $(top_builddir)/glib/libglib-2.0.la @@ -21,10 +27,10 @@ TEST_PROGS += \ signals_SOURCES = signals.c marshalers.c marshalers.h: Makefile.am marshalers.list - $(AM_V_GEN) ../glib-genmarshal --prefix=test $(srcdir)/marshalers.list --header --valist-marshallers > marshalers.h + $(AM_V_GEN) $(glib_genmarshal) --prefix=test $(srcdir)/marshalers.list --header --valist-marshallers > marshalers.h marshalers.c: Makefile.am marshalers.list - $(AM_V_GEN) ../glib-genmarshal --prefix=test $(srcdir)/marshalers.list --body --valist-marshallers > marshalers.c + $(AM_V_GEN) $(glib_genmarshal) --prefix=test $(srcdir)/marshalers.list --body --valist-marshallers > marshalers.c BUILT_SOURCES = marshalers.h marshalers.c CLEANFILES = marshalers.h marshalers.c