Openembedded Core Discussions
 help / color / mirror / Atom feed
* Re: [oe-commits] Peter A. Bigot : gcc: update compiler architecture to match gcc-runtime ( armv6, armv7a)
       [not found] <20140815172255.043D8505EB@opal.openembedded.org>
@ 2014-08-20  8:38 ` Hongxu Jia
  2014-08-20 10:21   ` Richard Purdie
  0 siblings, 1 reply; 3+ messages in thread
From: Hongxu Jia @ 2014-08-20  8:38 UTC (permalink / raw)
  To: pab; +Cc: openembedded-core, openembedded-commits

Hi Peter,

The commit caused building gcc-crosssdk-initial-x86_64 failed.
...
Unknown CPU given in --with-arch=armv7-a.
...

While crosssdk, TARGET_ARCH = "${SDK_ARCH}" (set in crosssdk.bbclass)
so the values of '--target=x86_64-wrlinuxsdk-linux --with-arch=armv7-a'
triggered the above failure.

How about override for the 'target/cross' and not for 'crosssdk' ?

//Hongxu

On 08/16/2014 01:22 AM, git@opal.openembedded.org wrote:
> Module: openembedded-core.git
> Branch: master-next
> Commit: 0ba6ab39f187ecd4261f08e768f365f461384a3a
> URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=0ba6ab39f187ecd4261f08e768f365f461384a3a
>
> Author: Peter A. Bigot <pab@pabigot.com>
> Date:   Thu Aug 14 14:05:59 2014 -0500
>
> 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
>
> Signed-off-by: Peter A. Bigot <pab@pabigot.com>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
>
> ---
>
>   meta/recipes-devtools/gcc/gcc-configure-common.inc | 7 +++++++
>   1 file changed, 7 insertions(+)
>
> diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc b/meta/recipes-devtools/gcc/gcc-configure-common.inc
> index 71dce12..48fb799 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"
>   EXTRA_OECONF_append_mips64 = " --with-abi=64 --with-arch-64=mips64 --with-tune-64=mips64"
>   EXTRA_OECONF_append_mips64el = " --with-abi=64 --with-arch-64=mips64 --with-tune-64=mips64"
>   
> +# ARMv6+ adds atomic instructions that affect the ABI in libraries built
> +# with TUNE_CCARGS in gcc-runtime.  Make the compiler default to a
> +# compatible architecture.  armv6 and armv7a cover the minimum tune
> +# features used in OE.
> +EXTRA_OECONF_append_armv6 = " --with-arch=armv6"
> +EXTRA_OECONF_append_armv7a = " --with-arch=armv7-a"
> +
>   EXTRA_OECONF_GCC_FLOAT ??= ""
>   CPPFLAGS = ""
>   
>



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [oe-commits] Peter A. Bigot : gcc: update compiler architecture to match gcc-runtime ( armv6, armv7a)
  2014-08-20  8:38 ` [oe-commits] Peter A. Bigot : gcc: update compiler architecture to match gcc-runtime ( armv6, armv7a) Hongxu Jia
@ 2014-08-20 10:21   ` Richard Purdie
  2014-08-20 10:35     ` Hongxu Jia
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Purdie @ 2014-08-20 10:21 UTC (permalink / raw)
  To: Hongxu Jia; +Cc: openembedded-core, openembedded-commits

On Wed, 2014-08-20 at 16:38 +0800, Hongxu Jia wrote:
> Hi Peter,
> 
> The commit caused building gcc-crosssdk-initial-x86_64 failed.
> ...
> Unknown CPU given in --with-arch=armv7-a.
> ...
> 
> While crosssdk, TARGET_ARCH = "${SDK_ARCH}" (set in crosssdk.bbclass)
> so the values of '--target=x86_64-wrlinuxsdk-linux --with-arch=armv7-a'
> triggered the above failure.
> 
> How about override for the 'target/cross' and not for 'crosssdk' ?

This was fixed with:

http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=7095d8da4b3e1a6bc475f1cb5e6d7fedb2a76901

Cheers,

Richard



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [oe-commits] Peter A. Bigot : gcc: update compiler architecture to match gcc-runtime ( armv6, armv7a)
  2014-08-20 10:21   ` Richard Purdie
@ 2014-08-20 10:35     ` Hongxu Jia
  0 siblings, 0 replies; 3+ messages in thread
From: Hongxu Jia @ 2014-08-20 10:35 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core, openembedded-commits

On 08/20/2014 06:21 PM, Richard Purdie wrote:
> On Wed, 2014-08-20 at 16:38 +0800, Hongxu Jia wrote:
>> Hi Peter,
>>
>> The commit caused building gcc-crosssdk-initial-x86_64 failed.
>> ...
>> Unknown CPU given in --with-arch=armv7-a.
>> ...
>>
>> While crosssdk, TARGET_ARCH = "${SDK_ARCH}" (set in crosssdk.bbclass)
>> so the values of '--target=x86_64-wrlinuxsdk-linux --with-arch=armv7-a'
>> triggered the above failure.
>>
>> How about override for the 'target/cross' and not for 'crosssdk' ?
> This was fixed with:
>
> http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=7095d8da4b3e1a6bc475f1cb5e6d7fedb2a76901

It works, thanks

//Hongxu

> Cheers,
>
> Richard
>



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-08-20 10:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20140815172255.043D8505EB@opal.openembedded.org>
2014-08-20  8:38 ` [oe-commits] Peter A. Bigot : gcc: update compiler architecture to match gcc-runtime ( armv6, armv7a) Hongxu Jia
2014-08-20 10:21   ` Richard Purdie
2014-08-20 10:35     ` Hongxu Jia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox