diff options
author | Peter A. Bigot <pab@pabigot.com> | 2014-08-14 14:05:59 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-08-15 18:21:50 +0100 |
commit | c0a071e16ec04f485f06eece5b807e5afbe1c1f1 (patch) | |
tree | 4b9c1d8c8c026b48db58049b9dda1cad698cf5ab /meta | |
parent | 6573521f08c2dfaa18670dcd56ff4f65557ec453 (diff) | |
download | poky-c0a071e16ec04f485f06eece5b807e5afbe1c1f1.tar.gz |
gcc: update compiler architecture to match gcc-runtime (armv6, armv7a)
The gcc-runtime recipe builds the gcc libraries including libstdc++ with
$TARGET_CC_ARCH flags, which include -march=FOO flags that affect
whether atomic instructions are available. This causes an ABI
incompatibility when the compiler by default generates code for less
capable architectures. For example, gcc-runtime libraries on a
Cortex-A8 are built with a different C++11/C++14 mutex implementation
than is used code compiled outside OE and without architecture-specific
flags.
This commit fixes the problem specifically for ABI issues related to
atomic instructions available in ARMV6 and subsequent architectures.
Other ABI incompatibilities may remain in other architectures.
See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62100
(From OE-Core rev: 0ba6ab39f187ecd4261f08e768f365f461384a3a)
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-configure-common.inc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc b/meta/recipes-devtools/gcc/gcc-configure-common.inc index 71dce12f45..48fb7995ca 100644 --- a/meta/recipes-devtools/gcc/gcc-configure-common.inc +++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc | |||
@@ -64,6 +64,13 @@ EXTRA_OECONF_append_libc-uclibc = " --enable-__cxa_atexit" | |||
64 | EXTRA_OECONF_append_mips64 = " --with-abi=64 --with-arch-64=mips64 --with-tune-64=mips64" | 64 | EXTRA_OECONF_append_mips64 = " --with-abi=64 --with-arch-64=mips64 --with-tune-64=mips64" |
65 | EXTRA_OECONF_append_mips64el = " --with-abi=64 --with-arch-64=mips64 --with-tune-64=mips64" | 65 | EXTRA_OECONF_append_mips64el = " --with-abi=64 --with-arch-64=mips64 --with-tune-64=mips64" |
66 | 66 | ||
67 | # ARMv6+ adds atomic instructions that affect the ABI in libraries built | ||
68 | # with TUNE_CCARGS in gcc-runtime. Make the compiler default to a | ||
69 | # compatible architecture. armv6 and armv7a cover the minimum tune | ||
70 | # features used in OE. | ||
71 | EXTRA_OECONF_append_armv6 = " --with-arch=armv6" | ||
72 | EXTRA_OECONF_append_armv7a = " --with-arch=armv7-a" | ||
73 | |||
67 | EXTRA_OECONF_GCC_FLOAT ??= "" | 74 | EXTRA_OECONF_GCC_FLOAT ??= "" |
68 | CPPFLAGS = "" | 75 | CPPFLAGS = "" |
69 | 76 | ||