Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame^] | 1 | Backport patch to fix build with gold linker. |
| 2 | |
| 3 | Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> |
| 4 | Upstream-Status: Backport |
| 5 | |
| 6 | |
| 7 | |
| 8 | From 93a7113485cf1c55fd7076116faf5b3a690706b2 Mon Sep 17 00:00:00 2001 |
| 9 | From: Jussi Kukkonen <jussi.kukkonen@intel.com> |
| 10 | Date: Tue, 30 Aug 2016 17:17:28 +0300 |
| 11 | Subject: [PATCH] cmake: Link test utils with "-ldl" |
| 12 | |
| 13 | Without this linking CXX executables (e.g. fbo-blit-stretch) fails |
| 14 | with gold linker: |
| 15 | |
| 16 | | libpiglitutil_gl.so.0: error: undefined reference to 'dlsym' |
| 17 | | libpiglitutil_gl.so.0: error: undefined reference to 'dlerror' |
| 18 | | libpiglitutil_gl.so.0: error: undefined reference to 'dlopen' |
| 19 | |
| 20 | Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> |
| 21 | Reviewed-by: Emil Velikov <emil.velikov@collabora.com> |
| 22 | --- |
| 23 | tests/util/CMakeLists.txt | 2 ++ |
| 24 | 1 file changed, 2 insertions(+) |
| 25 | |
| 26 | diff --git a/tests/util/CMakeLists.txt b/tests/util/CMakeLists.txt |
| 27 | index e1f8073..3d5bef5 100644 |
| 28 | --- a/tests/util/CMakeLists.txt |
| 29 | +++ b/tests/util/CMakeLists.txt |
| 30 | @@ -11,6 +11,8 @@ set_source_files_properties( |
| 31 | PROPERTIES GENERATED 1 |
| 32 | ) |
| 33 | |
| 34 | +link_libraries(${CMAKE_DL_LIBS}) |
| 35 | + |
| 36 | if(HAVE_LIBCACA) |
| 37 | link_libraries(caca) |
| 38 | endif() |
| 39 | -- |
| 40 | 2.9.3 |
| 41 | |