aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-graphics/tigervnc/files/0004-tigervnc-add-fPIC-option-to-COMPILE_FLAGS.patch
blob: 5f14665b8d4eea32f41dc166deacd4cdf238acb8 (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
From 7f8acd59bb2e54f9be25a98dd71534700a9e355a Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Mon, 19 Apr 2021 23:14:28 -0700
Subject: [PATCH] tigervnc: add fPIC option to COMPILE_FLAGS

The static libraries in 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>
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 common/network/CMakeLists.txt | 1 +
 common/rdr/CMakeLists.txt     | 1 +
 common/rfb/CMakeLists.txt     | 1 +
 3 files changed, 3 insertions(+)

diff --git a/common/network/CMakeLists.txt b/common/network/CMakeLists.txt
index d00ca452..e84e0290 100644
--- a/common/network/CMakeLists.txt
+++ b/common/network/CMakeLists.txt
@@ -16,4 +16,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 989ba2f4..20f6489d 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 fc5a37bf..7f5ce131 100644
--- a/common/rfb/CMakeLists.txt
+++ b/common/rfb/CMakeLists.txt
@@ -99,4 +99,5 @@ target_link_libraries(rfb ${RFB_LIBRARIES})
 
 if(UNIX)
   libtool_create_control_file(rfb)
+  set_target_properties(rfb PROPERTIES COMPILE_FLAGS -fPIC)
 endif()
-- 
2.30.2