From b057abe9f4e96ffa890e82af480aa2199fa6f265 Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Mon, 18 May 2009 11:04:01 -0700 Subject: [PATCH] libdrm: Explicitly link test progs with $(CLOCK_LIB) for --as-needed Since dristat uses internal libdrm symbols, the linker seems to pull all of libdrm.so into the executable instead of looking up the symbols at runtime. When combined with using --as-needed, this can cause clock_gettime to fail to be resolved because the linker won't add a DT_NEEDED tag for libdrm.so or librt.so. This only happens with specific versions of libtool that don't add $dependency_libs. Work around this by specifically linking with $(CLOCK_LIB). Signed-off-by: Dan Nicholson --- tests/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index 98c106b..c33391f 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -2,7 +2,7 @@ AM_CPPFLAGS = \ -I $(top_srcdir)/shared-core \ -I $(top_srcdir)/libdrm -LDADD = $(top_builddir)/libdrm/libdrm.la +LDADD = $(top_builddir)/libdrm/libdrm.la $(CLOCK_LIB) noinst_PROGRAMS = \ dristat \ -- 1.6.0.6