Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 1/2] perf: flag __SANE_USERSPACE_TYPES__ to include int-ll64.h for powerpc64
@ 2013-10-11  8:11 b28495
  2013-10-11  8:11 ` [PATCH 2/2] socat: add dependency on tcp-wrappers b28495
  2013-10-30  3:45 ` [PATCH 1/2] perf: flag __SANE_USERSPACE_TYPES__ to include int-ll64.h for powerpc64 Yang Shi
  0 siblings, 2 replies; 3+ messages in thread
From: b28495 @ 2013-10-11  8:11 UTC (permalink / raw)
  To: openembedded-core

From: Ting Liu <b28495@freescale.com>

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>
---
 meta/recipes-kernel/perf/perf.bb |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index 269069f..d27e535 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() {
-- 
1.7.3.4




^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-10-30  3:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-11  8:11 [PATCH 1/2] perf: flag __SANE_USERSPACE_TYPES__ to include int-ll64.h for powerpc64 b28495
2013-10-11  8:11 ` [PATCH 2/2] socat: add dependency on tcp-wrappers b28495
2013-10-30  3:45 ` [PATCH 1/2] perf: flag __SANE_USERSPACE_TYPES__ to include int-ll64.h for powerpc64 Yang Shi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox