Skip to contentSkip to conversation

perf: flag __SANE_USERSPACE_TYPES__ to include int-ll64.h for mips64

PATCH In review [email protected] 2 participants 3 messages Oct 26, 2013 – Oct 30, 2013

lore
Share & tools
lore
#0 lore raw

cover perf: flag __SANE_USERSPACE_TYPES__ to include int-ll64.h for mips64

From: Wenzong Fan <[email protected]>

As the same reason to powerpc64, mips64 also need the flag:

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) {
| ^

The following changes since commit 754e8768b69acba89bd6c3ba5dbe55b9df4d8083:

base.bbclass: fix nondeterministic PACKAGECONFIG processing order (2013-10-24 08:38:27 +0100)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib wenzong/perf
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=wenzong/perf

Wenzong Fan (1):
perf: flag __SANE_USERSPACE_TYPES__ to include int-ll64.h for mips64

 meta/recipes-kernel/perf/perf.bb |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 perf: flag __SANE_USERSPACE_TYPES__ to include int-ll64.h for mips64

From: Wenzong Fan <[email protected]>

As the same reason to powerpc64, mips64 also need the flag.

---
 meta/recipes-kernel/perf/perf.bb |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-kernel/perf/perf.bb +2 -1
index d27e535..903ffa6 100644
@@ -92,8 +92,9 @@ EXTRA_OEMAKE += "\
 # 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.
+# int-ll64.h included. And MIPS64 has the same issue.
 EXTRA_OEMAKE_append_powerpc64 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__'
+EXTRA_OEMAKE_append_mips64 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__'
 
 PARALLEL_MAKE = ""
 
Signature · 1 line
1.7.9.5
#2 lore raw
Quoted 14 lines · On 10/26/2013 12:53 AM, [email protected] wrote:

From: Wenzong Fan <[email protected]>

As the same reason to powerpc64, mips64 also need the flag.

---
  meta/recipes-kernel/perf/perf.bb |    3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-kernel/perf/perf.bb +0 -0
index d27e535..903ffa6 100644

meta/recipes-kernel/perf/perf.bb EXTRA_OEMAKE += "\ · line 97

Quoted 7 lines
meta/recipes-kernel/perf/perf.bb +2 -1
@@ -92,8 +92,9 @@ EXTRA_OEMAKE += "\
  # 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.
+# int-ll64.h included. And MIPS64 has the same issue.
  EXTRA_OEMAKE_append_powerpc64 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__'
+EXTRA_OEMAKE_append_mips64 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__'

As the PPC64 counterpart, this override perf CFLAGS incorrectly.

Please check the below comparison.

With this commit:

-D__SANE_USERSPACE_TYPES__ -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Iutil/include -Iarch/mips/include -I/home/yshi/windriver/workspace/qemumips64/bitbake_build/tmp/work/qemumips64-wrs-linux/perf/1.0-r8/perf-1.0/arch/mips/include/generated/uapi -I/home/yshi/windriver/workspace/qemumips64/bitbake_build/tmp/sysroots/qemumips64/usr/src/kernel/arch/mips/include/uapi -I/home/yshi/windriver/workspace/qemumips64/bitbake_build/tmp/sysroots/qemumips64/usr/src/kernel/arch/mips/include -I/home/yshi/windriver/workspace/qemumips64/bitbake_build/tmp/work/qemumips64-wrs-linux/perf/1.0-r8/perf-1.0/include/generated/uapi -I/home/yshi/windriver/workspace/qemumips64/bitbake_build/tmp/sysroots/qemumips64/usr/src/kernel/include/uapi -I/home/yshi/windriver/workspace/qemumips64/bitbake_build/tmp/sysroots/qemumips64/usr/src/kernel/include -I/home/yshi/windriver/workspace/qemumips64/bitbake_build/tmp/work/qemumips64-wrs-linux/perf/1.0-r8/perf-1.0/util -Iutil -I. -I../lib/traceevent/ -I../lib/ -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -I/home/yshi/windriver/workspace/qemumips64/bitbake_build/tmp/work/qemumips64-wrs-linux/perf/1.0-r8/perf-1.0/ -DLIBELF_SUPPORT -DLIBELF_MMAP -DSLANG_SUPPORT -idirafter =/usr/include/slang -DHAVE_ON_EXIT -DBACKTRACE_SUPPORT : /usr/bin:/usr/lib64/perf/perf-core:share/perf-core/templates:/usr

Right perf CFLAGS without this commit:

-fno-omit-frame-pointer -ggdb3 -funwind-tables -Wall -Wextra -std=gnu99 -Werror -O6 -Wbad-function-cast -Wdeclaration-after-statement -Wformat-security -Wformat-y2k -Winit-self -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wno-system-headers -Wold-style-definition -Wpacked -Wredundant-decls -Wshadow -Wstrict-aliasing=3 -Wstrict-prototypes -Wswitch-default -Wswitch-enum -Wundef -Wwrite-strings -Wformat -fstack-protector-all -Wstack-protector -Wvolatile-register-var -D_FORTIFY_SOURCE=2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Iutil/include -Iarch/mips/include -I/home/yshi/windriver/workspace/qemumips64/bitbake_build/tmp/work/qemumips64-wrs-linux/perf/1.0-r8/perf-1.0/arch/mips/include/generated/uapi -I/home/yshi/windriver/workspace/qemumips64/bitbake_build/tmp/sysroots/qemumips64/usr/src/kernel/arch/mips/include/uapi -I/home/yshi/windriver/workspace/qemumips64/bitbake_build/tmp/sysroots/qemumips64/usr/src/kernel/arch/mips/include -I/home/yshi/windriver/workspace/qemumips64/bitbake_build/tmp/work/qemumips64-wrs-linux/perf/1.0-r8/perf-1.0/include/generated/uapi -I/home/yshi/windriver/workspace/qemumips64/bitbake_build/tmp/sysroots/qemumips64/usr/src/kernel/include/uapi -I/home/yshi/windriver/workspace/qemumips64/bitbake_build/tmp/sysroots/qemumips64/usr/src/kernel/include -I/home/yshi/windriver/workspace/qemumips64/bitbake_build/tmp/work/qemumips64-wrs-linux/perf/1.0-r8/perf-1.0/util -Iutil -I. -I../lib/traceevent/ -I../lib/ -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -I/home/yshi/windriver/workspace/qemumips64/bitbake_build/tmp/work/qemumips64-wrs-linux/perf/1.0-r8/perf-1.0/ -DLIBELF_SUPPORT -DLIBELF_MMAP -DSLANG_SUPPORT -idirafter =/usr/include/slang -DHAVE_ON_EXIT -DBACKTRACE_SUPPORT : /usr/bin:/usr/lib64/perf/perf-core:share/perf-core/templates:/usr