aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-devtools/codexl/codexl/0005-set-the-LIBPATH-for-cross-compile.patch
blob: 911d5cbc14e49875677e829df760318032b369dc (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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
From 70708ca44550ec99c2173affcc1d585fd24ecde6 Mon Sep 17 00:00:00 2001
From: Adeel Arshad <adeel_arshad@mentor.com>
Date: Fri, 7 Oct 2016 15:55:13 +0500
Subject: [PATCH] set the LIBPATH for cross compile

Prefix the library directories with the sysroot directory,
so that it would become compatible for cross compilation.

Signed-off-by: Adeel Arshad <adeel_arshad@mentor.com>
---
 .../GpuDebugging/AMDTRemoteDebuggingServer/SConscript        |  4 ++--
 CodeXL/App/SConscript                                        |  2 +- 
 CodeXL/Components/Graphics/SConstruct                        |  6 +++---
 CodeXL/Examples/AMDTTeaPot/AMDTTeaPot/SConscript             | 12 ++++++------
 CodeXL/Utils/AMDTSystemInformationHelper/SConscript          |  2 +-
 Common/Src/AMDTApplication/SConscript                        |  2 +-
 Common/Src/AMDTApplicationComponents/SConscript              |  2 +-
 Common/Src/AMDTOSAPIWrappers/SConscript                      |  6 +++---
 Common/Src/AMDTOSWrappers/SConscript                         |  4 ++--
 Common/Src/AMDTOSWrappers/SConscriptHSA                      |  4 ++--
 10 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/CodeXL/App/SConscript b/CodeXL/App/SConscript
index a60cca4..4924c4a 100755
--- a/CodeXL/App/SConscript
+++ b/CodeXL/App/SConscript
@@ -15,7 +15,7 @@ env.Append( CPPPATH = [
     env['CXL_commonproj_dir'],
     env['CXL_commonproj_dir'] + "/AMDTOSWrappers/Include",
     env['CXL_commonproj_dir'] + '/../../CodeXL',
-    "/usr/include/gdk-pixbuf-2.0/", # [Suravee] Needed for Ubuntu-11.10 
+    env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/gdk-pixbuf-2.0/", # [Suravee] Needed for Ubuntu-11.10 
 ])
 UseBoost(env)
 UseGtk(env)
diff --git a/CodeXL/Components/GpuDebugging/AMDTRemoteDebuggingServer/SConscript b/CodeXL/Components/GpuDebugging/AMDTRemoteDebuggingServer/SConscript
index 9cc1c6e..ffe3387 100755
--- a/CodeXL/Components/GpuDebugging/AMDTRemoteDebuggingServer/SConscript
+++ b/CodeXL/Components/GpuDebugging/AMDTRemoteDebuggingServer/SConscript
@@ -27,8 +27,8 @@ sources = \
 ]
 
 env.Append( LIBPATH = [
-    "/usr/lib",
-    "/usr/lib/x86_64-linux-gnu",
+    env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/lib",
+    env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/lib/x86_64-linux-gnu",
     env['CXL_common_dir'] + "/Lib/Ext/zlib/1.2.8/bin/x64/ZlibStatRelease/"
 ])
 
diff --git a/CodeXL/Components/Graphics/SConstruct b/CodeXL/Components/Graphics/SConstruct
index 71defea..d2a6cca 100644
--- a/CodeXL/Components/Graphics/SConstruct
+++ b/CodeXL/Components/Graphics/SConstruct
@@ -154,9 +154,9 @@ GPS_env['GPS_PATH'] = \
 # Additional linker library paths
 GPS_env['GPS_LIBPATH'] = \
 [
-    '/usr/' + GPS_env.libConfig,
-    '/usr/lib',
-    '/usr/lib/' + GPS_env.gnuConfig,
+    env['PKG_CONFIG_SYSROOT_DIR'] + '/usr/' + GPS_env.libConfig,
+    env['PKG_CONFIG_SYSROOT_DIR'] + '/usr/lib',
+    env['PKG_CONFIG_SYSROOT_DIR'] + '/usr/lib/' + GPS_env.gnuConfig,
     '../../obj/' + GPS_env.platformPath + '/' + GPS_env.rootFolderName + '/Server/Common',
     '../../obj/' + GPS_env.platformPath + '/' + GPS_env.rootFolderName,
     GPS_env.CommonPath + '../../Common/Lib/Ext/Boost/boost_' + GPS_env.BoostVersion + '/lib/RHEL6/' + GPS_env.extConfig,
diff --git a/CodeXL/Examples/AMDTTeaPot/AMDTTeaPot/SConscript b/CodeXL/Examples/AMDTTeaPot/AMDTTeaPot/SConscript
index 2b7d33d..0c6d61c 100755
--- a/CodeXL/Examples/AMDTTeaPot/AMDTTeaPot/SConscript
+++ b/CodeXL/Examples/AMDTTeaPot/AMDTTeaPot/SConscript
@@ -21,16 +21,16 @@ env.Append( CPPPATH = [
     "../AMDTTeaPotLib",
     env['CXL_commonproj_dir'] + "/AMDTOSWrappers/Include",
     env['CXL_commonproj_dir'] + "/AMDT/Include",
-    "/usr/include/GL",
-    "/usr/include/freetype2",
-    "/usr/include/libpng12",
-    "/usr/lib/x86_64-linux-gnu/glib-2.0/include",
-    "/usr/include/freetype2",
+    env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/GL",
+    env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/freetype2",
+    env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/libpng12",
+    env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/lib/x86_64-linux-gnu/glib-2.0/include",
+    env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/freetype2",
 
 ])
 
 env.Append( LIBPATH = [
-    "/usr/lib/x86_64-linux-gnu/mesa",
+    env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/lib/x86_64-linux-gnu/mesa",
     env['CXL_Examples_dir']  + "/release",
 ])
 
diff --git a/CodeXL/Utils/AMDTSystemInformationHelper/SConscript b/CodeXL/Utils/AMDTSystemInformationHelper/SConscript
index bf6a62f..a46a66d 100755
--- a/CodeXL/Utils/AMDTSystemInformationHelper/SConscript
+++ b/CodeXL/Utils/AMDTSystemInformationHelper/SConscript
@@ -23,7 +23,7 @@ env.Append( CPPPATH = [
 # env.Append(CPPFLAGS = '-fno-strict-aliasing')
 
 env.Append( LIBPATH = [
-    "/usr/lib",
+    env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/lib",
 ])
 
 sources = \
diff --git a/Common/Src/AMDTApplication/SConscript b/Common/Src/AMDTApplication/SConscript
index a260b5c..f284f23 100755
--- a/Common/Src/AMDTApplication/SConscript
+++ b/Common/Src/AMDTApplication/SConscript
@@ -15,7 +15,7 @@ env.Append( CPPPATH = [
     env['CXL_commonproj_dir'],
     env['CXL_commonproj_dir'] + "/AMDTOSWrappers/Include",
     env['CXL_commonproj_dir'] + '/../../CodeXL',
-    "/usr/include/gdk-pixbuf-2.0/", # [Suravee] Needed for Ubuntu-11.10 
+    env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/gdk-pixbuf-2.0/", # [Suravee] Needed for Ubuntu-11.10 
 ])
 
 UseGtk(env)
diff --git a/Common/Src/AMDTApplicationComponents/SConscript b/Common/Src/AMDTApplicationComponents/SConscript
index c214bf8..97bf9ff 100755
--- a/Common/Src/AMDTApplicationComponents/SConscript
+++ b/Common/Src/AMDTApplicationComponents/SConscript
@@ -15,7 +15,7 @@ env.Append( CPPPATH = [
     env['CXL_commonproj_dir'],
     env['CXL_commonproj_dir'] + "/AMDTOSAPIWrappers/Include",
     env['CXL_commonproj_dir'] + '/../../CodeXL',
-    "/usr/include/gdk-pixbuf-2.0/", # [Suravee] Needed for Ubuntu-11.10 
+    env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/gdk-pixbuf-2.0/", # [Suravee] Needed for Ubuntu-11.10 
 ])
 
 
diff --git a/Common/Src/AMDTOSAPIWrappers/SConscript b/Common/Src/AMDTOSAPIWrappers/SConscript
index b428271..630bcc1 100644
--- a/Common/Src/AMDTOSAPIWrappers/SConscript
+++ b/Common/Src/AMDTOSAPIWrappers/SConscript
@@ -17,7 +17,7 @@ env.Append( CPPPATH = [
     env['CXL_common_dir'] + '/Src/HSAUtils',
 	'/opt/rocm/hsa/include', # A dependency of /Src/HSAUtils
     env['CXL_common_dir'] + '/Src/TSingleton',
-    "/usr/include/gdk-pixbuf-2.0/", # [Suravee] Needed for Ubuntu-11.10 
+    env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/gdk-pixbuf-2.0/", # [Suravee] Needed for Ubuntu-11.10 
 ])
 
 # osMessageBox, osDesktop
@@ -66,8 +66,8 @@ if (env['CXL_arch'] != 'x86' and env['CXL_hsa'] == 'true'):
 objFiles = env.SharedObject(sources)
 
 env.Append( LIBPATH = [
-    "/usr/lib",
-    "/usr/lib/x86_64-linux-gnu",
+    env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/lib",
+    env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/lib/x86_64-linux-gnu",
     env['CXL_common_dir'] + "/Lib/Ext/zlib/1.2.8/bin/x64/ZlibStatRelease/"
 ])
 
diff --git a/Common/Src/AMDTOSWrappers/SConscript b/Common/Src/AMDTOSWrappers/SConscript
index f779a10..c8fca6c 100755
--- a/Common/Src/AMDTOSWrappers/SConscript
+++ b/Common/Src/AMDTOSWrappers/SConscript
@@ -20,7 +20,7 @@ env.Append( CPPPATH = [
     "./Include/",
     env['CXL_commonproj_dir'],
 	env['CXL_common_dir'] + '/Src/Miniz/',
-    "/usr/include/gdk-pixbuf-2.0/", # [Suravee] Needed for Ubuntu-11.10 
+    env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/gdk-pixbuf-2.0/", # [Suravee] Needed for Ubuntu-11.10 
 ])
 
 env.Append(CPPFLAGS = '-fno-strict-aliasing')
@@ -154,7 +154,7 @@ objFiles = env.SharedObject(sources)
 objFilesC = env_no_c11.SharedObject(csources)
 
 env.Append( LIBPATH = [
-    "/usr/lib",
+    env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/lib",
     env['CXL_common_dir'] + "/Lib/Ext/zlib/1.2.8/bin/x64/ZlibStatRelease/"
 ])
 
diff --git a/Common/Src/AMDTOSWrappers/SConscriptHSA b/Common/Src/AMDTOSWrappers/SConscriptHSA
index 4e8423c..341205b 100755
--- a/Common/Src/AMDTOSWrappers/SConscriptHSA
+++ b/Common/Src/AMDTOSWrappers/SConscriptHSA
@@ -14,8 +14,8 @@ env.Append( CPPPATH = [
     "./src/",
     "./Include/",
     env['HWDBG_commonproj_dir'],
-    "/usr/include/gdk-pixbuf-2.0/", # [Suravee] Needed for Ubuntu-11.10 
-    "/usr/include/",
+    env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/gdk-pixbuf-2.0/", # [Suravee] Needed for Ubuntu-11.10 
+    env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/",
 ])
 
 # osMessageBox, osDesktop
-- 
1.9.1