From e609afe4d747059480b406602cab90b7c36a0572 Mon Sep 17 00:00:00 2001 From: Hongxu Jia Date: Tue, 12 Mar 2013 09:54:06 +0800 Subject: 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 and qemu-common.h in sequence. The header include map is: (`-->' presents `include') ... "virtfs-proxy-helper.c" --> ... "virtfs-proxy-helper.c" --> "qemu-common.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 ` --> ' is prevented, and '__u64' is defined in . 4, Modify virtfs-proxy-helper.c to include 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 Signed-off-by: Saul Wold Signed-off-by: Richard Purdie --- meta/recipes-devtools/qemu/qemu.inc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'meta/recipes-devtools/qemu/qemu.inc') diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc index 5616a06335..f9b22f3a75 100644 --- a/meta/recipes-devtools/qemu/qemu.inc +++ b/meta/recipes-devtools/qemu/qemu.inc @@ -32,6 +32,10 @@ SRC_URI_append_class-nativesdk = "\ file://relocatable_sdk.patch \ " +SRC_URI_append_class-native = "\ + file://fix-libcap-header-issue-on-some-distro.patch \ + " + EXTRA_OECONF += "--target-list=${@get_qemu_target_list(d)} --disable-werror --disable-vnc-tls --audio-drv-list=oss,alsa --audio-card-list=ac97,es1370 ${SDL} --disable-curl --disable-vnc-jpeg --disable-bluez --with-system-pixman" EXTRA_OECONF_class-nativesdk = "--target-list=${@get_qemu_target_list(d)} --disable-werror --disable-vnc-tls \ -- cgit v1.2.3-54-g00ecf