aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-devtools/codexl/codexl/0005-set-the-LIBPATH-for-cross-compile.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-devtools/codexl/codexl/0005-set-the-LIBPATH-for-cross-compile.patch')
-rw-r--r--meta-amd-bsp/recipes-devtools/codexl/codexl/0005-set-the-LIBPATH-for-cross-compile.patch197
1 files changed, 197 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-devtools/codexl/codexl/0005-set-the-LIBPATH-for-cross-compile.patch b/meta-amd-bsp/recipes-devtools/codexl/codexl/0005-set-the-LIBPATH-for-cross-compile.patch
new file mode 100644
index 00000000..911d5cbc
--- /dev/null
+++ b/meta-amd-bsp/recipes-devtools/codexl/codexl/0005-set-the-LIBPATH-for-cross-compile.patch
@@ -0,0 +1,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
+