generic-poky/meta/recipes-devtools/qemu
Hongxu Jia e609afe4d7 qemu-native:fix do_compile failed on SLED 11.2
1, When build qemu-native on SLED 11.2, there is an error:
...
| In file included from /usr/include/bits/sigcontext.h:28,
|    from /usr/include/signal.h:339,
|    from /buildarea2/tmp/work/i686-linux/qemu-native/1.4.0-r0/
qemu-1.4.0/include/qemu-common.h:42,
|    from fsdev/virtfs-proxy-helper.c:23:
| /usr/include/asm/sigcontext.h:28: error: expected specifier-
qualifier-list before '__u64'
| /usr/include/asm/sigcontext.h:191: error: expected specifier-
qualifier-list before '__u64'
...

2, The virtfs-proxy-helper.c includes <sys/capability.h> and
qemu-common.h in sequence. The header include map is:
(`-->' presents `include')
...
"virtfs-proxy-helper.c" --> <sys/capability.h>
...
"virtfs-proxy-helper.c" --> "qemu-common.h" --> <signal.h> -->
<bits/sigcontext.h> --> <asm/sigcontext.h> --> <linux/types.h> -->
<asm/types.h> --> <asm-generic/types.h> --> <asm-generic/int-ll64.h>
...

3, The bug is found on SLED 11.2 x86. In libcap header file
/usr/include/sys/capability.h, it does evil stuff like this:
...
  25 /*
  26  * Make sure we can be included from userland by preventing
  27  * capability.h from including other kernel headers
  28  */
  29 #define _LINUX_TYPES_H
  30 #define _LINUX_FS_H
  31 #define __LINUX_COMPILER_H
  32 #define __user
  33
  34 typedef unsigned int __u32;
  35 typedef __u32 __le32;
...
This completely prevents including /usr/include/linux/types.h.
The above `<asm/sigcontext.h> --> <linux/types.h>' is prevented,
and '__u64' is defined in <asm-generic/int-ll64.h>.

4, Modify virtfs-proxy-helper.c to include <sys/capability.h>
last to workaround the issue.

http://www.linuxtv.org/pipermail/vdr/2009-August/021194.html
http://patchwork.linuxtv.org/patch/12748/

[YOCTO #4001]

(From OE-Core rev: 1267bb2fd91f205d35e805aa019d25ab7a921b14)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-15 01:53:04 +00:00
..
files qemu-native:fix do_compile failed on SLED 11.2 2013-03-15 01:53:04 +00:00
qemu-helper Major layout change to the packages directory 2010-08-27 15:29:45 +01:00
nativesdk-qemu-helper_1.0.bb nativesdk: Switch to using nativesdk as a prefix, not a suffix 2012-09-02 05:52:06 -07:00
qemu-helper-native_1.0.bb RDEPENDS, RRECOMMENDS -> RDPEPENDS_${PN}, RRECOMMENDS_${PN} 2010-12-30 10:03:10 +00:00
qemu-targets.inc Convert tab indentation in python functions into four-space 2012-07-19 10:24:50 +01:00
qemu.inc qemu-native:fix do_compile failed on SLED 11.2 2013-03-15 01:53:04 +00:00
qemu_1.4.0.bb qemu: Upgrade to 1.4.0 release 2013-03-05 13:14:55 +00:00
qemu_git.bb qemu: upgrade to 1.3.1 2013-02-15 12:17:33 +00:00
qemuwrapper-cross_1.0.bb qemuwrapper: Don't use STAGING_BINDIR_CROSS directly 2013-02-07 12:59:15 +00:00