This is the mail archive of the
mailing list for the GCC project.
Re: NIOS and atomic primitives
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Joel Sherrill <joel dot sherrill at oarcorp dot com>
- Cc: Jonathan Wakely <jwakely dot gcc at gmail dot com>, Sandra Loosemore <sandra at codesourcery dot com>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, Chung-Lin Tang <cltang at codesourcery dot com>
- Date: Mon, 20 Apr 2015 18:19:54 +0200
- Subject: Re: NIOS and atomic primitives
- Authentication-results: sourceware.org; auth=none
- References: <5533067A dot 8090405 at oarcorp dot com> <55330D9E dot 6030808 at codesourcery dot com> <CAH6eHdQOFxmjC78cakpHnMu14=oof4Wv+6m13hu0bRudu9drKw at mail dot gmail dot com> <553525F8 dot 2010409 at oarcorp dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Apr 20, 2015 at 11:14:48AM -0500, Joel Sherrill wrote:
> On 4/20/2015 5:04 AM, Jonathan Wakely wrote:
> > On 19 April 2015 at 03:06, Sandra Loosemore wrote:
> >> Is it one of the standard g++ or libstdc++ test cases that is failing? I
> >> could check what nios2-elf does with it if I knew what to look for.
> > Libstdc++ does not use the __sync built-ins in the 4.9 branch, it has
> > switched to the __atomic ones which should be provided by libatomic,
> > if that exists for the target.
> This is with 4.9.2. This is the only RTEMS target giving this error so
> I must
> be missing the magic bit of configurery for it.
> undefined reference to `__sync_fetch_and_add_4'
> more undefined references to `__sync_fetch_and_add_4' follow
> Where should I be looking?
Look where your atomicity.h comes from?
On the 4.9 branch, none of the atomicity.h headers included in vanilla
libstdc++-v3 have any __sync_* uses.