nios2 and atomic operations

Sebastian Huber sebastian.huber at embedded-brains.de
Mon Apr 20 19:18:58 UTC 2015


----- Joel Sherrill <joel.sherrill at oarcorp.com> schrieb:
> Hi
> 
> As I mentioned earlier, nios2 does not link C++ iostream because of an
> undefined reference:
> 
> /users/joel/rtems-4.11-work/tools/lib/gcc/nios2-rtems4.11/4.9.2/libstdc++.a(locale-inst.o):/users/joel/rtems-4.11-work/rtems-source-builder/rtems/build/nios2-rtems4.11-gcc-4.9.2-newlib-2.2.0.20150323-x86_64-linux-gnu-1/build/nios2-rtems4.11/libstdc++-v3/include/ext/atomicity.h:49:
> more undefined references to `__sync_fetch_and_add_4' follow
> 
> I don't see anything obviously different about this target. Can someone
> take a look at this please? It has to be something small.

I guess Nios II lacks support for atomic operations, so the operating system must provide them in terms of helper functions.  Maybe we need a port of libatomic for this target.  It looks like something bigger.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.


More information about the devel mailing list