From patchwork Sun Jan 6 08:34:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1/1] glib-2.0-native:add option march to BUILD_CFLAGS Date: Sun, 06 Jan 2013 08:34:26 -0000 From: Hongxu Jia X-Patchwork-Id: 42031 Message-Id: <2f2c14ff5bbe6619fd7ac1649f5f985604bd6941.1357354330.git.hongxu.jia@windriver.com> To: Add option -march to BUILD_CFLAGS in order to let the atomic operations ("lock free") be available while using old version GCC (4.3.4 for example) on x86 host to compile glib-2.0-native. Signed-off-by: Hongxu Jia --- meta/recipes-core/glib-2.0/glib-2.0_2.34.3.bb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 9854585..07d16bd 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 = "r0" +PR = "r1" PE = "1" DEPENDS += "libffi python-argparse-native zlib" @@ -38,6 +38,10 @@ RDEPENDS_${PN}-ptest += "\ python-pygobject \ python-dbus \ " +# Add option -march to BUILD_CFLAGS in order to let the atomic operations +# ("lock free") be available while using old version GCC on x86 host 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