[Piglit] [PATCH 2/2] cmake: Link test utils with "-ldl"

Jussi Kukkonen jussi.kukkonen at intel.com
Mon Aug 29 08:39:56 UTC 2016


Without this linking CXX executables (e.g. fbo-blit-stretch) fails
with gold linker:

| libpiglitutil_gl.so.0: error: undefined reference to 'dlsym'
| libpiglitutil_gl.so.0: error: undefined reference to 'dlerror'
| libpiglitutil_gl.so.0: error: undefined reference to 'dlopen'

Signed-off-by: Jussi Kukkonen <jussi.kukkonen at intel.com>
---
 tests/util/CMakeLists.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/util/CMakeLists.txt b/tests/util/CMakeLists.txt
index e1f8073..dc3ccc1 100644
--- a/tests/util/CMakeLists.txt
+++ b/tests/util/CMakeLists.txt
@@ -110,6 +110,7 @@ else()
 endif()
 
 if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+	link_libraries(dl)
 	# One needs to have at least one hardware driver present, otherwise
 	# there is no point compiling just the dispatcher.
 	if(PIGLIT_BUILD_DMA_BUF_TESTS)
-- 
2.9.3



More information about the Piglit mailing list