Patchwork [1/2] glib-2.0-native:fix do_configure failed with gcc 4.3.4 on x86 host

login
register
mail settings
Submitter Hongxu Jia
Date Jan. 17, 2013, 7:49 a.m.
Message ID <270a48284b7cdbb1f0b6db644ac5b246d279c3cb.1358408649.git.hongxu.jia@windriver.com>
Download mbox | patch
Permalink /patch/42771/
State New
Headers show

Comments

Hongxu Jia - Jan. 17, 2013, 7:49 a.m.
Add an option `-march' to BUILD_CFLAGS, GCC 4.3.4 on x86 host needs this
option to let the atomic operations ("lock free") be available while it
is used to compile glib-2.0-native.

[YOCTO #3563]

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 meta/recipes-core/glib-2.0/glib-2.0_2.34.3.bb |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Patch

diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.34.3.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.34.3.bb
index e1d44e2..33ab881 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0_2.34.3.bb
+++ b/meta/recipes-core/glib-2.0/glib-2.0_2.34.3.bb
@@ -1,6 +1,6 @@ 
 require glib.inc
 
-PR = "r1"
+PR = "r2"
 PE = "1"
 
 DEPENDS += "libffi python-argparse-native zlib"
@@ -40,6 +40,11 @@  RDEPENDS_${PN}-ptest += "\
             python-dbus \
            "
 
+# Add an option `-march' to BUILD_CFLAGS, GCC 4.3.4 on x86 host needs this
+# option to let the atomic operations ("lock free") be available while it
+# is used to compile glib-2.0-native
+BUILD_CFLAGS += "-march=${@'${BUILD_ARCH}'.replace('_','-')}"
+
 do_configure_prepend() {
 	sed -i -e '1s,#!.*,#!${USRBINPATH}/env python,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in
 }