[OE-core] [PATCH 2/2] qemu-native:fix do_compile failed with gcc 4.3.4 on x86 host
Hongxu Jia
hongxu.jia at windriver.com
Thu Feb 28 07:09:14 UTC 2013
When compile qemu-native with GCC 4.3.4 on x86 host, the GCC needs
`-march' to let the atomic operations ("lock free") be available. Pass
`-march=native' to cause the compiler to auto-detect the architecture of the
build computer, If the auto-detect is unsuccessful the option has no effect.
[YOCTO #3563]
Signed-off-by: Hongxu Jia <hongxu.jia at windriver.com>
---
meta/recipes-devtools/qemu/qemu.inc | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index 6c44b31..73734f4 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -38,6 +38,12 @@ EXTRA_OECONF_class-nativesdk = "--target-list=${@get_qemu_target_list(d)} --disa
--disable-curl \
"
+# When compile qemu-native with GCC 4.3.4 on x86 host, the GCC needs
+# `-march' to let the atomic operations ("lock free") be available. Pass
+# `-march=native' to cause the compiler to auto-detect the architecture of the
+# build computer, If the auto-detect is unsuccessful the option has no effect.
+BUILD_CFLAGS += "-march=native"
+
do_configure_prepend_class-native() {
# Undo the -lX11 added by linker-flags.patch, don't assume that host has libX11 installed
sed -i 's/-lX11//g' Makefile.target
--
1.7.10.4
More information about the Openembedded-core
mailing list