Squashed 'yocto-poky/' content from commit ea562de
git-subtree-dir: yocto-poky
git-subtree-split: ea562de57590c966cd5a75fda8defecd397e6436
diff --git a/meta/recipes-kernel/sysprof/files/define-NT_GNU_BUILD_ID.patch b/meta/recipes-kernel/sysprof/files/define-NT_GNU_BUILD_ID.patch
new file mode 100644
index 0000000..dcc2cbe
--- /dev/null
+++ b/meta/recipes-kernel/sysprof/files/define-NT_GNU_BUILD_ID.patch
@@ -0,0 +1,22 @@
+On uclibc elf.h does not have GNU extentions but we need this define
+so we define it locally if its not getting it from elf.h
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+
+Index: git/elfparser.h
+===================================================================
+--- git.orig/elfparser.h 2011-07-16 18:57:41.000000000 -0700
++++ git/elfparser.h 2011-07-16 20:28:54.733829895 -0700
+@@ -17,6 +17,10 @@
+ */
+ #include <glib.h>
+
++#ifndef NT_GNU_BUILD_ID
++#define NT_GNU_BUILD_ID 3
++#endif
++
+ typedef struct ElfSym ElfSym;
+ typedef struct ElfParser ElfParser;
+
diff --git a/meta/recipes-kernel/sysprof/files/rmb-arm.patch b/meta/recipes-kernel/sysprof/files/rmb-arm.patch
new file mode 100644
index 0000000..c53ac64
--- /dev/null
+++ b/meta/recipes-kernel/sysprof/files/rmb-arm.patch
@@ -0,0 +1,21 @@
+
+Upstream-Status: Pending
+
+Index: git/util.h
+===================================================================
+--- git.orig/util.h 2010-12-07 22:41:57.156243001 -0600
++++ git/util.h 2010-12-07 22:43:47.616243002 -0600
+@@ -37,4 +37,13 @@
+ #define cpu_relax() asm volatile("" ::: "memory");
+ #endif
+
++#ifdef __arm__
++/*
++ * Use the __kuser_memory_barrier helper in the CPU helper page. See
++ * arch/arm/kernel/entry-armv.S in the kernel source for details.
++ */
++#define rmb() ((void(*)(void))0xffff0fa0)()
++#define cpu_relax() asm volatile("":::"memory")
++#endif
++
+ #endif
diff --git a/meta/recipes-kernel/sysprof/files/rmb-mips.patch b/meta/recipes-kernel/sysprof/files/rmb-mips.patch
new file mode 100644
index 0000000..e055b8a
--- /dev/null
+++ b/meta/recipes-kernel/sysprof/files/rmb-mips.patch
@@ -0,0 +1,22 @@
+Upstream-Status: Pending
+
+Index: git/util.h
+===================================================================
+--- git.orig/util.h 2010-12-08 01:22:44.486243001 -0600
++++ git/util.h 2010-12-08 01:23:27.836243001 -0600
+@@ -37,4 +37,15 @@
+ #define cpu_relax() asm volatile("" ::: "memory");
+ #endif
+
++#ifdef __mips__
++#define rmb() asm volatile( \
++ ".set mips2\n\t" \
++ "sync\n\t" \
++ ".set mips0" \
++ : /* no output */ \
++ : /* no input */ \
++ : "memory")
++#define cpu_relax() asm volatile("" ::: "memory")
++#endif
++
+ #endif
diff --git a/meta/recipes-kernel/sysprof/sysprof_git.bb b/meta/recipes-kernel/sysprof/sysprof_git.bb
new file mode 100644
index 0000000..19c3e10
--- /dev/null
+++ b/meta/recipes-kernel/sysprof/sysprof_git.bb
@@ -0,0 +1,27 @@
+SUMMARY = "System-wide Performance Profiler for Linux"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+DEPENDS = "gtk+ libglade"
+
+SRCREV = "cd44ee6644c3641507fb53b8a2a69137f2971219"
+PV = "1.2.0+git${SRCPV}"
+
+SRC_URI = "git://git.gnome.org/sysprof \
+ file://define-NT_GNU_BUILD_ID.patch \
+ "
+
+SRC_URI_append_arm = " file://rmb-arm.patch"
+SRC_URI_append_armeb = " file://rmb-arm.patch"
+SRC_URI_append_mips = " file://rmb-mips.patch"
+SRC_URI_append_mips64 = " file://rmb-mips.patch"
+SRC_URI_append_mips64n32 = " file://rmb-mips.patch"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
+
+# We do not yet work for aarch64.
+#
+COMPATIBLE_HOST = "^(?!aarch64).*"
+