diff options
author | Jackie Huang <jackie.huang@windriver.com> | 2013-07-08 10:45:09 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-07-10 09:42:03 +0100 |
commit | b472553fa3668975f774fa88fb0da664c269f57d (patch) | |
tree | a1a1a2e8c003f90b3d06382a8d57c454e5e9e9a1 /meta | |
parent | 258b8a2cb4178990fc20102add1e3043ac80dbf9 (diff) | |
download | poky-b472553fa3668975f774fa88fb0da664c269f57d.tar.gz |
glib-2.0: add -march=i486 into CFLAGS automatically when needed.
glib configure will check if current gcc need -march=i486,
when gcc need -march=i486 but CFLAGS don't have,
glib configure will abort and advise the user to add -march=i486.
This will break the build process,it's not good for automatic build system.
so change this to adding -march=i486 automatically when it is needed.
(From OE-Core rev: fdd523e5a14cacf31dce4dae435267e30dff9222)
Signed-off-by: Song.Li <Song.Li@windriver.com>
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-core/glib-2.0/glib-2.0/add-march-i486-into-CFLAGS-automatically.patch | 39 | ||||
-rw-r--r-- | meta/recipes-core/glib-2.0/glib-2.0_2.36.3.bb | 1 |
2 files changed, 40 insertions, 0 deletions
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/add-march-i486-into-CFLAGS-automatically.patch b/meta/recipes-core/glib-2.0/glib-2.0/add-march-i486-into-CFLAGS-automatically.patch new file mode 100644 index 0000000000..3aac35a5d3 --- /dev/null +++ b/meta/recipes-core/glib-2.0/glib-2.0/add-march-i486-into-CFLAGS-automatically.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From 55253b55b9c65f3e0efbbe03cbab2a4c4014a16b Mon Sep 17 00:00:00 2001 | ||
2 | From: Song.Li <Song.Li@windriver.com> | ||
3 | Date: Thu, 5 Jul 2012 15:09:41 +0800 | ||
4 | Subject: [PATCH] add -march=i486 into CFLAGS automatically | ||
5 | |||
6 | Upstream-Status: Inappropriate [configuration] | ||
7 | |||
8 | glib configure will check if current gcc need -march=i486, | ||
9 | when gcc need -march=i486 but CFLAGS don't have, | ||
10 | glib configure will abort and advise the user to add -march=i486 or later. | ||
11 | This will break the build process,it's not good for automatic build system. | ||
12 | so change this to adding -march=i485 automatically when it is needed. | ||
13 | --- | ||
14 | configure.ac | 6 ++++-- | ||
15 | 1 files changed, 4 insertions(+), 2 deletions(-) | ||
16 | |||
17 | Index: glib-2.36.0/configure.ac | ||
18 | =================================================================== | ||
19 | --- glib-2.36.0.orig/configure.ac | ||
20 | +++ glib-2.36.0/configure.ac | ||
21 | @@ -2378,7 +2378,7 @@ dnl | ||
22 | dnl Note that the atomic ops are only available with GCC on x86 when | ||
23 | dnl using -march=i486 or higher. If we detect that the atomic ops are | ||
24 | dnl not available but would be available given the right flags, we want | ||
25 | -dnl to abort and advise the user to fix their CFLAGS. It's better to do | ||
26 | +dnl to add -march=i486 automatically to fix their CFLAGS. It's better to do | ||
27 | dnl that then to silently fall back on emulated atomic ops just because | ||
28 | dnl the user had the wrong build environment. | ||
29 | |||
30 | @@ -2401,7 +2401,8 @@ AC_CACHE_CHECK([for lock-free atomic int | ||
31 | AC_TRY_COMPILE([], | ||
32 | [volatile int atomic = 2;\ | ||
33 | __sync_bool_compare_and_swap (&atomic, 2, 3);], | ||
34 | - [AC_MSG_ERROR([GLib must be build with -march=i486 or later.])], | ||
35 | + [AC_MSG_WARN([GLib must be build with -march=i486 or later.]) | ||
36 | + SAVE_CFLAGS="${SAVE_CFLAGS} -march=i486"], | ||
37 | []) | ||
38 | CFLAGS="${SAVE_CFLAGS}" | ||
39 | fi | ||
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.36.3.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.36.3.bb index 463dc0d501..1f784bdcb8 100644 --- a/meta/recipes-core/glib-2.0/glib-2.0_2.36.3.bb +++ b/meta/recipes-core/glib-2.0/glib-2.0_2.36.3.bb | |||
@@ -13,6 +13,7 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \ | |||
13 | file://glib-2.0_fix_for_x32.patch \ | 13 | file://glib-2.0_fix_for_x32.patch \ |
14 | file://fix-conflicting-rand.patch \ | 14 | file://fix-conflicting-rand.patch \ |
15 | file://Makefile-ptest.patch \ | 15 | file://Makefile-ptest.patch \ |
16 | file://add-march-i486-into-CFLAGS-automatically.patch \ | ||
16 | file://run-ptest \ | 17 | file://run-ptest \ |
17 | " | 18 | " |
18 | 19 | ||