[Piglit] [PATCH 2/2] cmake: Link test utils with "-ldl"
Jussi Kukkonen
jussi.kukkonen at intel.com
Tue Aug 30 07:32:07 UTC 2016
On 29 August 2016 at 15:37, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> 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.
I'm about as far from cmake expert as one can be but that sounds like a
better solution to me.
Jussi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20160830/8e1ebf8a/attachment.html>
More information about the Piglit
mailing list