]> code.ossystems Code Review - openembedded-core.git/commitdiff
perf: flag __SANE_USERSPACE_TYPES__ to include int-ll64.h for powerpc64
authorTing Liu <b28495@freescale.com>
Fri, 11 Oct 2013 08:11:44 +0000 (16:11 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 18 Oct 2013 14:47:11 +0000 (15:47 +0100)
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) {
|        ^

Signed-off-by: Ting Liu <b28495@freescale.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/recipes-kernel/perf/perf.bb

index 269069f3af29725d5f476931349b7977cf90d439..d27e535605d7a2a63eb6dcd78103495f150993b3 100644 (file)
@@ -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() {