From dba3eff8e21c9ed905ad294ff9a66593c1192ad9 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Fri, 11 Oct 2013 16:11:44 +0800 Subject: [PATCH] perf: flag __SANE_USERSPACE_TYPES__ to include int-ll64.h for powerpc64 PPC64 uses long long for u64 in the kernel, but powerpc's asm/types.h prevents 64-bit userland from seeing this definition, instead defaulting to u64 == long in userspace. Perf want LL64, flag __SANE_USERSPACE_TYPES__ to get int-ll64.h. Fix the below issue: | tests/attr.c:71:4: error: format '%llu' expects argument of type 'long long unsigned int', but argument 6 has type '__u64' [-Werror=format=] | tests/attr.c:80:7: error: format '%llu' expects argument of type 'long long unsigned int', but argument 4 has type '__u64' [-Werror=format=] | attr->type, attr->config, fd) < 0) { | ^ (From OE-Core master rev: e0b56f7ed84da4f71f448548e15d5a75e8eada6e) (From OE-Core rev: 7d55375ddc1a928e77d5687a8e7b36eecb91c594) Signed-off-by: Ting Liu Signed-off-by: Saul Wold Signed-off-by: Richard Purdie Signed-off-by: Robert Yang Signed-off-by: Richard Purdie --- meta/recipes-kernel/perf/perf.bb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb index 269069f3af..d27e535605 100644 --- a/meta/recipes-kernel/perf/perf.bb +++ b/meta/recipes-kernel/perf/perf.bb @@ -89,6 +89,12 @@ EXTRA_OEMAKE += "\ 'infodir=${@oe.path.relative(prefix, infodir)}' \ " +# PPC64 uses long long for u64 in the kernel, but powerpc's asm/types.h +# prevents 64-bit userland from seeing this definition, instead defaulting +# to u64 == long in userspace. Define __SANE_USERSPACE_TYPES__ to get +# int-ll64.h included. +EXTRA_OEMAKE_append_powerpc64 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__' + PARALLEL_MAKE = "" do_compile() {