aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-devtools/codexl
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-devtools/codexl')
-rw-r--r--common/recipes-devtools/codexl/codexl/0001-cross-compile-compatibility.patch28
-rw-r--r--common/recipes-devtools/codexl/codexl/0002-set-the-scons-execution-environment.patch65
-rw-r--r--common/recipes-devtools/codexl/codexl/0003-set-the-scons-construction-environment.patch105
-rw-r--r--common/recipes-devtools/codexl/codexl/0004-set-the-CPPFLAGS-for-cross-compile.patch82
-rw-r--r--common/recipes-devtools/codexl/codexl/0005-set-the-LIBPATH-for-cross-compile.patch197
-rw-r--r--common/recipes-devtools/codexl/codexl/0006-modify-compiler_base_flags.patch28
-rw-r--r--common/recipes-devtools/codexl/codexl/0007-donot-use-the-local-copy-of-libstdc.patch46
-rw-r--r--common/recipes-devtools/codexl/codexl/0008-Examples-AMDTTeaPot-fix-a-null-pointer-exception.patch33
-rw-r--r--common/recipes-devtools/codexl/codexl/0009-remove-remote-agent-dependency-on-UI-components.patch33
-rw-r--r--common/recipes-devtools/codexl/codexl/0010-fix-CXL_env-update-code-position.patch71
-rw-r--r--common/recipes-devtools/codexl/codexl/0011-tune-gpu-profiler-backend-metadata-for-cross-compila.patch43
-rw-r--r--common/recipes-devtools/codexl/codexl/0012-pwrprof-driver-tune-metadata-for-crosscompile.patch21
-rw-r--r--common/recipes-devtools/codexl/codexl/0013-do-not-use-local-libGLEW.patch55
-rw-r--r--common/recipes-devtools/codexl/codexl/0014-do-not-use-local-tinyxml.patch107
-rw-r--r--common/recipes-devtools/codexl/codexl/0015-add-build-control-flag-CXL_RA_only.patch93
-rw-r--r--common/recipes-devtools/codexl/codexl/0016-add-build-control-flag-CXL_sysroot_dir.patch278
-rw-r--r--common/recipes-devtools/codexl/codexl/0017-add-tinxml-to-list-of-LIBS-for-CapturePlayer.patch32
-rw-r--r--common/recipes-devtools/codexl/codexl/amdtPwrProf.rules5
-rw-r--r--common/recipes-devtools/codexl/codexl/amdtPwrProf_mknod.sh3
-rw-r--r--common/recipes-devtools/codexl/codexl/codexl-remote-agent.service15
-rw-r--r--common/recipes-devtools/codexl/codexl/codexl_remote_agent.sh27
-rw-r--r--common/recipes-devtools/codexl/codexl_2.2.bb217
22 files changed, 1584 insertions, 0 deletions
diff --git a/common/recipes-devtools/codexl/codexl/0001-cross-compile-compatibility.patch b/common/recipes-devtools/codexl/codexl/0001-cross-compile-compatibility.patch
new file mode 100644
index 00000000..fa4c39b1
--- /dev/null
+++ b/common/recipes-devtools/codexl/codexl/0001-cross-compile-compatibility.patch
@@ -0,0 +1,28 @@
+From 9af68008d3ddc0f8deba2ef1f7fada8505779716 Mon Sep 17 00:00:00 2001
+From: Adeel Arshad <adeel_arshad@mentor.com>
+Date: Fri, 7 Oct 2016 12:15:26 +0500
+Subject: [PATCH] cross compile compatibility
+
+remove the fixed path that is used to set the location to
+look for python modules, we will set it by PYTHONPATH.
+
+Signed-off-by: Adeel Arshad <adeel_arshad@mentor.com>
+---
+ Common/Src/SCons/CXL_init.py | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/Common/Src/SCons/CXL_init.py b/Common/Src/SCons/CXL_init.py
+index d0a10a1..bf36509 100755
+--- a/Common/Src/SCons/CXL_init.py
++++ b/Common/Src/SCons/CXL_init.py
+@@ -10,7 +10,6 @@ import platform
+
+ def initCXLVars (CXL_vars) :
+ try:
+- sys.path.append("/usr/lib/scons/SCons/Variables/")
+ enum_mod = __import__("EnumVariable")
+ except ImportError:
+ print "Error: Could not import EnumVariable"
+--
+1.9.1
+
diff --git a/common/recipes-devtools/codexl/codexl/0002-set-the-scons-execution-environment.patch b/common/recipes-devtools/codexl/codexl/0002-set-the-scons-execution-environment.patch
new file mode 100644
index 00000000..ece37c0b
--- /dev/null
+++ b/common/recipes-devtools/codexl/codexl/0002-set-the-scons-execution-environment.patch
@@ -0,0 +1,65 @@
+From e71e75de5b4025cbb3e1b60e7b7ff1ec51bc6736 Mon Sep 17 00:00:00 2001
+From: Adeel Arshad <adeel_arshad@mentor.com>
+Date: Fri, 7 Oct 2016 12:29:54 +0500
+Subject: [PATCH] set the scons execution environment
+
+propogate the external environment to scons execution environment.
+
+Signed-off-by: Adeel Arshad <adeel_arshad@mentor.com>
+---
+ CodeXL/Components/GpuProfiling/Build/SConstruct | 2 +-
+ CodeXL/Components/Graphics/SConstruct | 4 +++-
+ CodeXL/SConstruct | 4 ++--
+ 3 files changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/CodeXL/Components/GpuProfiling/Build/SConstruct b/CodeXL/Components/GpuProfiling/Build/SConstruct
+index 6d13e0d..90a36bb 100755
+--- a/CodeXL/Components/GpuProfiling/Build/SConstruct
++++ b/CodeXL/Components/GpuProfiling/Build/SConstruct
+@@ -33,7 +33,7 @@ initCXLVars(CXL_vars)
+ #
+ CXL_env = Environment(
+ variables = CXL_vars,
+- ENV = {'PATH':os.environ['PATH']})
++ ENV = os.environ)
+
+ # CXL build initialization
+ initCXLBuild (CXL_env)
+diff --git a/CodeXL/Components/Graphics/SConstruct b/CodeXL/Components/Graphics/SConstruct
+index e46760d..92998aa 100644
+--- a/CodeXL/Components/Graphics/SConstruct
++++ b/CodeXL/Components/Graphics/SConstruct
+@@ -17,7 +17,9 @@ GPS_vars.Add('GPS_build', 'Set to release to build for release', 0)
+ GPS_vars.Add('GPS_arch', 'Set to x86 for 32 bit build', 0)
+
+ # Build the environment (base compiler options)
+-GPS_env = Environment(variables = GPS_vars)
++GPS_env = Environment(
++ variables = GPS_vars,
++ ENV = os.environ)
+ Help(GPS_vars.GenerateHelpText(GPS_env))
+
+ # Set the version of PerfAPI that is being used
+diff --git a/CodeXL/SConstruct b/CodeXL/SConstruct
+index 1016ed3..a602f6a 100755
+--- a/CodeXL/SConstruct
++++ b/CodeXL/SConstruct
+@@ -32,7 +32,7 @@ initCXLVars(CXL_vars)
+ #
+ CXL_env = Environment(
+ variables = CXL_vars,
+- ENV = {'PATH':os.environ['PATH']})
++ ENV = os.environ)
+
+ # CXL build initialization
+ initCXLBuild (CXL_env)
+@@ -675,4 +675,4 @@ Alias( target='APICommon' ,source=(GPSAPICommon_Obj))
+ Alias( target='VulkanServer' ,source=(VulkanServer))
+ Alias( target='CapturePlayer' ,source=(CapturePlayer))
+ Alias( target='GPUPerfServer' ,source=(GPUPerfServer))
+-Alias( target='VulkanEnv' , source=(VulkanEnv))
+\ No newline at end of file
++Alias( target='VulkanEnv' , source=(VulkanEnv))
+--
+1.9.1
+
diff --git a/common/recipes-devtools/codexl/codexl/0003-set-the-scons-construction-environment.patch b/common/recipes-devtools/codexl/codexl/0003-set-the-scons-construction-environment.patch
new file mode 100644
index 00000000..7b790d92
--- /dev/null
+++ b/common/recipes-devtools/codexl/codexl/0003-set-the-scons-construction-environment.patch
@@ -0,0 +1,105 @@
+From cc891c91c99e0240baad53a839f4a58219718248 Mon Sep 17 00:00:00 2001
+From: Adeel Arshad <adeel_arshad@mentor.com>
+Date: Fri, 7 Oct 2016 14:58:17 +0500
+Subject: [PATCH] set the scons construction environment
+
+propogate the external environment to scons construction environment.
+
+Signed-off-by: Adeel Arshad <adeel_arshad@mentor.com>
+---
+ CodeXL/Components/GpuProfiling/Build/SConstruct | 18 ++++++++++++++++++
+ CodeXL/Components/Graphics/SConstruct | 19 +++++++++++++++++++
+ CodeXL/SConstruct | 18 ++++++++++++++++++
+ 3 files changed, 55 insertions(+)
+
+diff --git a/CodeXL/Components/GpuProfiling/Build/SConstruct b/CodeXL/Components/GpuProfiling/Build/SConstruct
+index 90a36bb..94f5b6a 100755
+--- a/CodeXL/Components/GpuProfiling/Build/SConstruct
++++ b/CodeXL/Components/GpuProfiling/Build/SConstruct
+@@ -13,6 +13,24 @@ from CXL_init import *
+ #
+ CXL_vars = Variables(None)
+
++# update CXL_env as per the external environment
++# Set defaults from environment. Note that scons doesn't cope well
++# with multi-word CPPFLAGS/LDFLAGS/SHLINKFLAGS values; you'll have to
++# explicitly quote them or (better yet) use the "=" form of GNU option
++# settings.
++
++for key, value in os.environ.items():
++ if key in ("CFLAGS", "CCFLAGS", "LINKFLAGS"):
++ CXL_env.Replace(**{key: Split(os.getenv(key))})
++ elif key in ("LDFLAGS", "SHLINKFLAGS"):
++ pass
++ else:
++ CXL_env.Replace(**{key: os.getenv(key)})
++
++for flag in ["LDFLAGS", "SHLINKFLAGS"]:
++ if os.environ.has_key(flag):
++ CXL_env.MergeFlags({flag : [os.getenv(flag)]})
++
+ # Initial CXL_vars scons construction variables
+ initCXLVars(CXL_vars)
+
+diff --git a/CodeXL/Components/Graphics/SConstruct b/CodeXL/Components/Graphics/SConstruct
+index 92998aa..71defea 100644
+--- a/CodeXL/Components/Graphics/SConstruct
++++ b/CodeXL/Components/Graphics/SConstruct
+@@ -20,6 +20,25 @@ GPS_vars.Add('GPS_arch', 'Set to x86 for 32 bit build', 0)
+ GPS_env = Environment(
+ variables = GPS_vars,
+ ENV = os.environ)
++
++# update GPS_env as per the external environment
++# Set defaults from environment. Note that scons doesn't cope well
++# with multi-word CPPFLAGS/LDFLAGS/SHLINKFLAGS values; you'll have to
++# explicitly quote them or (better yet) use the "=" form of GNU option
++# settings.
++
++for key, value in os.environ.items():
++ if key in ("CFLAGS", "CCFLAGS", "LINKFLAGS"):
++ GPS_env.Replace(**{key: Split(os.getenv(key))})
++ elif key in ("LDFLAGS", "SHLINKFLAGS"):
++ pass
++ else:
++ GPS_env.Replace(**{key: os.getenv(key)})
++
++for flag in ["LDFLAGS", "SHLINKFLAGS"]:
++ if os.environ.has_key(flag):
++ GPS_env.MergeFlags({flag : [os.getenv(flag)]})
++
+ Help(GPS_vars.GenerateHelpText(GPS_env))
+
+ # Set the version of PerfAPI that is being used
+diff --git a/CodeXL/SConstruct b/CodeXL/SConstruct
+index a602f6a..8923020 100755
+--- a/CodeXL/SConstruct
++++ b/CodeXL/SConstruct
+@@ -34,6 +34,24 @@ CXL_env = Environment(
+ variables = CXL_vars,
+ ENV = os.environ)
+
++# update CXL_env as per the external environment
++# Set defaults from environment. Note that scons doesn't cope well
++# with multi-word CPPFLAGS/LDFLAGS/SHLINKFLAGS values; you'll have to
++# explicitly quote them or (better yet) use the "=" form of GNU option
++# settings.
++
++for key, value in os.environ.items():
++ if key in ("CFLAGS", "CCFLAGS", "LINKFLAGS"):
++ CXL_env.Replace(**{key: Split(os.getenv(key))})
++ elif key in ("LDFLAGS", "SHLINKFLAGS"):
++ pass
++ else:
++ CXL_env.Replace(**{key: os.getenv(key)})
++
++for flag in ["LDFLAGS", "SHLINKFLAGS"]:
++ if os.environ.has_key(flag):
++ CXL_env.MergeFlags({flag : [os.getenv(flag)]})
++
+ # CXL build initialization
+ initCXLBuild (CXL_env)
+
+--
+1.9.1
+
diff --git a/common/recipes-devtools/codexl/codexl/0004-set-the-CPPFLAGS-for-cross-compile.patch b/common/recipes-devtools/codexl/codexl/0004-set-the-CPPFLAGS-for-cross-compile.patch
new file mode 100644
index 00000000..e56914a6
--- /dev/null
+++ b/common/recipes-devtools/codexl/codexl/0004-set-the-CPPFLAGS-for-cross-compile.patch
@@ -0,0 +1,82 @@
+From cf1b8ce583d3dbbd8988d1c1b3c6d5c3ff4dc8d0 Mon Sep 17 00:00:00 2001
+From: Adeel Arshad <adeel_arshad@mentor.com>
+Date: Fri, 7 Oct 2016 15:35:53 +0500
+Subject: [PATCH] set the CPPFLAGS for cross compile
+
+Prefix the include directories with the sysroot directory,
+so that it would become compatible for cross compilation.
+
+Signed-off-by: Adeel Arshad <adeel_arshad@mentor.com>
+---
+ CodeXL/Components/Graphics/GPS_init.py | 20 ++++++++++----------
+ Common/Src/SCons/CXL_init.py | 22 +++++++++++-----------
+ 2 file changed, 21 insertions(+), 21 deletions(-)
+
+diff --git a/CodeXL/Components/Graphics/GPS_init.py b/CodeXL/Components/Graphics/GPS_init.py
+index 8b42027..805191d 100644
+--- a/CodeXL/Components/Graphics/GPS_init.py
++++ b/CodeXL/Components/Graphics/GPS_init.py
+@@ -47,16 +47,16 @@ def ParseCommandLine(env, buildInternal):
+ # initialize Gtk library
+ def initGtk(env):
+ env.Append(BASE_PATH = [
+- "/usr/include/cairo",
+- "/usr/include/pango-1.0",
+- "/usr/include/atk-1.0",
+- "/usr/include/gtk-2.0",
+- "/usr/include/gdk-pixbuf-2.0",
+- "/usr/include/glib-2.0",
+- "/usr/lib64/gtk-2.0/include",
+- "/usr/lib64/glib-2.0/include/",
+- "/usr/lib/x86_64-linux-gnu/glib-2.0/include",
+- "/usr/lib/x86_64-linux-gnu/gtk-2.0/include",
++ env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/cairo",
++ env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/pango-1.0",
++ env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/atk-1.0",
++ env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/gtk-2.0",
++ env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/gdk-pixbuf-2.0",
++ env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/glib-2.0",
++ env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/lib64/gtk-2.0/include",
++ env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/lib64/glib-2.0/include/",
++ env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/lib/x86_64-linux-gnu/glib-2.0/include",
++ env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/lib/x86_64-linux-gnu/gtk-2.0/include",
+ ])
+
+ ##########################################################################################
+
+diff --git a/Common/Src/SCons/CXL_init.py b/Common/Src/SCons/CXL_init.py
+index bf36509..0672013 100755
+--- a/Common/Src/SCons/CXL_init.py
++++ b/Common/Src/SCons/CXL_init.py
+@@ -433,17 +433,17 @@ def UseQtNoGraphics(env):
+
+ def initGtk (env) :
+ env.Append(CXL_Gtk_inc_path = [
+- "/usr/include/cairo",
+- "/usr/include/pango-1.0",
+- "/usr/include/atk-1.0",
+- "/usr/include/gtk-2.0",
+- "/usr/include/gdk-pixbuf-2.0",
+- "/usr/include/glib-2.0",
+- "/usr/lib64/gtk-2.0/include",
+- "/usr/lib64/glib-2.0/include/",
+- "/usr/lib/x86_64-linux-gnu/glib-2.0/include",
+- "/usr/lib/x86_64-linux-gnu/gtk-2.0/include",
+- "/usr/include/x86_64-linux-gnu/",
++ env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/cairo",
++ env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/pango-1.0",
++ env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/atk-1.0",
++ env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/gtk-2.0",
++ env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/gdk-pixbuf-2.0",
++ env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/glib-2.0",
++ env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/lib64/gtk-2.0/include",
++ env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/lib64/glib-2.0/include/",
++ env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/lib/x86_64-linux-gnu/glib-2.0/include",
++ env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/lib/x86_64-linux-gnu/gtk-2.0/include",
++ env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/x86_64-linux-gnu/",
+ ])
+ # No additional libraries needed for Gtk
+
+--
+1.9.1
+
diff --git a/common/recipes-devtools/codexl/codexl/0005-set-the-LIBPATH-for-cross-compile.patch b/common/recipes-devtools/codexl/codexl/0005-set-the-LIBPATH-for-cross-compile.patch
new file mode 100644
index 00000000..911d5cbc
--- /dev/null
+++ b/common/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
+
diff --git a/common/recipes-devtools/codexl/codexl/0006-modify-compiler_base_flags.patch b/common/recipes-devtools/codexl/codexl/0006-modify-compiler_base_flags.patch
new file mode 100644
index 00000000..f085631c
--- /dev/null
+++ b/common/recipes-devtools/codexl/codexl/0006-modify-compiler_base_flags.patch
@@ -0,0 +1,28 @@
+From a258f5aac8d3bc639ff7afa4a0c4f17ab23f353a Mon Sep 17 00:00:00 2001
+From: Adeel Arshad <adeel_arshad@mentor.com>
+Date: Fri, 7 Oct 2016 17:10:51 +0500
+Subject: [PATCH] modify compiler_base_flags
+
+Omit warning/error on unused and uninitialized variables.
+
+Signed-off-by: Adeel Arshad <adeel_arshad@mentor.com>
+---
+ Common/Src/SCons/CXL_init.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Common/Src/SCons/CXL_init.py b/Common/Src/SCons/CXL_init.py
+index 0672013..d9e3710 100755
+--- a/Common/Src/SCons/CXL_init.py
++++ b/Common/Src/SCons/CXL_init.py
+@@ -200,7 +200,7 @@ def initInstallDirs (env) :
+ env['ENV']['CXL_webhelp_dir'] = env['CXL_webhelp_dir']
+
+ def initCompilerFlags (env) :
+- compiler_base_flags = " -Wall -Werror -Wextra -g -fmessage-length=0 -Wno-unknown-pragmas -pthread -std=c++11 -D_LINUX"
++ compiler_base_flags = " -Wall -Werror -Wextra -g -fmessage-length=0 -Wno-unknown-pragmas -Wno-unused-variable -Wno-maybe-uninitialized -pthread -std=c++11 -D_LINUX -D_GLIBCXX_USE_CXX11_ABI=0"
+ linker_base_flags = ''
+
+ if (env['CXL_build'] == 'debug'):
+--
+1.9.1
+
diff --git a/common/recipes-devtools/codexl/codexl/0007-donot-use-the-local-copy-of-libstdc.patch b/common/recipes-devtools/codexl/codexl/0007-donot-use-the-local-copy-of-libstdc.patch
new file mode 100644
index 00000000..baf63dd6
--- /dev/null
+++ b/common/recipes-devtools/codexl/codexl/0007-donot-use-the-local-copy-of-libstdc.patch
@@ -0,0 +1,46 @@
+From 4ae524d973475da461a092ea969daf4f89c9b69c Mon Sep 17 00:00:00 2001
+From: Adeel Arshad <adeel_arshad@mentor.com>
+Date: Mon, 10 Oct 2016 16:43:16 +0500
+Subject: [PATCH] donot use the local copy of libstdc++
+
+For cross compilation it make more sense to not use the
+local copy of precompiled libstdc++ and it also resolves
+the build issues of undefined references,
+_M_start_thread,
+__throw_out_of_range_fmt,
+__cxa_throw_bad_array_new_length,
+std::logic_error::logic_error(char const*)
+
+Signed-off-by: Adeel Arshad <adeel_arshad@mentor.com>
+---
+ CodeXL/SConstruct | 1 -
+ CodeXL/Utils/AMDTSystemInformationHelper/Sconstruct | 1 -
+ 2 files changed, 2 deletions(-)
+
+diff --git a/CodeXL/SConstruct b/CodeXL/SConstruct
+index 8923020..e742ad3 100755
+--- a/CodeXL/SConstruct
++++ b/CodeXL/SConstruct
+@@ -65,7 +65,6 @@ initQt4 (CXL_env)
+ initTinyXml (CXL_env)
+ initQScintilla (CXL_env)
+ initQCustomPlot (CXL_env)
+-initStdc(CXL_env)
+ initJava(CXL_env)
+ initBoost(CXL_env)
+
+diff --git a/CodeXL/Utils/AMDTSystemInformationHelper/Sconstruct b/CodeXL/Utils/AMDTSystemInformationHelper/Sconstruct
+index cff9153..52ec223 100755
+--- a/CodeXL/Utils/AMDTSystemInformationHelper/Sconstruct
++++ b/CodeXL/Utils/AMDTSystemInformationHelper/Sconstruct
+@@ -46,7 +46,6 @@ initCXLBuild (CXL_env)
+ #
+ initGtk (CXL_env)
+ initTinyXml (CXL_env)
+-initStdc(CXL_env)
+ initBoost(CXL_env)
+
+ # Set the debug/release variant data
+--
+1.9.1
+
diff --git a/common/recipes-devtools/codexl/codexl/0008-Examples-AMDTTeaPot-fix-a-null-pointer-exception.patch b/common/recipes-devtools/codexl/codexl/0008-Examples-AMDTTeaPot-fix-a-null-pointer-exception.patch
new file mode 100644
index 00000000..0c95e4f6
--- /dev/null
+++ b/common/recipes-devtools/codexl/codexl/0008-Examples-AMDTTeaPot-fix-a-null-pointer-exception.patch
@@ -0,0 +1,33 @@
+From 50d21ce53601e97320ad1410f8e4f7275e9b4f5b Mon Sep 17 00:00:00 2001
+From: Adeel Arshad <adeel_arshad@mentor.com>
+Date: Mon, 17 Oct 2016 17:39:12 +0500
+Subject: [PATCH] Examples/AMDTTeaPot: fix a null pointer exception
+
+Check that whether _pAMDTTeapotOGLCanvas is initialized or
+not before calling it method onSize, otherwise it will generate
+NULL pointer exception or segmentation fault.
+
+Signed-off-by: Adeel Arshad <adeel_arshad@mentor.com>
+---
+ CodeXL/Examples/AMDTTeaPot/AMDTTeaPot/src/GLWindow.cpp | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/CodeXL/Examples/AMDTTeaPot/AMDTTeaPot/src/GLWindow.cpp b/CodeXL/Examples/AMDTTeaPot/AMDTTeaPot/src/GLWindow.cpp
+index d2755a2..4c7f6fa 100755
+--- a/CodeXL/Examples/AMDTTeaPot/AMDTTeaPot/src/GLWindow.cpp
++++ b/CodeXL/Examples/AMDTTeaPot/AMDTTeaPot/src/GLWindow.cpp
+@@ -127,7 +127,10 @@ void GLWindow::draw()
+ //
+ void GLWindow::resize(int X, int Y, int W, int H)
+ {
+- _pAMDTTeapotOGLCanvas->onSize(W, H);
++ if (NULL != _pAMDTTeapotOGLCanvas)
++ {
++ _pAMDTTeapotOGLCanvas->onSize(W, H);
++ }
+ swap_buffers();
+ Fl_Gl_Window::resize(X, Y, W, H);
+ }
+--
+1.9.1
+
diff --git a/common/recipes-devtools/codexl/codexl/0009-remove-remote-agent-dependency-on-UI-components.patch b/common/recipes-devtools/codexl/codexl/0009-remove-remote-agent-dependency-on-UI-components.patch
new file mode 100644
index 00000000..4b4eb3ab
--- /dev/null
+++ b/common/recipes-devtools/codexl/codexl/0009-remove-remote-agent-dependency-on-UI-components.patch
@@ -0,0 +1,33 @@
+From 93de63cac7192cde1fcfa880c22614039d04f220 Mon Sep 17 00:00:00 2001
+From: Adeel Arshad <adeel_arshad@mentor.com>
+Date: Tue, 18 Oct 2016 18:52:00 +0500
+Subject: [PATCH] remove remote agent dependency on UI components
+
+CXLRemoteDebuggingServer is dependent on the FrameworkComponents,
+and FrameworkComponents also includes the UI components that are
+not required for remote agent so remove the UI components from
+FrameworkComponents for the time being. Proper fix would be divide
+the FrameworkComponents into two subset, one will include the
+non UI components and second will include the UI components.
+
+Signed-off-by: Adeel Arshad <adeel_arshad@mentor.com>
+---
+ CodeXL/SConstruct | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CodeXL/SConstruct b/CodeXL/SConstruct
+index e742ad3..d469d98 100755
+--- a/CodeXL/SConstruct
++++ b/CodeXL/SConstruct
+@@ -185,7 +185,7 @@ FrameworkComponents += Application_Obj
+ # This depends upon everything built to date
+ Application_Obj = SConscript('App/SConscript', variant_dir=obj_variant_dir+'/AMDCodeXL', duplicate=0)
+ CXL_env.Depends(Application_Obj, FrameworkComponents)
+-FrameworkComponents += Application_Obj
++#FrameworkComponents += Application_Obj
+
+ SharedProf_Obj = SConscript('Components/AMDTSharedProfiling/SConscript', variant_dir=obj_variant_dir+'/AMDTSharedProfiling', duplicate=0)
+ CXL_env.Depends(SharedProf_Obj, FrameworkComponents)
+--
+1.9.1
+
diff --git a/common/recipes-devtools/codexl/codexl/0010-fix-CXL_env-update-code-position.patch b/common/recipes-devtools/codexl/codexl/0010-fix-CXL_env-update-code-position.patch
new file mode 100644
index 00000000..f2b3a849
--- /dev/null
+++ b/common/recipes-devtools/codexl/codexl/0010-fix-CXL_env-update-code-position.patch
@@ -0,0 +1,71 @@
+From ecb10eb6b59d46051f74cdd07e694e459a84e266 Mon Sep 17 00:00:00 2001
+From: Adeel Arshad <adeel_arshad@mentor.com>
+Date: Wed, 19 Oct 2016 16:05:08 +0500
+Subject: [PATCH] fix CXL_env update code position
+
+In CodeXL/Components/GpuProfiling/Build/SConstruct
+the position of code that was added to update the scons
+consturction environment, was incorrect.
+
+Signed-off-by: Adeel Arshad <adeel_arshad@mentor.com>
+---
+ CodeXL/Components/GpuProfiling/Build/SConstruct | 36 ++++++++++++-------------
+ 1 file changed, 18 insertions(+), 18 deletions(-)
+
+diff --git a/CodeXL/Components/GpuProfiling/Build/SConstruct b/CodeXL/Components/GpuProfiling/Build/SConstruct
+index 94f5b6a..a2e648f 100755
+--- a/CodeXL/Components/GpuProfiling/Build/SConstruct
++++ b/CodeXL/Components/GpuProfiling/Build/SConstruct
+@@ -13,24 +13,6 @@ from CXL_init import *
+ #
+ CXL_vars = Variables(None)
+
+-# update CXL_env as per the external environment
+-# Set defaults from environment. Note that scons doesn't cope well
+-# with multi-word CPPFLAGS/LDFLAGS/SHLINKFLAGS values; you'll have to
+-# explicitly quote them or (better yet) use the "=" form of GNU option
+-# settings.
+-
+-for key, value in os.environ.items():
+- if key in ("CFLAGS", "CCFLAGS", "LINKFLAGS"):
+- CXL_env.Replace(**{key: Split(os.getenv(key))})
+- elif key in ("LDFLAGS", "SHLINKFLAGS"):
+- pass
+- else:
+- CXL_env.Replace(**{key: os.getenv(key)})
+-
+-for flag in ["LDFLAGS", "SHLINKFLAGS"]:
+- if os.environ.has_key(flag):
+- CXL_env.MergeFlags({flag : [os.getenv(flag)]})
+-
+ # Initial CXL_vars scons construction variables
+ initCXLVars(CXL_vars)
+
+@@ -53,6 +35,24 @@ CXL_env = Environment(
+ variables = CXL_vars,
+ ENV = os.environ)
+
++# update CXL_env as per the external environment
++# Set defaults from environment. Note that scons doesn't cope well
++# with multi-word CPPFLAGS/LDFLAGS/SHLINKFLAGS values; you'll have to
++# explicitly quote them or (better yet) use the "=" form of GNU option
++# settings.
++
++for key, value in os.environ.items():
++ if key in ("CFLAGS", "CCFLAGS", "LINKFLAGS"):
++ CXL_env.Replace(**{key: Split(os.getenv(key))})
++ elif key in ("LDFLAGS", "SHLINKFLAGS"):
++ pass
++ else:
++ CXL_env.Replace(**{key: os.getenv(key)})
++
++for flag in ["LDFLAGS", "SHLINKFLAGS"]:
++ if os.environ.has_key(flag):
++ CXL_env.MergeFlags({flag : [os.getenv(flag)]})
++
+ # CXL build initialization
+ initCXLBuild (CXL_env)
+
+--
+1.9.1
+
diff --git a/common/recipes-devtools/codexl/codexl/0011-tune-gpu-profiler-backend-metadata-for-cross-compila.patch b/common/recipes-devtools/codexl/codexl/0011-tune-gpu-profiler-backend-metadata-for-cross-compila.patch
new file mode 100644
index 00000000..8c3989ab
--- /dev/null
+++ b/common/recipes-devtools/codexl/codexl/0011-tune-gpu-profiler-backend-metadata-for-cross-compila.patch
@@ -0,0 +1,43 @@
+From 639736601b7b546396867874cd5d600b84a13e79 Mon Sep 17 00:00:00 2001
+From: Adeel Arshad <adeel_arshad@mentor.com>
+Date: Wed, 19 Oct 2016 16:49:40 +0500
+Subject: [PATCH] tune gpu profiler backend metadata for cross compilation
+
+Signed-off-by: Adeel Arshad <adeel_arshad@mentor.com>
+---
+ CodeXL/Components/GpuProfiling/Build/Common.mk | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/CodeXL/Components/GpuProfiling/Build/Common.mk b/CodeXL/Components/GpuProfiling/Build/Common.mk
+index 0cf1431..4ab2d12 100755
+--- a/CodeXL/Components/GpuProfiling/Build/Common.mk
++++ b/CodeXL/Components/GpuProfiling/Build/Common.mk
+@@ -1,13 +1,13 @@
+-CC = g++
++CC = $(CXX)
+ OPTIMIZE = -O3 -DNDEBUG
+ DEBUG_CFLAGS = -g -O0 -D_DEBUG
+-ADDL_LINKFLAGS =
++ADDL_LINKFLAGS = $(LDFLAGS)
+ LINKFLAGS_EXE = $(ADDL_LINKFLAGS)
+ LINKFLAGS_SO = -shared -Wl,-z,defs $(ADDL_LINKFLAGS)
+ PLATFORM_CFLAG =
+ PLATFORM_LFLAG =
+ TARGET_SUFFIX =
+-ADDL_CFLAGS =
++ADDL_CFLAGS = $(CXXFLAGS)
+ CFLAGS = $(OPTIMIZE) -std=c++11 -fPIC -Wall -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-non-virtual-dtor -Wno-conversion-null -Werror -msse $(PLATFORM_CFLAG) $(ADDL_CFLAGS)
+ HSAFDN_CFLAGS =
+ PLATFORM_DIR = x64
+@@ -25,7 +25,7 @@ OBJ_DIR = $(BASE_OBJDIR)/$(DEBUG_RELEASE)$(INTERNAL_PUBLIC)/$(PLATFORM_DIR)
+ # Build defines
+ BASE_DEFINES = -D_LINUX -DUSE_POINTER_SINGLETON
+ ADDL_DEFINES =
+-ADDITIONAL_COMPILER_DEFINES_FROM_BUILD_SCRIPT =
++ADDITIONAL_COMPILER_DEFINES_FROM_BUILD_SCRIPT = -D_GLIBCXX_USE_CXX11_ABI=0
+ BUILD_DEFINES = -DGDT_PUBLIC -DGDT_BUILD_SUFFIX=\"\"
+ PLATFORM_DEFINES = -DGDT_PLATFORM_SUFFIX=\"\"
+ DEBUG_DEFINES = -DGDT_DEBUG_SUFFIX=\"\"
+--
+1.9.1
+
diff --git a/common/recipes-devtools/codexl/codexl/0012-pwrprof-driver-tune-metadata-for-crosscompile.patch b/common/recipes-devtools/codexl/codexl/0012-pwrprof-driver-tune-metadata-for-crosscompile.patch
new file mode 100644
index 00000000..bf128c9b
--- /dev/null
+++ b/common/recipes-devtools/codexl/codexl/0012-pwrprof-driver-tune-metadata-for-crosscompile.patch
@@ -0,0 +1,21 @@
+diff --git a/CodeXL/Components/PowerProfiling/Backend/AMDTPowerProfilingDrivers/Linux/Makefile b/CodeXL/Components/PowerProfiling/Backend/AMDTPowerProfilingDrivers/Linux/Makefile
+index 1c4323b..b609761 100755
+--- a/CodeXL/Components/PowerProfiling/Backend/AMDTPowerProfilingDrivers/Linux/Makefile
++++ b/CodeXL/Components/PowerProfiling/Backend/AMDTPowerProfilingDrivers/Linux/Makefile
+@@ -52,11 +52,14 @@ ${MODULE_NAME}-objs := src/AMDTPwrProfHwaccess.o src/AMDTPwrProfHelper.o src/AM
+
+ # make
+ all:
+- make -C /lib/modules/$(KERNEL_VERSION)/build M=$(PWD) $(MAKE_OPTS) EXTRA_CFLAGS="$(EXTRA_CFLAGS)" modules
++ $(MAKE) -C $(KERNEL_SRC) M=$(PWD) $(MAKE_OPTS) EXTRA_CFLAGS="$(EXTRA_CFLAGS)" modules
+
+ # make clean
+ clean:
+- make -C /lib/modules/$(KERNEL_VERSION)/build M=$(PWD) $(MAKE_OPTS) EXTRA_CFLAGS="$(EXTRA_CFLAGS)" clean
++ $(MAKE) -C $(KERNEL_SRC) M=$(PWD) $(MAKE_OPTS) EXTRA_CFLAGS="$(EXTRA_CFLAGS)" clean
++
++modules_install:
++ $(MAKE) -C $(KERNEL_SRC) M=$(PWD) modules_install
+
+ # make install
+ install:
diff --git a/common/recipes-devtools/codexl/codexl/0013-do-not-use-local-libGLEW.patch b/common/recipes-devtools/codexl/codexl/0013-do-not-use-local-libGLEW.patch
new file mode 100644
index 00000000..9b68f606
--- /dev/null
+++ b/common/recipes-devtools/codexl/codexl/0013-do-not-use-local-libGLEW.patch
@@ -0,0 +1,55 @@
+From 764b1b29ab720fc3fed6e2f183facf43e69d8ed5 Mon Sep 17 00:00:00 2001
+From: Michael <michael_powell@mentor.com>
+Date: Thu, 13 Oct 2016 08:38:01 -0700
+Subject: [PATCH] do not use local libGLEW
+
+---
+ Common/Src/SCons/CXL_init.py | 24 ++++++++++++++++--------
+ 1 file changed, 16 insertions(+), 8 deletions(-)
+
+diff --git a/Common/Src/SCons/CXL_init.py b/Common/Src/SCons/CXL_init.py
+index 199c813..af3dfac
+--- a/Common/Src/SCons/CXL_init.py
++++ b/Common/Src/SCons/CXL_init.py
+@@ -75,6 +75,13 @@ def initCXLVars (CXL_vars) :
+ default = '',
+ allowed_values = ('true', ''))
+
++ # CxL support for internal libGLEW
++ CXL_vars.Add(
++ key = 'CXL_USE_INTERNAL_LIB_GLEW',
++ help = 'Support internal libGLEW',
++ default = 'true',
++ allowed_values = ('true', ''))
++
+ # CxL support for system_boost
+ CXL_vars.Add(
+ key = 'CXL_boost_dir',
+@@ -568,16 +575,17 @@ def initAMDOpenCL (env) :
+ copySharedLibrary(env, file, amdopencl_lib, env['CXL_lib_dir'])
+
+ def initGLEW (env) :
+- amdglew_dir = env['CXL_common_dir'] + '/Lib/Ext/glew/1.9.0/Build/Ubuntu'
++ if (env['CXL_USE_INTERNAL_LIB_GLEW'] == 'true'):
++ amdglew_dir = env['CXL_common_dir'] + '/Lib/Ext/glew/1.9.0/Build/Ubuntu'
+
+- if (env['CXL_arch'] == 'x86_64'):
+- amdglew_dir = amdglew_dir + '/x86_64/'
+- else:
+- amdglew_dir = amdglew_dir + '/x86/'
++ if (env['CXL_arch'] == 'x86_64'):
++ amdglew_dir = amdglew_dir + '/x86_64/'
++ else:
++ amdglew_dir = amdglew_dir + '/x86/'
+
+- copySharedLibrary(env, "libGLEW.so.1.9.0", amdglew_dir, env['CXL_lib_dir'])
+- copySharedLibrary(env, "libGLEW.so.1.9", amdglew_dir, env['CXL_lib_dir'])
+- copySharedLibrary(env, "libGLEW.so", amdglew_dir, env['CXL_lib_dir'])
++ copySharedLibrary(env, "libGLEW.so.1.9.0", amdglew_dir, env['CXL_lib_dir'])
++ copySharedLibrary(env, "libGLEW.so.1.9", amdglew_dir, env['CXL_lib_dir'])
++ copySharedLibrary(env, "libGLEW.so", amdglew_dir, env['CXL_lib_dir'])
+
+ def initBoost (env) :
+ if (env['CXL_boost_dir'] == ''):
+--
+2.5.5
diff --git a/common/recipes-devtools/codexl/codexl/0014-do-not-use-local-tinyxml.patch b/common/recipes-devtools/codexl/codexl/0014-do-not-use-local-tinyxml.patch
new file mode 100644
index 00000000..896dfd38
--- /dev/null
+++ b/common/recipes-devtools/codexl/codexl/0014-do-not-use-local-tinyxml.patch
@@ -0,0 +1,107 @@
+From a0af2e4f825e4036472fe8047cfb470528fe9a10 Mon Sep 17 00:00:00 2001
+From: Michael <michael_powell@mentor.com>
+Date: Wed, 26 Oct 2016 20:46:16 -0700
+Subject: [PATCH] do not use local tinyxml
+
+---
+ Common/Src/SCons/CXL_init.py | 29 +++++++++++++++++++++++------
+ CodeXL/Components/Graphics/Server/VulkanEnv/SConscript | 4 ++--
+ CodeXL/Components/Graphics/Server/VulkanServer/SConscript | 4 ++--
+ 3 files changed, 33 insertions(+), 4 deletions(-)
+
+diff --git a/Common/Src/SCons/CXL_init.py b/Common/Src/SCons/CXL_init.py
+index af3dfac..5cb1336 100755
+--- a/Common/Src/SCons/CXL_init.py
++++ b/Common/Src/SCons/CXL_init.py
+@@ -82,6 +82,18 @@ def initCXLVars (CXL_vars) :
+ default = 'true',
+ allowed_values = ('true', ''))
+
++ # CxL support for external tinyxml
++ CXL_vars.Add(
++ key = 'CXL_tinyxml_dir',
++ help = 'Specify tinyXML directory to use',
++ default = '',)
++
++ # CxL support for external tinyxml include
++ CXL_vars.Add(
++ key = 'CXL_tinyxml_inc_dir',
++ help = 'Specify tinyXML include directory to use',
++ default = '',)
++
+ # CxL support for system_boost
+ CXL_vars.Add(
+ key = 'CXL_boost_dir',
+@@ -465,16 +477,21 @@ def initStdc(env):
+ copySharedLibrary(env, file, stdclib_lib, env['CXL_lib_dir'])
+
+ def initTinyXml (env) :
+- dbgSuffix = ''
++ if (env['CXL_tinyxml_dir'] == ''):
++ tinyxml_dir = env['CXL_common_dir'] + '/Lib/Ext/tinyxml/2.6.2'
++ tinyxml_inc = tinyxml_dir
++ tinyxml_lib = tinyxml_dir + '/Build/CentOS64/' + env['CXL_build'] + '/' + env['CXL_arch']
++ tinyxml_libs = ['tinyXML']
++ else:
++ tinyxml_dir = env['CXL_tinyxml_dir']
++ tinyxml_lib = tinyxml_dir
++ tinyxml_inc = env['CXL_tinyxml_inc_dir']
++ tinyxml_libs = ['tinyxml']
+
+- tinyxml_dir = env['CXL_common_dir'] + '/Lib/Ext/tinyxml/2.6.2'
+- tinyxml_inc = tinyxml_dir
+- tinyxml_lib = tinyxml_dir + '/Build/CentOS64/' + env['CXL_build'] + '/' + env['CXL_arch']
+ libsrc = []
+- tinyxml_libs = ['tinyXML']
+ libsrc.append(tinyxml_libs)
+
+ env.Append(CXL_TinyXML_inc = [tinyxml_dir, tinyxml_inc])
+ env.Append(CXL_TinyXML_libs = tinyxml_libs)
+ env.Append(CXL_TinyXML_libpath = tinyxml_lib)
+ # We do not need to install anything - it is just a single archive
+diff --git a/CodeXL/Components/Graphics/Server/VulkanEnv/SConscript b/CodeXL/Components/Graphics/Server/VulkanEnv/SConscript
+index e07a583..2ba2d20 100644
+--- a/CodeXL/Components/Graphics/Server/VulkanEnv/SConscript
++++ b/CodeXL/Components/Graphics/Server/VulkanEnv/SConscript
+@@ -31,7 +31,7 @@ linker_flags = ' -Wl,-z,defs '
+ env.Prepend(LINKFLAGS = linker_flags)
+
+ # These need to be in their dependency order, with most derived first
+-env['LIBS'] = \
++env.Append (LIBS = \
+ [
+ #local libraries
+ "libCXLGraphicsServerCommon",
+@@ -41,7 +41,7 @@ env['LIBS'] = \
+ "dl",
+ "rt",
+ "pthread",
+-]
++])
+
+ # Vulkan specific source files
+ sources = \
+diff --git a/CodeXL/Components/Graphics/Server/VulkanServer/SConscript b/CodeXL/Components/Graphics/Server/VulkanServer/SConscript
+index 28ca379..5b2266d 100644
+--- a/CodeXL/Components/Graphics/Server/VulkanServer/SConscript
++++ b/CodeXL/Components/Graphics/Server/VulkanServer/SConscript
+@@ -51,7 +51,7 @@ linker_flags = ' -Wl,-z,defs '
+ env.Prepend(LINKFLAGS = linker_flags)
+
+ # These need to be in their dependency order, with most derived first
+-env['LIBS'] = \
++env.Append (LIBS = \
+ [
+ #local libraries
+ "libCXLGraphicsServerCommon",
+@@ -65,7 +65,7 @@ env['LIBS'] = \
+ "dl",
+ "rt",
+ "pthread",
+-]
++])
+
+ # Vulkan specific source files
+ sources = \
+--
+2.5.5
diff --git a/common/recipes-devtools/codexl/codexl/0015-add-build-control-flag-CXL_RA_only.patch b/common/recipes-devtools/codexl/codexl/0015-add-build-control-flag-CXL_RA_only.patch
new file mode 100644
index 00000000..770d89cb
--- /dev/null
+++ b/common/recipes-devtools/codexl/codexl/0015-add-build-control-flag-CXL_RA_only.patch
@@ -0,0 +1,93 @@
+From d353057bd4fa5123a24c721922c1420934e143c9 Mon Sep 17 00:00:00 2001
+From: Adeel Arshad <adeel_arshad@mentor.com>
+Date: Fri, 28 Oct 2016 16:59:22 +0500
+Subject: [PATCH] add build control flag CXL_RA_only
+
+CXL_RA_only flag allow to tweak the build to become
+suitable for Remote Agent only build, as UI based
+components will not be required for remote agent
+only build. Currently just exclude the UI based components
+from the framework when we are doing a remote
+agent only build.
+
+Signed-off-by: Adeel Arshad <adeel_arshad@mentor.com>
+---
+ CodeXL/SConstruct | 18 ++++++++++++------
+ Common/Src/SCons/CXL_init.py | 7 +++++++
+ 2 files changed, 19 insertions(+), 6 deletions(-)
+
+diff --git a/CodeXL/SConstruct b/CodeXL/SConstruct
+index d469d98..9bbbcb5 100755
+--- a/CodeXL/SConstruct
++++ b/CodeXL/SConstruct
+@@ -151,7 +151,8 @@ FrameworkComponents = []
+ BaseTools_Obj = SConscript('../Common/Src/AMDTBaseTools/SConscript', variant_dir=obj_variant_dir+'/AMDTBaseTools', duplicate=0)
+ FrameworkComponents += BaseTools_Obj
+ Assertion_Obj = SConscript('../Common/Src/AMDTAssertionHandlers/SConscript', variant_dir=obj_variant_dir+'/AMDTAssertionHandlers', duplicate=0)
+-FrameworkComponents += Assertion_Obj
++if CXL_env['CXL_RA_only'] != 'true' :
++ FrameworkComponents += Assertion_Obj
+
+ OSWrappers_Obj = SConscript('../Common/Src/AMDTOSWrappers/SConscript', variant_dir=obj_variant_dir+'/AMDTOSWrappers', duplicate=0)
+ CXL_env.Depends(OSWrappers_Obj, BaseTools_Obj)
+@@ -167,7 +168,8 @@ FrameworkComponents += APIClasses_Obj
+
+ AppComponents_Obj = SConscript('../Common/Src/AMDTApplicationComponents/SConscript', variant_dir=obj_variant_dir+'/AMDTApplicationComponents', duplicate=0)
+ CXL_env.Depends(AppComponents_Obj, APIClasses_Obj + OSWrappers_Obj + OSAPIWrappers_Obj + BaseTools_Obj)
+-FrameworkComponents += AppComponents_Obj
++if CXL_env['CXL_RA_only'] != 'true' :
++ FrameworkComponents += AppComponents_Obj
+
+ AMDTRemoteClient_Obj = SConscript('Remote/AMDTRemoteClient/SConscript', variant_dir=obj_variant_dir+'/AMDTRemoteClient', duplicate=0)
+ CXL_env.Depends(AMDTRemoteClient_Obj, OSWrappers_Obj + BaseTools_Obj)
+@@ -175,21 +177,25 @@ FrameworkComponents += AMDTRemoteClient_Obj
+
+ AppFramework_Obj = SConscript('AMDTApplicationFramework/SConscript', variant_dir=obj_variant_dir+'/AMDTApplicationFramework', duplicate=0)
+ CXL_env.Depends(AppFramework_Obj, APIClasses_Obj + OSWrappers_Obj + OSAPIWrappers_Obj + BaseTools_Obj + AMDTRemoteClient_Obj)
+-FrameworkComponents += AppFramework_Obj
++if CXL_env['CXL_RA_only'] != 'true' :
++ FrameworkComponents += AppFramework_Obj
+
+ # This depends upon everything built to date
+ Application_Obj = SConscript('../Common/Src/AMDTApplication/SConscript', variant_dir=obj_variant_dir+'/AMDTApplication', duplicate=0)
+ CXL_env.Depends(Application_Obj, FrameworkComponents)
+-FrameworkComponents += Application_Obj
++if CXL_env['CXL_RA_only'] != 'true' :
++ FrameworkComponents += Application_Obj
+
+ # This depends upon everything built to date
+ Application_Obj = SConscript('App/SConscript', variant_dir=obj_variant_dir+'/AMDCodeXL', duplicate=0)
+ CXL_env.Depends(Application_Obj, FrameworkComponents)
+-#FrameworkComponents += Application_Obj
++if CXL_env['CXL_RA_only'] != 'true' :
++ FrameworkComponents += Application_Obj
+
+ SharedProf_Obj = SConscript('Components/AMDTSharedProfiling/SConscript', variant_dir=obj_variant_dir+'/AMDTSharedProfiling', duplicate=0)
+ CXL_env.Depends(SharedProf_Obj, FrameworkComponents)
+-FrameworkComponents += SharedProf_Obj
++if CXL_env['CXL_RA_only'] != 'true' :
++ FrameworkComponents += SharedProf_Obj
+
+ CXL_env.Depends(FrameworkComponents,
+ CXL_env['CXL_Images_install'] +
+diff --git a/Common/Src/SCons/CXL_init.py b/Common/Src/SCons/CXL_init.py
+index d1ca678..a2443ac 100755
+--- a/Common/Src/SCons/CXL_init.py
++++ b/Common/Src/SCons/CXL_init.py
+@@ -100,6 +100,13 @@ def initCXLVars (CXL_vars) :
+ help = 'Specify Boost directory to use',
+ default = '',)
+
++ # CxL support for remote agent only build
++ CXL_vars.Add(
++ key = 'CXL_RA_only',
++ help = 'Support for Remote Agent only build, exclude all UI components',
++ default = '',
++ allowed_values = ('true', ''))
++
+ def initJava (env) :
+ useJava = os.getenv('JAVA_HOME', '')
+ if (useJava != ''):
+--
+1.9.1
+
diff --git a/common/recipes-devtools/codexl/codexl/0016-add-build-control-flag-CXL_sysroot_dir.patch b/common/recipes-devtools/codexl/codexl/0016-add-build-control-flag-CXL_sysroot_dir.patch
new file mode 100644
index 00000000..0da61abe
--- /dev/null
+++ b/common/recipes-devtools/codexl/codexl/0016-add-build-control-flag-CXL_sysroot_dir.patch
@@ -0,0 +1,278 @@
+From 2bfad59e4f0ec6c9a84ef7d4395fa53700518bd0 Mon Sep 17 00:00:00 2001
+From: Adeel Arshad <adeel_arshad@mentor.com>
+Date: Fri, 28 Oct 2016 19:19:22 +0500
+Subject: [PATCH] add build control flag CXL_sysroot_dir
+
+For cross compilation specifying the sysroot directory
+is very handy as the sysroot specifies path where on
+build system the build artifacts or staging header and
+library files are located.
+
+Signed-off-by: Adeel Arshad <adeel_arshad@mentor.com>
+---
+ CodeXL/App/SConscript | 2 +-
+ .../AMDTRemoteDebuggingServer/SConscript | 4 ++--
+ CodeXL/Components/Graphics/GPS_init.py | 20 ++++++++--------
+ CodeXL/Components/Graphics/SConstruct | 6 ++---
+ CodeXL/Examples/AMDTTeaPot/AMDTTeaPot/SConscript | 12 +++++-----
+ .../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 ++--
+ Common/Src/SCons/CXL_init.py | 28 +++++++++++++---------
+ 12 files changed, 49 insertions(+), 43 deletions(-)
+
+diff --git a/CodeXL/App/SConscript b/CodeXL/App/SConscript
+index 4924c4a..e5d39a2 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',
+- env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/gdk-pixbuf-2.0/", # [Suravee] Needed for Ubuntu-11.10
++ env['CXL_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 ffe3387..c330564 100755
+--- a/CodeXL/Components/GpuDebugging/AMDTRemoteDebuggingServer/SConscript
++++ b/CodeXL/Components/GpuDebugging/AMDTRemoteDebuggingServer/SConscript
+@@ -27,8 +27,8 @@ sources = \
+ ]
+
+ env.Append( LIBPATH = [
+- env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/lib",
+- env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/lib/x86_64-linux-gnu",
++ env['CXL_sysroot_dir'] + "/usr/lib",
++ env['CXL_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/GPS_init.py b/CodeXL/Components/Graphics/GPS_init.py
+index 805191d..9563ad6 100644
+--- a/CodeXL/Components/Graphics/GPS_init.py
++++ b/CodeXL/Components/Graphics/GPS_init.py
+@@ -47,16 +47,16 @@ def ParseCommandLine(env, buildInternal):
+ # initialize Gtk library
+ def initGtk(env):
+ env.Append(BASE_PATH = [
+- env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/cairo",
+- env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/pango-1.0",
+- env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/atk-1.0",
+- env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/gtk-2.0",
+- env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/gdk-pixbuf-2.0",
+- env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/glib-2.0",
+- env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/lib64/gtk-2.0/include",
+- env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/lib64/glib-2.0/include/",
+- env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/lib/x86_64-linux-gnu/glib-2.0/include",
+- env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/lib/x86_64-linux-gnu/gtk-2.0/include",
++ env['CXL_sysroot_dir'] + "/usr/include/cairo",
++ env['CXL_sysroot_dir'] + "/usr/include/pango-1.0",
++ env['CXL_sysroot_dir'] + "/usr/include/atk-1.0",
++ env['CXL_sysroot_dir'] + "/usr/include/gtk-2.0",
++ env['CXL_sysroot_dir'] + "/usr/include/gdk-pixbuf-2.0",
++ env['CXL_sysroot_dir'] + "/usr/include/glib-2.0",
++ env['CXL_sysroot_dir'] + "/usr/lib64/gtk-2.0/include",
++ env['CXL_sysroot_dir'] + "/usr/lib64/glib-2.0/include/",
++ env['CXL_sysroot_dir'] + "/usr/lib/x86_64-linux-gnu/glib-2.0/include",
++ env['CXL_sysroot_dir'] + "/usr/lib/x86_64-linux-gnu/gtk-2.0/include",
+ ])
+
+ ##########################################################################################
+diff --git a/CodeXL/Components/Graphics/SConstruct b/CodeXL/Components/Graphics/SConstruct
+index d2a6cca..3e8d495 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'] = \
+ [
+- 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,
++ env['CXL_sysroot_dir'] + '/usr/' + GPS_env.libConfig,
++ env['CXL_sysroot_dir'] + '/usr/lib',
++ env['CXL_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 0c6d61c..eb29802 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",
+- 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['CXL_sysroot_dir'] + "/usr/include/GL",
++ env['CXL_sysroot_dir'] + "/usr/include/freetype2",
++ env['CXL_sysroot_dir'] + "/usr/include/libpng12",
++ env['CXL_sysroot_dir'] + "/usr/lib/x86_64-linux-gnu/glib-2.0/include",
++ env['CXL_sysroot_dir'] + "/usr/include/freetype2",
+
+ ])
+
+ env.Append( LIBPATH = [
+- env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/lib/x86_64-linux-gnu/mesa",
++ env['CXL_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 a46a66d..ce297a4 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 = [
+- env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/lib",
++ env['CXL_sysroot_dir'] + "/usr/lib",
+ ])
+
+ sources = \
+diff --git a/Common/Src/AMDTApplication/SConscript b/Common/Src/AMDTApplication/SConscript
+index f284f23..f0993df 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',
+- env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/gdk-pixbuf-2.0/", # [Suravee] Needed for Ubuntu-11.10
++ env['CXL_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 97bf9ff..8f5283d 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',
+- env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/gdk-pixbuf-2.0/", # [Suravee] Needed for Ubuntu-11.10
++ env['CXL_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 0a2cab7..03934fd 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',
+- env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/gdk-pixbuf-2.0/", # [Suravee] Needed for Ubuntu-11.10
++ env['CXL_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 = [
+- env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/lib",
+- env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/lib/x86_64-linux-gnu",
++ env['CXL_sysroot_dir'] + "/usr/lib",
++ env['CXL_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 c8fca6c..f2134a9 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/',
+- env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/gdk-pixbuf-2.0/", # [Suravee] Needed for Ubuntu-11.10
++ env['CXL_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 = [
+- env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/lib",
++ env['CXL_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 341205b..e4f0060 100755
+--- a/Common/Src/AMDTOSWrappers/SConscriptHSA
++++ b/Common/Src/AMDTOSWrappers/SConscriptHSA
+@@ -14,8 +14,8 @@ env.Append( CPPPATH = [
+ "./src/",
+ "./Include/",
+ env['HWDBG_commonproj_dir'],
+- env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/gdk-pixbuf-2.0/", # [Suravee] Needed for Ubuntu-11.10
+- env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/",
++ env['CXL_sysroot_dir'] + "/usr/include/gdk-pixbuf-2.0/", # [Suravee] Needed for Ubuntu-11.10
++ env['CXL_sysroot_dir'] + "/usr/include/",
+ ])
+
+ # osMessageBox, osDesktop
+diff --git a/Common/Src/SCons/CXL_init.py b/Common/Src/SCons/CXL_init.py
+index a2443ac..34b65ee 100755
+--- a/Common/Src/SCons/CXL_init.py
++++ b/Common/Src/SCons/CXL_init.py
+@@ -107,6 +107,12 @@ def initCXLVars (CXL_vars) :
+ default = '',
+ allowed_values = ('true', ''))
+
++ # CxL support to specify sysroot directory
++ CXL_vars.Add(
++ key = 'CXL_sysroot_dir',
++ help = 'Specify sysroot directory to use',
++ default = '',)
++
+ def initJava (env) :
+ useJava = os.getenv('JAVA_HOME', '')
+ if (useJava != ''):
+@@ -453,17 +459,17 @@ def UseQtNoGraphics(env):
+
+ def initGtk (env) :
+ env.Append(CXL_Gtk_inc_path = [
+- env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/cairo",
+- env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/pango-1.0",
+- env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/atk-1.0",
+- env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/gtk-2.0",
+- env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/gdk-pixbuf-2.0",
+- env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/glib-2.0",
+- env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/lib64/gtk-2.0/include",
+- env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/lib64/glib-2.0/include/",
+- env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/lib/x86_64-linux-gnu/glib-2.0/include",
+- env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/lib/x86_64-linux-gnu/gtk-2.0/include",
+- env['PKG_CONFIG_SYSROOT_DIR'] + "/usr/include/x86_64-linux-gnu/",
++ env['CXL_sysroot_dir'] + "/usr/include/cairo",
++ env['CXL_sysroot_dir'] + "/usr/include/pango-1.0",
++ env['CXL_sysroot_dir'] + "/usr/include/atk-1.0",
++ env['CXL_sysroot_dir'] + "/usr/include/gtk-2.0",
++ env['CXL_sysroot_dir'] + "/usr/include/gdk-pixbuf-2.0",
++ env['CXL_sysroot_dir'] + "/usr/include/glib-2.0",
++ env['CXL_sysroot_dir'] + "/usr/lib64/gtk-2.0/include",
++ env['CXL_sysroot_dir'] + "/usr/lib64/glib-2.0/include/",
++ env['CXL_sysroot_dir'] + "/usr/lib/x86_64-linux-gnu/glib-2.0/include",
++ env['CXL_sysroot_dir'] + "/usr/lib/x86_64-linux-gnu/gtk-2.0/include",
++ env['CXL_sysroot_dir'] + "/usr/include/x86_64-linux-gnu/",
+ ])
+ # No additional libraries needed for Gtk
+
+--
+1.9.1
+
diff --git a/common/recipes-devtools/codexl/codexl/0017-add-tinxml-to-list-of-LIBS-for-CapturePlayer.patch b/common/recipes-devtools/codexl/codexl/0017-add-tinxml-to-list-of-LIBS-for-CapturePlayer.patch
new file mode 100644
index 00000000..977ac209
--- /dev/null
+++ b/common/recipes-devtools/codexl/codexl/0017-add-tinxml-to-list-of-LIBS-for-CapturePlayer.patch
@@ -0,0 +1,32 @@
+From 711fcedf6a93e21408609eec74729be5106c149e Mon Sep 17 00:00:00 2001
+From: Adeel Arshad <adeel_arshad@mentor.com>
+Date: Wed, 2 Nov 2016 15:43:57 +0500
+Subject: [PATCH] add tinxml to list of LIBS for CapturePlayer
+
+Frame analyzer capture player uses the tinyxml,
+so the tinyxml library needs to be added to the
+list of the libraries on which CapturePlayer
+build is dependent.
+
+Signed-off-by: Adeel Arshad <adeel_arshad@mentor.com>
+---
+ CodeXL/Components/Graphics/Server/CapturePlayer/SConscript | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/CodeXL/Components/Graphics/Server/CapturePlayer/SConscript b/CodeXL/Components/Graphics/Server/CapturePlayer/SConscript
+index f114c62..1c74794 100644
+--- a/CodeXL/Components/Graphics/Server/CapturePlayer/SConscript
++++ b/CodeXL/Components/Graphics/Server/CapturePlayer/SConscript
+@@ -67,7 +67,8 @@ env['LIBS'] = \
+ "pthread",
+ "dl",
+ "X11",
+- "xcb"
++ "xcb",
++ "tinyxml"
+ ]
+
+ sources = [
+--
+1.9.1
+
diff --git a/common/recipes-devtools/codexl/codexl/amdtPwrProf.rules b/common/recipes-devtools/codexl/codexl/amdtPwrProf.rules
new file mode 100644
index 00000000..f29c4829
--- /dev/null
+++ b/common/recipes-devtools/codexl/codexl/amdtPwrProf.rules
@@ -0,0 +1,5 @@
+# Create the device file when the module is inserted.
+SUBSYSTEM=="module", ACTION=="add", KERNEL=="amdtPwrProf", RUN+="/opt/codexl/amdtPwrProf_mknod.sh"
+
+# Remove the device file when the module is removed.
+SUBSYSTEM=="module", ACTION=="remove", KERNEL=="amdtPwrProf", RUN+="/bin/rm /dev/amdtPwrProf"
diff --git a/common/recipes-devtools/codexl/codexl/amdtPwrProf_mknod.sh b/common/recipes-devtools/codexl/codexl/amdtPwrProf_mknod.sh
new file mode 100644
index 00000000..7fd27c6e
--- /dev/null
+++ b/common/recipes-devtools/codexl/codexl/amdtPwrProf_mknod.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+mknod /dev/amdtPwrProf -m 666 c `cat /proc/amdtPwrProf/device` 0
diff --git a/common/recipes-devtools/codexl/codexl/codexl-remote-agent.service b/common/recipes-devtools/codexl/codexl/codexl-remote-agent.service
new file mode 100644
index 00000000..9f577eee
--- /dev/null
+++ b/common/recipes-devtools/codexl/codexl/codexl-remote-agent.service
@@ -0,0 +1,15 @@
+[Unit]
+Description="CodeXL Remote Agent"
+Wants=connman-wait-online.service
+After=connman-wait-online.service
+
+[Service]
+Type=simple
+Restart=always
+ExecStart=/opt/codexl/codexl_remote_agent.sh start
+ExecStop=/opt/codexl/codexl_remote_agent.sh stop
+WorkingDirectory=/opt/codexl
+User=root
+
+[Install]
+WantedBy=multi-user.target
diff --git a/common/recipes-devtools/codexl/codexl/codexl_remote_agent.sh b/common/recipes-devtools/codexl/codexl/codexl_remote_agent.sh
new file mode 100644
index 00000000..3fc74e52
--- /dev/null
+++ b/common/recipes-devtools/codexl/codexl/codexl_remote_agent.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+ACTION=$1
+
+function start_remote_agent {
+ if [ -z "`cat /proc/modules | grep amdtPwrProf`" ]; then
+ insmod /opt/codexl/amdtPwrProf.ko
+ fi
+ export DISPLAY=:0
+ /opt/codexl/CodeXLRemoteAgent
+}
+
+function stop_remote_agent {
+ killall -q CodeXLRemoteAgent-bin
+ if [ -n "`cat /proc/modules | grep amdtPwrProf`" ]; then
+ rmmod amdtPwrProf
+ fi
+}
+
+if [ $ACTION = "start" ]; then
+ echo "START the remote agent"
+ stop_remote_agent
+ start_remote_agent
+else
+ echo "STOP the remote agent"
+ stop_remote_agent
+fi
diff --git a/common/recipes-devtools/codexl/codexl_2.2.bb b/common/recipes-devtools/codexl/codexl_2.2.bb
new file mode 100644
index 00000000..4a36158a
--- /dev/null
+++ b/common/recipes-devtools/codexl/codexl_2.2.bb
@@ -0,0 +1,217 @@
+SUMMARY = "CodeXL enables developers to harness the benefits of CPUs, GPUs and APUs."
+
+DESCRIPTION = "CodeXL is a comprehensive tool suite that enables developers \
+to harness the benefits of CPUs, GPUs and APUs. It includes powerful GPU \
+debugging, comprehensive GPU and CPU profiling, DirectX12® Frame \
+Analysis, static OpenCL™, OpenGL®, Vulkan® and DirectX® kernel/shader \
+analysis capabilities, and APU/CPU/GPU power profiling, enhancing \
+accessibility for software developers to enter the era of heterogeneous \
+computing. CodeXL is available both as a Visual Studio® extension and a \
+standalone user interface application for Windows® and Linux®."
+
+HOMEPAGE = "https://github.com/GPUOpen-Tools/CodeXL"
+
+BUGTRACKER = "https://github.com/GPUOpen-Tools/CodeXL/issues"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=37475e90e7cba036e30d0c8b0af68173"
+
+DEPENDS += "boost fltk gtk+ glew libtinyxml"
+RDEPENDS_${PN} += "gdb connman-wait-online"
+
+PV = "2.2+git${SRCPV}"
+
+SRCREV = "7c0d7296a22afd34654c42f2d7a915cba0f4b38e"
+SRC_URI = " \
+ gitsm://github.com/GPUOpen-Tools/CodeXL.git;branch=2.2;protocol=https \
+ file://0001-cross-compile-compatibility.patch \
+ file://0002-set-the-scons-execution-environment.patch \
+ file://0003-set-the-scons-construction-environment.patch \
+ file://0004-set-the-CPPFLAGS-for-cross-compile.patch \
+ file://0005-set-the-LIBPATH-for-cross-compile.patch \
+ file://0006-modify-compiler_base_flags.patch \
+ file://0007-donot-use-the-local-copy-of-libstdc.patch \
+ file://0008-Examples-AMDTTeaPot-fix-a-null-pointer-exception.patch \
+ file://0009-remove-remote-agent-dependency-on-UI-components.patch \
+ file://0010-fix-CXL_env-update-code-position.patch \
+ file://0011-tune-gpu-profiler-backend-metadata-for-cross-compila.patch \
+ file://0012-pwrprof-driver-tune-metadata-for-crosscompile.patch \
+ file://0013-do-not-use-local-libGLEW.patch \
+ file://0014-do-not-use-local-tinyxml.patch \
+ file://0015-add-build-control-flag-CXL_RA_only.patch \
+ file://0016-add-build-control-flag-CXL_sysroot_dir.patch \
+ file://0017-add-tinxml-to-list-of-LIBS-for-CapturePlayer.patch \
+ file://amdtPwrProf_mknod.sh \
+ file://amdtPwrProf.rules \
+ file://codexl_remote_agent.sh \
+ file://codexl-remote-agent.service \
+"
+
+inherit scons module systemd
+
+SYSTEMD_SERVICE_${PN} = "codexl-remote-agent.service"
+SYSTEMD_AUTO_ENABLE = "enable"
+
+S = "${WORKDIR}/git"
+
+BUILD_TYPE="release"
+INSTALL_PREFIX="/opt/codexl"
+OUTPUT_PREFIX="/Output_${BUILD_ARCH}/${BUILD_TYPE}/bin"
+
+EXTRA_OESCONS = " \
+ -C ${S}/CodeXL \
+ CXL_common_dir=${S}/CodeXL/../Common \
+ CXL_prefix=${S}/CodeXL/../ \
+ CXL_build=${BUILD_TYPE} \
+ CXL_boost_dir="${STAGING_DIR_TARGET}${libdir}" \
+ CXL_USE_INTERNAL_LIB_GLEW="false" \
+ CXL_tinyxml_dir="${STAGING_DIR_TARGET}${libdir}" \
+ CXL_tinyxml_inc_dir="${STAGING_DIR_TARGET}${includedir}" \
+ CXL_RA_only="true" \
+ CXL_sysroot_dir=${PKG_CONFIG_SYSROOT_DIR} \
+ AMDTRemoteDebuggingServer \
+ VulkanEnv \
+ VulkanServer \
+ CapturePlayer \
+ GPUPerfServer \
+ AMDTPowerProfilingDrivers \
+ AMDTRemoteAgent \
+ Teapot \
+ ClassicMatMul \
+"
+
+BACKEND_SPROOT = "${S}/CodeXL/Components/GpuProfiling/Build/../"
+
+BACKEND_EXTRA_OESCONS = " \
+ -C ${BACKEND_SPROOT}/Build \
+ CXL_common_dir=${S}/CodeXL/../Common \
+ CXL_prefix=${BACKEND_SPROOT} \
+ CXL_build_type=static \
+ CXL_boost_dir="${STAGING_DIR_TARGET}${libdir}" \
+ CXL_RA_only="true" \
+ CXL_sysroot_dir=${PKG_CONFIG_SYSROOT_DIR} \
+"
+
+BACKEND_PWRPROFROOT = "${S}/CodeXL/Components/PowerProfiling/Backend/AMDTPowerProfilingDrivers/Linux/"
+
+do_compile() {
+ export PYTHONPATH=${STAGING_DIR_NATIVE}/usr/lib/python2.7/site-packages/SCons/Variables/
+
+ ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} ${EXTRA_OESCONS} || die "codexl scons build failed."
+
+ CWD=$(pwd)
+ cd ${BACKEND_SPROOT}/Build/
+ export CXL_common_dir=${S}/CodeXL/../Common
+ ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} ${BACKEND_EXTRA_OESCONS} || die "codexl gpu profile backend scons build failed."
+ ./backend_build.sh skip-32bitbuild skip-framework skip-hsaprofiler boostlibdir "${STAGING_DIR_TARGET}${libdir}"
+
+ REV=$(cat ${BACKEND_PWRPROFROOT}/CodeXLPwrProfVersion)
+ tar -xpf ${BACKEND_PWRPROFROOT}/CodeXLPwrProfDriverSource.tar.gz -C ${S}/${OUTPUT_PREFIX}
+ cp -a ${BACKEND_PWRPROFROOT}/Makefile ${S}/${OUTPUT_PREFIX}/amdtPwrProf-${REV}/
+ cd ${S}/${OUTPUT_PREFIX}/amdtPwrProf-${REV}/
+ module_do_compile
+ cd ${CWD}
+}
+
+do_install() {
+ install -d ${D}/home/root/.CodeXL/CodeXL
+
+ install -d ${D}${INSTALL_PREFIX}
+ install -m 755 ${S}/${OUTPUT_PREFIX}/CodeXLGpuProfiler ${D}${INSTALL_PREFIX}/
+ install -m 755 ${S}/${OUTPUT_PREFIX}/CodeXLGpuProfilerRun ${D}${INSTALL_PREFIX}/
+ install -m 755 ${S}/${OUTPUT_PREFIX}/CodeXLRemoteAgent ${D}${INSTALL_PREFIX}/
+ install -m 755 ${S}/${OUTPUT_PREFIX}/CodeXLRemoteAgent-bin ${D}${INSTALL_PREFIX}/
+ install -m 755 ${S}/${OUTPUT_PREFIX}/CodeXLRemoteAgentConfig.xml ${D}${INSTALL_PREFIX}/
+ install -m 755 ${S}/${OUTPUT_PREFIX}/CXLGraphicsServer ${D}${INSTALL_PREFIX}/
+ install -m 755 ${S}/${OUTPUT_PREFIX}/CXLRemoteDebuggingServer ${D}${INSTALL_PREFIX}/
+ install -m 755 ${S}/${OUTPUT_PREFIX}/CXLGraphicsServerPlayer ${D}${INSTALL_PREFIX}/
+ install -m 755 ${S}/${OUTPUT_PREFIX}/libAMDOpenCLDebugAPI64*.so ${D}${INSTALL_PREFIX}/
+ install -m 755 ${S}/${OUTPUT_PREFIX}/libCXLAPIClasses.so ${D}${INSTALL_PREFIX}/
+ install -m 755 ${S}/${OUTPUT_PREFIX}/libCXLApiFunctions.so ${D}${INSTALL_PREFIX}/
+ install -m 755 ${S}/${OUTPUT_PREFIX}/libCXLBaseTools.so ${D}${INSTALL_PREFIX}/
+ install -m 755 ${S}/${OUTPUT_PREFIX}/libCXLGpuProfilerCLOccupancyAgent.so ${D}${INSTALL_PREFIX}/
+ install -m 755 ${S}/${OUTPUT_PREFIX}/libCXLGpuProfilerCLProfileAgent.so ${D}${INSTALL_PREFIX}/
+ install -m 755 ${S}/${OUTPUT_PREFIX}/libCXLGpuProfilerCLTraceAgent.so ${D}${INSTALL_PREFIX}/
+ install -m 755 ${S}/${OUTPUT_PREFIX}/libCXLGpuProfilerPreloadXInitThreads.so ${D}${INSTALL_PREFIX}/
+ install -m 755 ${S}/${OUTPUT_PREFIX}/libCXLOSAPIWrappers.so ${D}${INSTALL_PREFIX}/
+ install -m 755 ${S}/${OUTPUT_PREFIX}/libCXLOSWrappers.so ${D}${INSTALL_PREFIX}/
+ install -m 755 ${S}/${OUTPUT_PREFIX}/libCXLPowerProfileAPI.so ${D}${INSTALL_PREFIX}/
+ install -m 755 ${S}/${OUTPUT_PREFIX}/libCXLProcessDebugger.so ${D}${INSTALL_PREFIX}/
+ install -m 755 ${S}/${OUTPUT_PREFIX}/libCXLRemoteClient.so ${D}${INSTALL_PREFIX}/
+ install -m 755 ${S}/${OUTPUT_PREFIX}/libGPUPerfAPICL.so ${D}${INSTALL_PREFIX}/
+ install -m 755 ${S}/${OUTPUT_PREFIX}/libGPUPerfAPICounters.so ${D}${INSTALL_PREFIX}/
+ install -m 755 ${S}/${OUTPUT_PREFIX}/amdtPwrProf-5.10/amdtPwrProf.ko ${D}${INSTALL_PREFIX}/
+
+ install -m 755 ${WORKDIR}/amdtPwrProf_mknod.sh ${D}${INSTALL_PREFIX}/
+ install -d ${D}/${sysconfdir}/udev/rules.d/
+ install -m 644 ${WORKDIR}/amdtPwrProf.rules ${D}/${sysconfdir}/udev/rules.d/
+
+ install -m 755 ${WORKDIR}/codexl_remote_agent.sh ${D}${INSTALL_PREFIX}/
+ install -d ${D}${systemd_unitdir}/system
+ install -m 644 ${WORKDIR}/codexl-remote-agent.service ${D}${systemd_unitdir}/system/
+ sed -i -e 's,@BINDIR@,${bindir},g' \
+ -e 's,@SYSCONFDIR@,${sysconfdir},g' \
+ ${D}${systemd_unitdir}/system/*.service
+
+ install -d ${D}${INSTALL_PREFIX}/CXLActivityLogger
+ cp -r ${S}/${OUTPUT_PREFIX}/CXLActivityLogger/* ${D}${INSTALL_PREFIX}/CXLActivityLogger
+
+ install -d ${D}${INSTALL_PREFIX}/Plugins
+ cp -r ${S}/${OUTPUT_PREFIX}/Plugins/* ${D}${INSTALL_PREFIX}/Plugins
+
+ install -d ${D}${INSTALL_PREFIX}/Legal/Public
+ cp -r ${S}/${OUTPUT_PREFIX}/Legal/Public/CodeXLEndUserLicenseAgreement-Linux.htm ${D}${INSTALL_PREFIX}/Legal/Public
+ cp -r ${S}/${OUTPUT_PREFIX}/Legal/GNU_LESSER_GENERAL_PUBLIC_LICENSE2_1.pdf ${D}${INSTALL_PREFIX}/Legal
+
+ install -d ${D}${INSTALL_PREFIX}/examples/Teapot/res
+ install -m 755 ${S}/${OUTPUT_PREFIX}/examples/Teapot/release/CXLTeaPot-bin ${D}${INSTALL_PREFIX}/examples/Teapot
+ cp -r ${S}/${OUTPUT_PREFIX}/examples/Teapot/release/res/* ${D}${INSTALL_PREFIX}/examples/Teapot/res
+ install -m 755 ${S}/${OUTPUT_PREFIX}/examples/Teapot/CXLTeapotLicense.txt ${D}${INSTALL_PREFIX}/examples/Teapot
+ install -m 755 ${S}/${OUTPUT_PREFIX}/CXLClassicMatMul-bin ${D}${INSTALL_PREFIX}/examples/
+}
+
+PACKAGES += "${PN}-examples"
+FILES_${PN} += " \
+ /home/root/.CodeXL/CodeXL \
+ ${INSTALL_PREFIX}/CodeXLGpuProfiler \
+ ${INSTALL_PREFIX}/CodeXLGpuProfilerRun \
+ ${INSTALL_PREFIX}/CodeXLRemoteAgent \
+ ${INSTALL_PREFIX}/CodeXLRemoteAgent-bin \
+ ${INSTALL_PREFIX}/CodeXLRemoteAgentConfig.xml \
+ ${INSTALL_PREFIX}/CXLGraphicsServer \
+ ${INSTALL_PREFIX}/CXLRemoteDebuggingServer \
+ ${INSTALL_PREFIX}/CXLGraphicsServerPlayer \
+ ${INSTALL_PREFIX}/libAMDOpenCLDebugAPI64*.so \
+ ${INSTALL_PREFIX}/libCXLAPIClasses.so \
+ ${INSTALL_PREFIX}/libCXLApiFunctions.so \
+ ${INSTALL_PREFIX}/libCXLBaseTools.so \
+ ${INSTALL_PREFIX}/libCXLGpuProfilerCLOccupancyAgent.so \
+ ${INSTALL_PREFIX}/libCXLGpuProfilerCLProfileAgent.so \
+ ${INSTALL_PREFIX}/libCXLGpuProfilerCLTraceAgent.so \
+ ${INSTALL_PREFIX}/libCXLGpuProfilerPreloadXInitThreads.so \
+ ${INSTALL_PREFIX}/libCXLOSAPIWrappers.so \
+ ${INSTALL_PREFIX}/libCXLOSWrappers.so \
+ ${INSTALL_PREFIX}/libCXLPowerProfileAPI.so \
+ ${INSTALL_PREFIX}/libCXLProcessDebugger.so \
+ ${INSTALL_PREFIX}/libCXLRemoteClient.so \
+ ${INSTALL_PREFIX}/libGPUPerfAPICL.so \
+ ${INSTALL_PREFIX}/libGPUPerfAPICounters.so \
+ ${INSTALL_PREFIX}/amdtPwrProf.ko \
+ ${INSTALL_PREFIX}/amdtPwrProf_mknod.sh \
+ ${sysconfdir}/udev/rules.d/amdtPwrProf.rules \
+ ${INSTALL_PREFIX}/codexl_remote_agent.sh \
+ ${systemd_unitdir}/system/codexl-remote-agent.service \
+ ${INSTALL_PREFIX}/CXLActivityLogger/* \
+ ${INSTALL_PREFIX}/Legal/* \
+ ${INSTALL_PREFIX}/Legal/Public/* \
+ ${INSTALL_PREFIX}/Plugins/* \
+"
+
+FILES_${PN}-examples += " \
+ ${INSTALL_PREFIX}/examples/Teapot/CXLTeaPot-bin \
+ ${INSTALL_PREFIX}/examples/Teapot/res/* \
+ ${INSTALL_PREFIX}/examples/Teapot/CXLTeapotLicense.txt \
+ ${INSTALL_PREFIX}/examples/CXLClassicMatMul-bin \
+"
+INHIBIT_PACKAGE_STRIP = "1"
+INSANE_SKIP_${PN} = "already-stripped ldflags dev-so"