On Wed, Oct 5, 2011 at 12:02 PM, Matthew McClintock <[email protected]> wrote:
> __ppc64__ is not defined on powerpc64, rather __powerpc64__ is, this
> uses a patch that is already upstream to fix builds for powerpc64
>
> Signed-off-by: Matthew McClintock <[email protected]>
> ---
>  ...PowerPC-checks-for-__NR_perf_counter_open.patch |   35 
> ++++++++++++++++++++
>  meta/recipes-kernel/sysprof/sysprof_git.bb         |    1 +
>  2 files changed, 36 insertions(+), 0 deletions(-)
>  create mode 100644 
> meta/recipes-kernel/sysprof/files/0001-Fix-PowerPC-checks-for-__NR_perf_counter_open.patch
>
> diff --git 
> a/meta/recipes-kernel/sysprof/files/0001-Fix-PowerPC-checks-for-__NR_perf_counter_open.patch
>  
> b/meta/recipes-kernel/sysprof/files/0001-Fix-PowerPC-checks-for-__NR_perf_counter_open.patch
> new file mode 100644
> index 0000000..041054e
> --- /dev/null
> +++ 
> b/meta/recipes-kernel/sysprof/files/0001-Fix-PowerPC-checks-for-__NR_perf_counter_open.patch
> @@ -0,0 +1,35 @@
> +Upstream-Status: Backport
> +
> +From 4708a509aa9d65ae93e9824e42ddbc6e8d42d90c Mon Sep 17 00:00:00 2001
> +From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <[email protected]>
> +Date: Sat, 27 Aug 2011 20:04:44 +0200
> +Subject: [PATCH] Fix PowerPC checks for __NR_perf_counter_open.
> +MIME-Version: 1.0
> +Content-Type: text/plain; charset=UTF-8
> +Content-Transfer-Encoding: 8bit
> +
> +__ppc__ isn't defined here on Debian powerpc. Grepping through the headers
> +installed in /usr/include, there are a few references to __ppc__ and
> +__ppc64__, but I suspect they're for other OSs.
> +

is sysprof linux specific? if not then this change will mean that it wont work
on other OSes which dont define __powerpc64__ e.g. darwin. Better solution is to
check for both __ppc64__ and __powerpc64__

but thats something for sysprof upstream to consider. For OE this
patch is sufficient

> +Signed-off-by: Michel Dänzer <[email protected]>
> +---
> + collector.c |    2 +-
> + 1 files changed, 1 insertions(+), 1 deletions(-)
> +
> +diff --git a/collector.c b/collector.c
> +index b28964f..fe16967 100644
> +--- a/collector.c
> ++++ b/collector.c
> +@@ -175,7 +175,7 @@ sysprof_perf_counter_open (struct perf_counter_attr 
> *attr,
> + #define __NR_perf_counter_open 337
> + #elif defined(__hppa__)
> + #define __NR_perf_counter_open 318
> +-#elif defined(__ppc__) || defined(__ppc64__)
> ++#elif defined(__powerpc__) || defined(__powerpc64__)
> + #define __NR_perf_counter_open 319
> + #elif defined(__s390__)
> + #define __NR_perf_counter_open 331
> +--
> +1.7.6.1
> +
> diff --git a/meta/recipes-kernel/sysprof/sysprof_git.bb 
> b/meta/recipes-kernel/sysprof/sysprof_git.bb
> index 10bde04..c553263 100644
> --- a/meta/recipes-kernel/sysprof/sysprof_git.bb
> +++ b/meta/recipes-kernel/sysprof/sysprof_git.bb
> @@ -10,6 +10,7 @@ PV = "1.1.8+git${SRCPV}"
>
>  SRC_URI = "git://git.gnome.org/sysprof;protocol=git \
>            file://define-NT_GNU_BUILD_ID.patch \
> +          file://0001-Fix-PowerPC-checks-for-__NR_perf_counter_open.patch \
>           "
>
>  SRC_URI_append_arm  = " file://rmb-arm.patch"
> --
> 1.7.6.1
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> [email protected]
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Reply via email to