AW: Undefined reference to `__sync_bool_compare_and_swap_4' for some Leon configurations with gfortran
Sebastian Huber
sebastian.huber at embedded-brains.de
Mon Feb 27 14:00:56 UTC 2017
On 27/02/17 14:15, Jan.Sommer at dlr.de wrote:
>> >-----Ursprüngliche Nachricht-----
>> >Von: Sebastian Huber [mailto:sebastian.huber at embedded-brains.de]
>> >Gesendet: Montag, 27. Februar 2017 13:46
>> >An: Sommer, Jan;devel at rtems.org
>> >Betreff: Re: Undefined reference to `__sync_bool_compare_and_swap_4' for
>> >some Leon configurations with gfortran
>> >
> [...]
>>> > >If I check the different libgfortran.a libraries of
>>> > >sparc-rtems4.12/6.3.0 with nm I get libgfortran.a
>>> > > U __sync_bool_compare_and_swap_4
>>> > > U __sync_bool_compare_and_swap_4
>> >
>> >Is this reference generated by the compiler or some GCC runtime source code?
>> >The atomic operations are implemented via the libatomic, so you should only
>> >have __atomic_() references.
>> >
> I am not sure if I understand the question correctly.
> I checked the mentioned elf.c-file (https://gcc.gnu.org/viewcvs/gcc/branches/gcc-6-branch/libbacktrace/elf.c?view=markup#l960) and
> the call to __sync_bool_compare_and_swap_4 does not seem to be dependent on a configuration option of gcc.
> The same is true for dwarf.c
From my point of view this is a bug (use of legacy __sync_(),
https://gcc.gnu.org/onlinedocs/gcc/_005f_005fsync-Builtins.html) in
libbacktrace. It should use C11 atomic operations or the __atomic_()
builtins:
https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html
--
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