diff options
author | Alan Coopersmith <alan.coopersmith@sun.com> | 2009-09-15 19:17:48 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@sun.com> | 2009-10-07 17:23:44 -0700 |
commit | 22fd21a71d3dc98a94cc5f6592832e1d19bb479a (patch) | |
tree | 6b8c30a86e517bfe78775248a5ea8ee350a9b80f | |
parent | 8e3299eee8c2d909f34ec070f6f606a278c46330 (diff) |
Fix build of unit tests when dtrace probes are enabled
ar loses the dtrace probe magic when building static libraries, so we
have to link with the .O files in order to resolve the dtrace probe symbols.
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | dix/Makefile.am | 4 | ||||
-rw-r--r-- | test/Makefile.am | 4 | ||||
-rw-r--r-- | test/xi2/Makefile.am | 4 |
4 files changed, 12 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index a0bcd7d3b..531316917 100644 --- a/configure.ac +++ b/configure.ac @@ -1254,6 +1254,8 @@ else DIX_LIB='$(top_builddir)/dix/libdix.la' OS_LIB='$(top_builddir)/os/libos.la' fi +AC_SUBST([DIX_LIB]) +AC_SUBST([OS_LIB]) MAIN_LIB='$(top_builddir)/dix/libmain.la' AC_SUBST([MAIN_LIB]) diff --git a/dix/Makefile.am b/dix/Makefile.am index 23fe46007..85a8767d2 100644 --- a/dix/Makefile.am +++ b/dix/Makefile.am @@ -57,12 +57,12 @@ Xserver-dtrace.h: $(srcdir)/Xserver.d if !XQUARTZ # Generate dtrace object code for probes in libdix dtrace-dix.o: $(top_srcdir)/dix/Xserver.d $(am_libdix_la_OBJECTS) - $(DTRACE) -G -C -o $@ -s $(top_srcdir)/dix/Xserver.d .libs/*.o + $(DTRACE) -G -C -o $@ -s $(top_srcdir)/dix/Xserver.d $(am_libdix_la_OBJECTS:%.lo=.libs/%.o) noinst_PROGRAMS = dix.O dix.O: dtrace-dix.o $(am_libdix_la_OBJECTS) - ld -r -o $@ .libs/*.o + ld -r -o $@ $(am_libdix_la_OBJECTS:%.lo=.libs/%.o) endif endif diff --git a/test/Makefile.am b/test/Makefile.am index d8d89852b..1bd76f587 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -9,6 +9,10 @@ AM_CFLAGS = $(DIX_CFLAGS) $(GLIB_CFLAGS) @XORG_CFLAGS@ INCLUDES = @XORG_INCS@ TEST_LDADD=libxservertest.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) $(GLIB_LIBS) +if XSERVER_DTRACE +TEST_LDADD += $(OS_LIB) $(DIX_LIB) +endif + xkb_LDADD=$(TEST_LDADD) input_LDADD=$(TEST_LDADD) xtest_LDADD=$(TEST_LDADD) diff --git a/test/xi2/Makefile.am b/test/xi2/Makefile.am index b8362ca8b..ef6d0f0ab 100644 --- a/test/xi2/Makefile.am +++ b/test/xi2/Makefile.am @@ -17,6 +17,10 @@ INCLUDES = @XORG_INCS@ TEST_LDADD=../libxservertest.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) $(GLIB_LIBS) COMMON_SOURCES=protocol-common.h protocol-common.c +if XSERVER_DTRACE +TEST_LDADD += $(OS_LIB) $(DIX_LIB) +endif + protocol_xiqueryversion_LDADD=$(TEST_LDADD) protocol_xiquerydevice_LDADD=$(TEST_LDADD) protocol_xiselectevents_LDADD=$(TEST_LDADD) |