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

Emil Velikov emil.l.velikov at gmail.com
Mon Aug 29 12:37:57 UTC 2016


On 29 August 2016 at 09:39, Jussi Kukkonen <jussi.kukkonen at intel.com> wrote:
> 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)
Worth using ${CMAKE_DL_LIBS} unconditionally ? It should expand
correctly on any platform as needed.

-Emil


More information about the Piglit mailing list