aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/recipes-core/packagegroups/packagegroup-gaming.bb2
-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
-rw-r--r--common/recipes-support/boost/boost-1.59.0.inc19
-rw-r--r--common/recipes-support/boost/boost/0001-boost-asio-detail-socket_types.hpp-fix-poll.h-includ.patch49
-rw-r--r--common/recipes-support/boost/boost/0002-boost-test-execution_monitor.hpp-fix-mips-soft-float.patch146
-rw-r--r--common/recipes-support/boost/boost/0003-smart_ptr-mips-assembly-doesn-t-compile-in-mips16e-m.patch60
-rw-r--r--common/recipes-support/boost/boost/0004-Use-atomic-by-default-when-BOOST_NO_CXX11_HDR_ATOMIC.patch59
-rw-r--r--common/recipes-support/boost/boost/arm-intrinsics.patch55
-rw-r--r--common/recipes-support/boost/boost/boost-CVE-2012-2677.patch112
-rw-r--r--common/recipes-support/boost/boost/consider-hardfp.patch19
-rw-r--r--common/recipes-support/boost/boost_1.59.0.bb14
-rw-r--r--common/recipes-support/fltk/fltk/0001-fix_undefined_Fl_XFont_On_Demand.patch13
-rw-r--r--common/recipes-support/fltk/fltk_1.3.3.bbappend3
-rw-r--r--common/recipes-support/libtinyxml/libtinyxml_%.bbappend1
35 files changed, 2136 insertions, 0 deletions
diff --git a/common/recipes-core/packagegroups/packagegroup-gaming.bb b/common/recipes-core/packagegroups/packagegroup-gaming.bb
index 6f879601..7524f44c 100644
--- a/common/recipes-core/packagegroups/packagegroup-gaming.bb
+++ b/common/recipes-core/packagegroups/packagegroup-gaming.bb
@@ -7,7 +7,9 @@ PR = "r0"
inherit packagegroup
LUNARG_SDK_COMPONENTS = "glslang spirv-tools vulkan-loader-layers vulkan-tools vulkan-samples"
+CODEXL_COMPONENTS = "codexl codexl-examples"
RDEPENDS_${PN} += "\
${LUNARG_SDK_COMPONENTS} \
+ ${CODEXL_COMPONENTS} \
"
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"
diff --git a/common/recipes-support/boost/boost-1.59.0.inc b/common/recipes-support/boost/boost-1.59.0.inc
new file mode 100644
index 00000000..082ce5bb
--- /dev/null
+++ b/common/recipes-support/boost/boost-1.59.0.inc
@@ -0,0 +1,19 @@
+# The Boost web site provides free peer-reviewed portable
+# C++ source libraries. The emphasis is on libraries which
+# work well with the C++ Standard Library. The libraries are
+# intended to be widely useful, and are in regular use by
+# thousands of programmers across a broad spectrum of applications.
+HOMEPAGE = "http://www.boost.org/"
+LICENSE = "BSL-1.0 & MIT & Python-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c"
+
+BOOST_VER = "${@"_".join(d.getVar("PV", True).split("."))}"
+BOOST_MAJ = "${@"_".join(d.getVar("PV", True).split(".")[0:2])}"
+BOOST_P = "boost_${BOOST_VER}"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/boost/${BOOST_P}.tar.bz2"
+
+SRC_URI[md5sum] = "6aa9a5c6a4ca1016edd0ed1178e3cb87"
+SRC_URI[sha256sum] = "727a932322d94287b62abb1bd2d41723eec4356a7728909e38adb65ca25241ca"
+
+S = "${WORKDIR}/${BOOST_P}"
diff --git a/common/recipes-support/boost/boost/0001-boost-asio-detail-socket_types.hpp-fix-poll.h-includ.patch b/common/recipes-support/boost/boost/0001-boost-asio-detail-socket_types.hpp-fix-poll.h-includ.patch
new file mode 100644
index 00000000..8a85aac1
--- /dev/null
+++ b/common/recipes-support/boost/boost/0001-boost-asio-detail-socket_types.hpp-fix-poll.h-includ.patch
@@ -0,0 +1,49 @@
+From 40192301130dcd913aa6d9cb9dba9e5f8dbd9d16 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com>
+Date: Wed, 24 Aug 2016 21:01:43 +0100
+Subject: [PATCH 1/4] use POSIX poll.h instead of sys/poll.h
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+POSIX specifies that <poll.h> is the correct header to
+include for poll()
+ http://pubs.opengroup.org/onlinepubs/009695399/functions/poll.html
+whereas <sys/poll.h> is only needed for ancient glibc (<2.3),
+so let's follow POSIX instead.
+
+As a side-effect, this silences a warning when compiling
+against the musl C-library:
+
+In file included from ./boost/asio/detail/socket_types.hpp:61:0,
+ from ./boost/asio/ip/address_v4.hpp:21,
+ from ./boost/asio/ip/address.hpp:21,
+ from libs/log/src/init_from_settings.cpp:65:
+<sysroot>/usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp]
+ #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
+ ^~~~~~~
+
+etc.
+
+Signed-off-by: André Draszik <adraszik@tycoint.com>
+---
+Upstream-Status: Submitted https://svn.boost.org/trac/boost/ticket/12419
+ boost/asio/detail/socket_types.hpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/boost/asio/detail/socket_types.hpp b/boost/asio/detail/socket_types.hpp
+index e8c7109..7e65d3c 100644
+--- a/boost/asio/detail/socket_types.hpp
++++ b/boost/asio/detail/socket_types.hpp
+@@ -58,7 +58,7 @@
+ #else
+ # include <sys/ioctl.h>
+ # if !defined(__SYMBIAN32__)
+-# include <sys/poll.h>
++# include <poll.h>
+ # endif
+ # include <sys/types.h>
+ # include <sys/stat.h>
+--
+2.9.3
+
diff --git a/common/recipes-support/boost/boost/0002-boost-test-execution_monitor.hpp-fix-mips-soft-float.patch b/common/recipes-support/boost/boost/0002-boost-test-execution_monitor.hpp-fix-mips-soft-float.patch
new file mode 100644
index 00000000..0c22fb61
--- /dev/null
+++ b/common/recipes-support/boost/boost/0002-boost-test-execution_monitor.hpp-fix-mips-soft-float.patch
@@ -0,0 +1,146 @@
+From 5c349a1c391c9ce171a1c80f5164fae764f27dba Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com>
+Date: Wed, 24 Aug 2016 20:58:59 +0100
+Subject: [PATCH 2/4] boost/test/execution_monitor.hpp: fix mips soft float
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+gcc.compile.c++ <builddir>/boost/bin.v2/libs/test/build/gcc-4.3.1/release/threading-multi/execution_monitor.o
+
+ "mipsel-poky-linux-musl-g++" "-mel" "-mabi=32" "-msoft-float" "-march=mips32r2" "-mips16" "-minterlink-compressed" "-mtune=24kec" "-mdsp" "-Wl,-O1" "-Wl,--as-needed" "-fstack-protector-strong" "-Wl,-z,relro,-z,now" "--sysroot=<sysroot>" -ftemplate-depth-128 -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=<srcdir>=/usr/src/debug/boost/1.61.0-r0 -fdebug-prefix-map=<sysroot_host>= -fdebug-prefix-map=<sysroot>= -fstack-protector-strong -pie -fpie -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -fvisibility-inlines-hidden -O3 -finline-functions -Wno-inline -Wall -pedantic -pthread -fPIC -Wno-variadic-macros -DBOOST_ALL_NO_LIB=1 -DBOOST_CHRONO_DYN_LINK=1 -DBOOST_SYSTEM_DYN_LINK=1 -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_TEST_DYN_LINK=1 -DBOOST_TIMER_DYN_LINK=1 -DNDEBUG -I"." -c -o "<builddir>/boost/bin.v2/libs/test/build/gcc-4.3.1/release/threading-multi/execution_monitor.o" "libs/test/src/execution_monitor.cpp"
+
+In file included from ./boost/test/impl/execution_monitor.ipp:31:0,
+ from libs/test/src/execution_monitor.cpp:16:
+./boost/test/execution_monitor.hpp:491:27: error: 'FE_DIVBYZERO' was not declared in this scope
+ BOOST_FPE_DIVBYZERO = FE_DIVBYZERO,
+ ^~~~~~~~~~~~
+./boost/test/execution_monitor.hpp:492:27: error: 'FE_INEXACT' was not declared in this scope
+ BOOST_FPE_INEXACT = FE_INEXACT,
+ ^~~~~~~~~~
+./boost/test/execution_monitor.hpp:493:27: error: 'FE_INVALID' was not declared in this scope
+ BOOST_FPE_INVALID = FE_INVALID,
+ ^~~~~~~~~~
+./boost/test/execution_monitor.hpp:494:27: error: 'FE_OVERFLOW' was not declared in this scope
+ BOOST_FPE_OVERFLOW = FE_OVERFLOW,
+ ^~~~~~~~~~~
+./boost/test/execution_monitor.hpp:495:27: error: 'FE_UNDERFLOW' was not declared in this scope
+ BOOST_FPE_UNDERFLOW = FE_UNDERFLOW,
+ ^~~~~~~~~~~~
+
+The reason is that some (notably FPU-less) architectures,
+including mips*-nf, don't define/implement some of the
+floating point constants, even though fenv.h is
+available.
+
+The key point is:
+ A fully standards conforming fenv.h does not have to
+ define any FE_* macros, and if it does define them,
+ then it defines macros only for the FP exceptions it
+ actually supports.
+
+So correct usage requires a triple check:
+1) Check BOOST_NO_FENV_H to see if the header is supported.
+2) Include the header and then check FE_ALL_EXCEPT to see
+ if any FP exceptions are supported.
+3) Before using the individual FE_* macros, you need to
+ check for their existence too as not all may be
+ supported.
+
+https://svn.boost.org/trac/boost/ticket/11756
+
+Other projects have similar issues, e.g. pixman, and
+apply similar work-arounds:
+ https://lists.freedesktop.org/archives/pixman/2014-February/003172.html
+
+Architectures are notably also allowed to define FE_ALL_EXCEPT to 0!
+Keeping this in mind, and knowing that the compiler will eliminate
+code that can't be executed, we can change BOOST_FPE_ALL to be 0 for
+the case of compiling using Clang and/or fenv.h being unavailable
+as well, which allows simplification of the #ifdef's in
+execution_monitor.ipp a bit.
+
+Signed-off-by: André Draszik <adraszik@tycoint.com>
+---
+Upstream-Status: Submitted https://svn.boost.org/trac/boost/ticket/11756
+ include/boost/test/execution_monitor.hpp | 28 +++++++++++++++++++++++++--
+ include/boost/test/impl/execution_monitor.ipp | 10 ++++++++--
+ 2 files changed, 34 insertions(+), 4 deletions(-)
+
+diff --git a/boost/test/execution_monitor.hpp b/boost/test/execution_monitor.hpp
+index cb83c92..109eeb7 100644
+--- a/boost/test/execution_monitor.hpp
++++ b/boost/test/execution_monitor.hpp
+@@ -488,15 +488,39 @@ enum masks {
+ BOOST_FPE_ALL = MCW_EM,
+ #elif defined(BOOST_NO_FENV_H) || defined(BOOST_CLANG) \
+ || defined(__ARM_PCS)
+- BOOST_FPE_ALL = 1,
++ BOOST_FPE_ALL = 0,
+ #else
++#if defined(FE_DIVBYZERO)
+ BOOST_FPE_DIVBYZERO = FE_DIVBYZERO,
++#else
++ BOOST_FPE_DIVBYZERO = 0,
++#endif
++#if defined(FE_INEXACT)
+ BOOST_FPE_INEXACT = FE_INEXACT,
++#else
++ BOOST_FPE_INEXACT = 0,
++#endif
++#if defined(FE_INVALID)
+ BOOST_FPE_INVALID = FE_INVALID,
++#else
++ BOOST_FPE_INVALID = 0,
++#endif
++#if defined(FE_OVERFLOW)
+ BOOST_FPE_OVERFLOW = FE_OVERFLOW,
++#else
++ BOOST_FPE_OVERFLOW = 0,
++#endif
++#if defined(FE_UNDERFLOW)
+ BOOST_FPE_UNDERFLOW = FE_UNDERFLOW,
+-
++#else
++ BOOST_FPE_UNDERFLOW = 0,
++#endif
++
++#if defined(FE_ALL_EXCEPT)
+ BOOST_FPE_ALL = FE_ALL_EXCEPT,
++#else
++ BOOST_FPE_ALL = 0,
++#endif
+ #endif
+ BOOST_FPE_INV = BOOST_FPE_ALL+1
+ };
+diff --git a/boost/test/impl/execution_monitor.ipp b/boost/test/impl/execution_monitor.ipp
+index 9929f74..6ce9da1 100644
+--- a/boost/test/impl/execution_monitor.ipp
++++ b/boost/test/impl/execution_monitor.ipp
+@@ -1379,7 +1379,10 @@ enable( unsigned mask )
+ #endif
+
+ return ~old_cw & BOOST_FPE_ALL;
+-#elif defined(__GLIBC__) && defined(__USE_GNU) && !defined(BOOST_CLANG) && !defined(BOOST_NO_FENV_H)
++#elif defined(__GLIBC__) && defined(__USE_GNU)
++ if (BOOST_FPE_ALL == 0)
++ /* Not Implemented */
++ return 0;
+ ::feclearexcept(BOOST_FPE_ALL);
+ int res = ::feenableexcept( mask );
+ return res == -1 ? (unsigned)BOOST_FPE_INV : (unsigned)res;
+@@ -1416,7 +1419,10 @@ disable( unsigned mask )
+ #endif
+
+ return ~old_cw & BOOST_FPE_ALL;
+-#elif defined(__GLIBC__) && defined(__USE_GNU) && !defined(BOOST_CLANG) && !defined(BOOST_NO_FENV_H)
++#elif defined(__GLIBC__) && defined(__USE_GNU)
++ if (BOOST_FPE_ALL == 0)
++ /* Not Implemented */
++ return BOOST_FPE_INV;
+ ::feclearexcept(BOOST_FPE_ALL);
+ int res = ::fedisableexcept( mask );
+ return res == -1 ? (unsigned)BOOST_FPE_INV : (unsigned)res;
+--
+2.9.3
+
diff --git a/common/recipes-support/boost/boost/0003-smart_ptr-mips-assembly-doesn-t-compile-in-mips16e-m.patch b/common/recipes-support/boost/boost/0003-smart_ptr-mips-assembly-doesn-t-compile-in-mips16e-m.patch
new file mode 100644
index 00000000..2b48d0d5
--- /dev/null
+++ b/common/recipes-support/boost/boost/0003-smart_ptr-mips-assembly-doesn-t-compile-in-mips16e-m.patch
@@ -0,0 +1,60 @@
+From 4f19d72ca94418431e068cfd4ffb96ed9b289f6c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com>
+Date: Wed, 24 Aug 2016 17:34:59 +0100
+Subject: [PATCH 3/4] smart_ptr: mips assembly doesn't compile in mips16e mode
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+gcc.compile.c++ <builddir>/boost/bin.v2/libs/date_time/build/gcc-4.3.1/release/threading-multi/gregorian/greg_month.o
+
+ "mipsel-poky-linux-musl-g++" "-mel" "-mabi=32" "-msoft-float" "-march=mips32r2" "-mips16" "-minterlink-compressed" "-mtune=24kec" "-mdsp" "-Wl,-O1" "-Wl,--as-needed" "-fstack-protector-strong" "-Wl,-z,relro,-z,now" "--sysroot=<sysroot>" -ftemplate-depth-128 -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=<srcdir>=/usr/src/debug/boost/1.61.0-r0 -fdebug-prefix-map=<sysroot_host>= -fdebug-prefix-map=<sysroot>= -fstack-protector-strong -pie -fpie -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -fvisibility-inlines-hidden -O3 -finline-functions -Wno-inline -Wall -pthread -fPIC -DBOOST_ALL_DYN_LINK=1 -DBOOST_ALL_NO_LIB=1 -DDATE_TIME_INLINE -DNDEBUG -I"." -c -o "<builddir>/boost/bin.v2/libs/date_time/build/gcc-4.3.1/release/threading-multi/gregorian/greg_month.o" "libs/date_time/src/gregorian/greg_month.cpp"
+
+{standard input}: Assembler messages:
+{standard input}:17603: Warning: the `dsp' extension requires MIPS32 revision 2 or greater
+{standard input}:17604: Error: unrecognized opcode `ll $3,4($16)'
+{standard input}:17606: Error: unrecognized opcode `sc $2,4($16)'
+{standard input}:17734: Error: unrecognized opcode `ll $3,8($16)'
+{standard input}:17736: Error: unrecognized opcode `sc $2,8($16)'
+{standard input}:18084: Error: unrecognized opcode `ll $3,4($4)'
+{standard input}:18086: Error: unrecognized opcode `sc $2,4($4)'
+{standard input}:18318: Error: unrecognized opcode `ll $3,8($4)'
+{standard input}:18320: Error: unrecognized opcode `sc $2,8($4)'
+{standard input}:19921: Error: unrecognized opcode `ll $3,4($2)'
+{standard input}:19923: Error: unrecognized opcode `sc $3,4($2)'
+{standard input}:20199: Error: unrecognized opcode `ll $4,4($16)'
+{standard input}:20201: Error: unrecognized opcode `sc $2,4($16)'
+{standard input}:23392: Error: unrecognized opcode `ll $4,8($16)'
+{standard input}:23394: Error: unrecognized opcode `sc $2,8($16)'
+...failed updating 1 target...
+
+boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp
+contains hand-written MIPS assembly, which is not compatible
+with the MIPS16e instruction set.
+
+By not using this file in MIPS16e mode, we fallback to using
+g++ 4.1+ __sync intrinsics (__sync_fetch_and_add() and
+__sync_val_compare_and_swap()) which are working fine.
+
+Signed-off-by: André Draszik <adraszik@tycoint.com>
+---
+Upstream-Status: Backport https://svn.boost.org/trac/boost/ticket/12418
+ boost/smart_ptr/detail/sp_counted_base.hpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/boost/smart_ptr/detail/sp_counted_base.hpp b/boost/smart_ptr/detail/sp_counted_base.hpp
+index 0addf07..0995ca8 100644
+--- a/boost/smart_ptr/detail/sp_counted_base.hpp
++++ b/boost/smart_ptr/detail/sp_counted_base.hpp
+@@ -65,7 +65,7 @@
+ #elif defined( __GNUC__ ) && ( defined( __powerpc__ ) || defined( __ppc__ ) || defined( __ppc ) ) && !defined(__PATHSCALE__) && !defined( _AIX )
+ # include <boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp>
+
+-#elif defined( __GNUC__ ) && ( defined( __mips__ ) || defined( _mips ) ) && !defined(__PATHSCALE__)
++#elif defined( __GNUC__ ) && ( defined( __mips__ ) || defined( _mips ) ) && !defined(__PATHSCALE__) && !defined( __mips16 )
+ # include <boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp>
+
+ #elif defined( BOOST_SP_HAS_SYNC )
+--
+2.9.3
+
diff --git a/common/recipes-support/boost/boost/0004-Use-atomic-by-default-when-BOOST_NO_CXX11_HDR_ATOMIC.patch b/common/recipes-support/boost/boost/0004-Use-atomic-by-default-when-BOOST_NO_CXX11_HDR_ATOMIC.patch
new file mode 100644
index 00000000..ab7826ba
--- /dev/null
+++ b/common/recipes-support/boost/boost/0004-Use-atomic-by-default-when-BOOST_NO_CXX11_HDR_ATOMIC.patch
@@ -0,0 +1,59 @@
+From c234cc557f60729e071d6da59747c1a9289555c5 Mon Sep 17 00:00:00 2001
+From: Peter Dimov <pdimov@pdimov.com>
+Date: Sun, 28 Aug 2016 21:28:21 +0300
+Subject: [PATCH 4/4] Use <atomic> by default when BOOST_NO_CXX11_HDR_ATOMIC is
+ not defined
+
+---
+Upstream-Status: Backport [https://github.com/boostorg/smart_ptr/commit/20fedcff2ca3143503ec4e876d47745ab0ec7b0c]
+Signed-off-by: André Draszik <git@andred.net>
+ boost/smart_ptr/detail/atomic_count.hpp | 3 +++
+ boost/smart_ptr/detail/sp_counted_base.hpp | 3 +++
+ boost/smart_ptr/detail/spinlock.hpp | 3 +++
+ 3 files changed, 9 insertions(+)
+
+diff --git a/boost/smart_ptr/detail/atomic_count.hpp b/boost/smart_ptr/detail/atomic_count.hpp
+index 8aefd44..6e4f71a 100644
+--- a/boost/smart_ptr/detail/atomic_count.hpp
++++ b/boost/smart_ptr/detail/atomic_count.hpp
+@@ -73,6 +73,9 @@
+ #elif defined( BOOST_DISABLE_THREADS ) && !defined( BOOST_SP_ENABLE_THREADS ) && !defined( BOOST_DISABLE_WIN32 )
+ # include <boost/smart_ptr/detail/atomic_count_nt.hpp>
+
++#elif !defined( BOOST_NO_CXX11_HDR_ATOMIC )
++# include <boost/smart_ptr/detail/atomic_count_std_atomic.hpp>
++
+ #elif defined( __GNUC__ ) && ( defined( __i386__ ) || defined( __x86_64__ ) ) && !defined( __PATHSCALE__ )
+ # include <boost/smart_ptr/detail/atomic_count_gcc_x86.hpp>
+
+diff --git a/boost/smart_ptr/detail/sp_counted_base.hpp b/boost/smart_ptr/detail/sp_counted_base.hpp
+index 0995ca8..83ede23 100644
+--- a/boost/smart_ptr/detail/sp_counted_base.hpp
++++ b/boost/smart_ptr/detail/sp_counted_base.hpp
+@@ -44,6 +44,9 @@
+ #elif defined( BOOST_SP_HAS_CLANG_C11_ATOMICS )
+ # include <boost/smart_ptr/detail/sp_counted_base_clang.hpp>
+
++#elif !defined( BOOST_NO_CXX11_HDR_ATOMIC )
++# include <boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp>
++
+ #elif defined( __SNC__ )
+ # include <boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp>
+
+diff --git a/boost/smart_ptr/detail/spinlock.hpp b/boost/smart_ptr/detail/spinlock.hpp
+index 19f93d7..0b618df 100644
+--- a/boost/smart_ptr/detail/spinlock.hpp
++++ b/boost/smart_ptr/detail/spinlock.hpp
+@@ -43,6 +43,9 @@
+ #elif defined( BOOST_SP_USE_PTHREADS )
+ # include <boost/smart_ptr/detail/spinlock_pt.hpp>
+
++#elif !defined( BOOST_NO_CXX11_HDR_ATOMIC )
++# include <boost/smart_ptr/detail/spinlock_std_atomic.hpp>
++
+ #elif defined(__GNUC__) && defined( __arm__ ) && !defined( __thumb__ )
+ # include <boost/smart_ptr/detail/spinlock_gcc_arm.hpp>
+
+--
+2.9.3
+
diff --git a/common/recipes-support/boost/boost/arm-intrinsics.patch b/common/recipes-support/boost/boost/arm-intrinsics.patch
new file mode 100644
index 00000000..fe85c69a
--- /dev/null
+++ b/common/recipes-support/boost/boost/arm-intrinsics.patch
@@ -0,0 +1,55 @@
+Upstream-Status: Backport
+
+8/17/2010 - rebased to 1.44 by Qing He <qing.he@intel.com>
+
+diff --git a/boost/smart_ptr/detail/atomic_count_sync.hpp b/boost/smart_ptr/detail/atomic_count_sync.hpp
+index b6359b5..78b1cc2 100644
+--- a/boost/smart_ptr/detail/atomic_count_sync.hpp
++++ b/boost/smart_ptr/detail/atomic_count_sync.hpp
+@@ -33,17 +33,46 @@ public:
+
+ long operator++()
+ {
++#ifdef __ARM_ARCH_7A__
++ int v1, tmp;
++ asm volatile ("1: \n\t"
++ "ldrex %0, %1 \n\t"
++ "add %0 ,%0, #1 \n\t"
++ "strex %2, %0, %1 \n\t"
++ "cmp %2, #0 \n\t"
++ "bne 1b \n\t"
++ : "=&r" (v1), "+Q"(value_), "=&r"(tmp)
++ );
++#else
+ return __sync_add_and_fetch( &value_, 1 );
++#endif
+ }
+
+ long operator--()
+ {
++#ifdef __ARM_ARCH_7A__
++ int v1, tmp;
++ asm volatile ("1: \n\t"
++ "ldrex %0, %1 \n\t"
++ "sub %0 ,%0, #1 \n\t"
++ "strex %2, %0, %1 \n\t"
++ "cmp %2, #0 \n\t"
++ "bne 1b \n\t"
++ : "=&r" (v1), "+Q"(value_), "=&r"(tmp)
++ );
++ return value_;
++#else
+ return __sync_add_and_fetch( &value_, -1 );
++#endif
+ }
+
+ operator long() const
+ {
++#if __ARM_ARCH_7A__
++ return value_;
++#else
+ return __sync_fetch_and_add( &value_, 0 );
++#endif
+ }
+
+ private:
diff --git a/common/recipes-support/boost/boost/boost-CVE-2012-2677.patch b/common/recipes-support/boost/boost/boost-CVE-2012-2677.patch
new file mode 100644
index 00000000..917617a0
--- /dev/null
+++ b/common/recipes-support/boost/boost/boost-CVE-2012-2677.patch
@@ -0,0 +1,112 @@
+Reference
+
+https://svn.boost.org/trac/boost/changeset/78326
+
+Upstream-Status: Backport
+CVE: CVE-2012-2677
+Signed-off-by: Yue Tao <yue.tao@windriver.com>
+
+diff --git a/boost/pool/pool.hpp.old b/boost/pool/pool.hpp
+index c47b11f..417a1e0 100644
+--- a/boost/pool/pool.hpp.old
++++ b/boost/pool/pool.hpp
+@@ -26,6 +26,8 @@
+
+ #include <boost/pool/poolfwd.hpp>
+
++// std::numeric_limits
++#include <boost/limits.hpp>
+ // boost::integer::static_lcm
+ #include <boost/integer/common_factor_ct.hpp>
+ // boost::simple_segregated_storage
+@@ -355,6 +357,15 @@ class pool: protected simple_segregated_storage < typename UserAllocator::size_t
+ return s;
+ }
+
++ size_type max_chunks() const
++ { //! Calculated maximum number of memory chunks that can be allocated in a single call by this Pool.
++ size_type partition_size = alloc_size();
++ size_type POD_size = integer::static_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type);
++ size_type max_chunks = (std::numeric_limits<size_type>::max() - POD_size) / alloc_size();
++
++ return max_chunks;
++ }
++
+ static void * & nextof(void * const ptr)
+ { //! \returns Pointer dereferenced.
+ //! (Provided and used for the sake of code readability :)
+@@ -375,6 +386,8 @@ class pool: protected simple_segregated_storage < typename UserAllocator::size_t
+ //! the first time that object needs to allocate system memory.
+ //! The default is 32. This parameter may not be 0.
+ //! \param nmax_size is the maximum number of chunks to allocate in one block.
++ set_next_size(nnext_size);
++ set_max_size(nmax_size);
+ }
+
+ ~pool()
+@@ -398,8 +411,8 @@ class pool: protected simple_segregated_storage < typename UserAllocator::size_t
+ }
+ void set_next_size(const size_type nnext_size)
+ { //! Set number of chunks to request from the system the next time that object needs to allocate system memory. This value should never be set to 0.
+- //! \returns nnext_size.
+- next_size = start_size = nnext_size;
++ BOOST_USING_STD_MIN();
++ next_size = start_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(nnext_size, max_chunks());
+ }
+ size_type get_max_size() const
+ { //! \returns max_size.
+@@ -407,7 +420,8 @@ class pool: protected simple_segregated_storage < typename UserAllocator::size_t
+ }
+ void set_max_size(const size_type nmax_size)
+ { //! Set max_size.
+- max_size = nmax_size;
++ BOOST_USING_STD_MIN();
++ max_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(nmax_size, max_chunks());
+ }
+ size_type get_requested_size() const
+ { //! \returns the requested size passed into the constructor.
+@@ -708,9 +722,9 @@ void * pool<UserAllocator>::malloc_need_resize()
+
+ BOOST_USING_STD_MIN();
+ if(!max_size)
+- next_size <<= 1;
++ set_next_size(next_size << 1);
+ else if( next_size*partition_size/requested_size < max_size)
+- next_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size*requested_size/ partition_size);
++ set_next_size(min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size * requested_size / partition_size));
+
+ // initialize it,
+ store().add_block(node.begin(), node.element_size(), partition_size);
+@@ -748,9 +762,9 @@ void * pool<UserAllocator>::ordered_malloc_need_resize()
+
+ BOOST_USING_STD_MIN();
+ if(!max_size)
+- next_size <<= 1;
++ set_next_size(next_size << 1);
+ else if( next_size*partition_size/requested_size < max_size)
+- next_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size*requested_size/ partition_size);
++ set_next_size(min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size * requested_size / partition_size));
+
+ // initialize it,
+ // (we can use "add_block" here because we know that
+@@ -792,6 +806,8 @@ void * pool<UserAllocator>::ordered_malloc(const size_type n)
+ { //! Gets address of a chunk n, allocating new memory if not already available.
+ //! \returns Address of chunk n if allocated ok.
+ //! \returns 0 if not enough memory for n chunks.
++ if (n > max_chunks())
++ return 0;
+
+ const size_type partition_size = alloc_size();
+ const size_type total_req_size = n * requested_size;
+@@ -840,9 +856,9 @@ void * pool<UserAllocator>::ordered_malloc(const size_type n)
+
+ BOOST_USING_STD_MIN();
+ if(!max_size)
+- next_size <<= 1;
++ set_next_size(next_size << 1);
+ else if( next_size*partition_size/requested_size < max_size)
+- next_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size*requested_size/ partition_size);
++ set_next_size(min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size * requested_size / partition_size));
+
+ // insert it into the list,
+ // handle border case.
diff --git a/common/recipes-support/boost/boost/consider-hardfp.patch b/common/recipes-support/boost/boost/consider-hardfp.patch
new file mode 100644
index 00000000..66808a69
--- /dev/null
+++ b/common/recipes-support/boost/boost/consider-hardfp.patch
@@ -0,0 +1,19 @@
+When using soft-float, on ARM we should not expect the FE_* symbols
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+Index: boost_1_60_0/boost/test/execution_monitor.hpp
+===================================================================
+--- boost_1_60_0.orig/boost/test/execution_monitor.hpp
++++ boost_1_60_0/boost/test/execution_monitor.hpp
+@@ -484,7 +484,8 @@ enum masks {
+ BOOST_FPE_UNDERFLOW = EM_UNDERFLOW|EM_DENORMAL,
+
+ BOOST_FPE_ALL = MCW_EM,
+-#elif defined(BOOST_NO_FENV_H) || defined(BOOST_CLANG)
++#elif defined(BOOST_NO_FENV_H) || defined(BOOST_CLANG) \
++ || defined(__ARM_PCS)
+ BOOST_FPE_ALL = 1,
+ #else
+ BOOST_FPE_DIVBYZERO = FE_DIVBYZERO,
diff --git a/common/recipes-support/boost/boost_1.59.0.bb b/common/recipes-support/boost/boost_1.59.0.bb
new file mode 100644
index 00000000..9028b24d
--- /dev/null
+++ b/common/recipes-support/boost/boost_1.59.0.bb
@@ -0,0 +1,14 @@
+include boost-${PV}.inc
+include recipes-support/boost/boost.inc
+
+SRC_URI += "\
+ file://arm-intrinsics.patch \
+ file://consider-hardfp.patch \
+ file://boost-CVE-2012-2677.patch \
+ file://0001-boost-asio-detail-socket_types.hpp-fix-poll.h-includ.patch \
+ file://0002-boost-test-execution_monitor.hpp-fix-mips-soft-float.patch \
+ file://0003-smart_ptr-mips-assembly-doesn-t-compile-in-mips16e-m.patch \
+ file://0004-Use-atomic-by-default-when-BOOST_NO_CXX11_HDR_ATOMIC.patch \
+"
+
+TARGET_CPPFLAGS += " -D_GLIBCXX_USE_CXX11_ABI=0"
diff --git a/common/recipes-support/fltk/fltk/0001-fix_undefined_Fl_XFont_On_Demand.patch b/common/recipes-support/fltk/fltk/0001-fix_undefined_Fl_XFont_On_Demand.patch
new file mode 100644
index 00000000..b162de62
--- /dev/null
+++ b/common/recipes-support/fltk/fltk/0001-fix_undefined_Fl_XFont_On_Demand.patch
@@ -0,0 +1,13 @@
+diff --git a/FL/x.H b/FL/x.H
+index 85c6f6c..0ea132f 100644
+--- a/FL/x.H
++++ b/FL/x.H
+@@ -114,7 +114,7 @@ FL_EXPORT Fl_Region XRectangleRegion(int x, int y, int w, int h); // in fl_rect.
+ // With Xlib / X11 fonts, fl_xfont will return the current selected font.
+ // With XFT / X11 fonts, fl_xfont will attempt to return the bitmap "core" font most
+ // similar to (usually the same as) the current XFT font.
+-class Fl_XFont_On_Demand
++class FL_EXPORT Fl_XFont_On_Demand
+ {
+ public:
+ Fl_XFont_On_Demand(XFontStruct* p = NULL) : ptr(p) { }
diff --git a/common/recipes-support/fltk/fltk_1.3.3.bbappend b/common/recipes-support/fltk/fltk_1.3.3.bbappend
new file mode 100644
index 00000000..825db2bd
--- /dev/null
+++ b/common/recipes-support/fltk/fltk_1.3.3.bbappend
@@ -0,0 +1,3 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI_append += "file://0001-fix_undefined_Fl_XFont_On_Demand.patch"
diff --git a/common/recipes-support/libtinyxml/libtinyxml_%.bbappend b/common/recipes-support/libtinyxml/libtinyxml_%.bbappend
new file mode 100644
index 00000000..3c23ed8b
--- /dev/null
+++ b/common/recipes-support/libtinyxml/libtinyxml_%.bbappend
@@ -0,0 +1 @@
+EXTRA_CXXFLAGS += " -D_GLIBCXX_USE_CXX11_ABI=0"