Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 1 | From 9563b69640227da2220ee0c39077afb736cc96d1 Mon Sep 17 00:00:00 2001 |
| 2 | From: Hongxu Jia <hongxu.jia@windriver.com> |
| 3 | Date: Thu, 20 Jul 2017 17:12:17 +0800 |
| 4 | Subject: [PATCH 4/4] tigervnc: add fPIC option to COMPILE_FLAGS |
| 5 | |
| 6 | The static libraries in Xregion/network/rdr/rfb were linked by shared |
| 7 | library libvnc.so, so we should add fPIC option to COMPILE_FLAGS to fix |
| 8 | relocation issue. |
| 9 | |
| 10 | Upstream-Status: Pending |
| 11 | |
| 12 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> |
| 13 | --- |
| 14 | common/Xregion/CMakeLists.txt | 1 + |
| 15 | common/network/CMakeLists.txt | 1 + |
| 16 | common/rdr/CMakeLists.txt | 1 + |
| 17 | common/rfb/CMakeLists.txt | 1 + |
| 18 | 4 files changed, 4 insertions(+) |
| 19 | |
| 20 | diff --git a/common/Xregion/CMakeLists.txt b/common/Xregion/CMakeLists.txt |
| 21 | index 40ca97e..9411328 100644 |
| 22 | --- a/common/Xregion/CMakeLists.txt |
| 23 | +++ b/common/Xregion/CMakeLists.txt |
| 24 | @@ -3,4 +3,5 @@ add_library(Xregion STATIC |
| 25 | |
| 26 | if(UNIX) |
| 27 | libtool_create_control_file(Xregion) |
| 28 | + set_target_properties(Xregion PROPERTIES COMPILE_FLAGS -fPIC) |
| 29 | endif() |
| 30 | diff --git a/common/network/CMakeLists.txt b/common/network/CMakeLists.txt |
| 31 | index b624c8e..6c06ec9 100644 |
| 32 | --- a/common/network/CMakeLists.txt |
| 33 | +++ b/common/network/CMakeLists.txt |
| 34 | @@ -9,4 +9,5 @@ endif() |
| 35 | |
| 36 | if(UNIX) |
| 37 | libtool_create_control_file(network) |
| 38 | + set_target_properties(network PROPERTIES COMPILE_FLAGS -fPIC) |
| 39 | endif() |
| 40 | diff --git a/common/rdr/CMakeLists.txt b/common/rdr/CMakeLists.txt |
| 41 | index 989ba2f..20f6489 100644 |
| 42 | --- a/common/rdr/CMakeLists.txt |
| 43 | +++ b/common/rdr/CMakeLists.txt |
| 44 | @@ -27,4 +27,5 @@ target_link_libraries(rdr ${RDR_LIBRARIES}) |
| 45 | |
| 46 | if(UNIX) |
| 47 | libtool_create_control_file(rdr) |
| 48 | + set_target_properties(rdr PROPERTIES COMPILE_FLAGS -fPIC) |
| 49 | endif() |
| 50 | diff --git a/common/rfb/CMakeLists.txt b/common/rfb/CMakeLists.txt |
| 51 | index 5047e5e..88838ab 100644 |
| 52 | --- a/common/rfb/CMakeLists.txt |
| 53 | +++ b/common/rfb/CMakeLists.txt |
| 54 | @@ -98,4 +98,5 @@ target_link_libraries(rfb ${RFB_LIBRARIES}) |
| 55 | |
| 56 | if(UNIX) |
| 57 | libtool_create_control_file(rfb) |
| 58 | + set_target_properties(rfb PROPERTIES COMPILE_FLAGS -fPIC) |
| 59 | endif() |
| 60 | -- |
| 61 | 2.7.4 |
| 62 | |