From: "Peter A. Bigot" <pab@pabigot.com>
To: Khem Raj <raj.khem@gmail.com>
Cc: OE-core <openembedded-core@lists.openembedded.org>
Subject: Re: Yocto development with C++11 threads and gcc
Date: Wed, 13 Aug 2014 18:23:33 -0500 [thread overview]
Message-ID: <53EBF375.1070701@pabigot.com> (raw)
In-Reply-To: <CAMKF1soioSe+U1CkB+PDsZyfDyaEFovugjOr+Tw+rGNjK57cJg@mail.gmail.com>
On 08/13/2014 05:05 PM, Khem Raj wrote:
> On Wed, Aug 13, 2014 at 2:36 PM, Peter A. Bigot <pab@pabigot.com> wrote:
>> In any case, Khem can you run with this? It'd be fixed a lot better that
>> way....
> We do not configure target gcc with right matching cpu defaults,
> atomic instruction strex/ldrex are only added after armv6 but defaults
> for gcc if not specified is armv5t and hence it does not use the right
> set as expected by libstdc++ which has been cross compiled. so while
> you are at it and can reproduce it. Try to add
>
> EXTRA_OECONF += '${@bb.utils.contains("TUNE_FEATURES", "armv7a", "
> --with-cpu=armv7-a", "", d)}'
>
> to gcc-target.inc and see if resulting gcc is any better
I had to make it:
EXTRA_OECONF += '${@bb.utils.contains("TUNE_FEATURES", "armv7a",
"--with-cpu=generic-armv7-a", "", d)}'
to get gcc to build but at runtime I then get:
beaglebone[16]$ g++ -std=c++11 -pthread test.cc && ./a.out
Assembler messages:
Error: unknown cpu `generic-armv7-a'
Error: unrecognized option -mcpu=generic-armv7-a
which indicates the flag's being passed to the assembler which doesn't
recognize it even though g++ is happy with it. I suppose we could hack
binutils to substitute whatever spelling it wants to see.
(Also tried --with-cpu=arm7, but that generates assembler errors related
to unsupported RM mode "bx lr").
The approach bothers me, though. Instead of explicitly changing
gcc-target to match gcc-runtime, shouldn't it be a general rule that
gcc-runtime not apply OE-specific target flags that aren't going to be
used by direct invocations of the compiler outside of the OE build
environment? That seems a little more robust, as the default target
flags may be changed upstream or by bbappends within OE, and having to
make them match in gcc-runtime as well would be a headache.
And would we need similar overrides for other architectures? There's
something similar already in gcc-configure-common.inc for mips64.
Peter
next prev parent reply other threads:[~2014-08-13 23:23 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-11 19:02 Yocto development with C++11 threads and gcc Peter A. Bigot
2014-08-12 0:12 ` Peter A. Bigot
2014-08-13 21:07 ` Peter A. Bigot
2014-08-13 21:18 ` Khem Raj
2014-08-13 21:23 ` Peter A. Bigot
2014-08-13 21:36 ` Peter A. Bigot
2014-08-13 22:05 ` Khem Raj
2014-08-13 23:23 ` Peter A. Bigot [this message]
2014-08-14 0:49 ` Khem Raj
2014-08-14 1:55 ` Peter A. Bigot
2014-08-14 5:32 ` Khem Raj
2014-08-14 9:15 ` Peter A. Bigot
2014-08-14 21:40 ` Richard Purdie
2014-08-14 22:00 ` Peter A. Bigot
2014-08-14 22:11 ` Khem Raj
2014-08-14 22:07 ` Khem Raj
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53EBF375.1070701@pabigot.com \
--to=pab@pabigot.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=raj.khem@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.