Skip to contentSkip to conversation

build: Add -lm to tests

PATCH New Damien Lespiau 1 participant 1 message Jul 2, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 build: Add -lm to tests

Since the introduction of igt_stats and its usage in gem_exec_nop, we need to link the tests against libm. My rebasing bot complained when linking gem_exec_nop:

lib/igt_stats.c:492: undefined reference to `sqrt'

---
 tests/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/Makefile.am +1 -1
index d5fb4fd..dcac2f3 100644
@@ -50,7 +50,7 @@ AM_CFLAGS = $(DRM_CFLAGS) $(CWARNFLAGS) $(DEBUG_CFLAGS)\
 
 LDADD = ../lib/libintel_tools.la $(PCIACCESS_LIBS) $(DRM_LIBS) $(LIBUNWIND_LIBS)
 
-LDADD += $(CAIRO_LIBS) $(LIBUDEV_LIBS) $(GLIB_LIBS)
+LDADD += $(CAIRO_LIBS) $(LIBUDEV_LIBS) $(GLIB_LIBS) -lm
 AM_CFLAGS += $(CAIRO_CFLAGS) $(LIBUDEV_CFLAGS) $(GLIB_CFLAGS)
 
 drm_import_export_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS)
Signature · 6 lines
2.1.0

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx