aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-graphics/tigervnc/files/0004-tigervnc-add-fPIC-option-to-COMPILE_FLAGS.patch
blob: 97b0a388a24d36088f6f8fec9b4c91019ded67d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
From 9563b69640227da2220ee0c39077afb736cc96d1 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Thu, 20 Jul 2017 17:12:17 +0800
Subject: [PATCH 4/4] tigervnc: add fPIC option to COMPILE_FLAGS

The static libraries in Xregion/network/rdr/rfb were linked by shared
library libvnc.so, so we should add fPIC option to COMPILE_FLAGS to fix
relocation issue.

Upstream-Status: Pending

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 common/Xregion/CMakeLists.txt | 1 +
 common/network/CMakeLists.txt | 1 +
 common/rdr/CMakeLists.txt     | 1 +
 common/rfb/CMakeLists.txt     | 1 +
 4 files changed, 4 insertions(+)

diff --git a/common/Xregion/CMakeLists.txt b/common/Xregion/CMakeLists.txt
index 40ca97e..9411328 100644
--- a/common/Xregion/CMakeLists.txt
+++ b/common/Xregion/CMakeLists.txt
@@ -3,4 +3,5 @@ add_library(Xregion STATIC
 
 if(UNIX)
   libtool_create_control_file(Xregion)
+  set_target_properties(Xregion PROPERTIES COMPILE_FLAGS -fPIC)
 endif()
diff --git a/common/network/CMakeLists.txt b/common/network/CMakeLists.txt
index b624c8e..6c06ec9 100644
--- a/common/network/CMakeLists.txt
+++ b/common/network/CMakeLists.txt
@@ -9,4 +9,5 @@ endif()
 
 if(UNIX)
   libtool_create_control_file(network)
+  set_target_properties(network PROPERTIES COMPILE_FLAGS -fPIC)
 endif()
diff --git a/common/rdr/CMakeLists.txt b/common/rdr/CMakeLists.txt
index 989ba2f..20f6489 100644
--- a/common/rdr/CMakeLists.txt
+++ b/common/rdr/CMakeLists.txt
@@ -27,4 +27,5 @@ target_link_libraries(rdr ${RDR_LIBRARIES})
 
 if(UNIX)
   libtool_create_control_file(rdr)
+  set_target_properties(rdr PROPERTIES COMPILE_FLAGS -fPIC)
 endif()
diff --git a/common/rfb/CMakeLists.txt b/common/rfb/CMakeLists.txt
index 5047e5e..88838ab 100644
--- a/common/rfb/CMakeLists.txt
+++ b/common/rfb/CMakeLists.txt
@@ -98,4 +98,5 @@ target_link_libraries(rfb ${RFB_LIBRARIES})
 
 if(UNIX)
   libtool_create_control_file(rfb)
+  set_target_properties(rfb PROPERTIES COMPILE_FLAGS -fPIC)
 endif()
-- 
2.7.4