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>
This commit is contained in:
parent
9fa73be9fa
commit
e23bffc41b
|
@ -1249,6 +1249,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])
|
||||
|
|
|
@ -56,12 +56,12 @@ Xserver-dtrace.h: $(srcdir)/Xserver.d
|
|||
|
||||
# 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
|
||||
|
||||
dix.c:
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue