> -----Ursprüngliche Nachricht-----
> Von: Sebastian Huber [mailto:sebastian.hu...@embedded-brains.de]
> Gesendet: Montag, 27. Februar 2017 15:25
> An: Sommer, Jan; devel@rtems.org
> Betreff: Re: AW: AW: AW: Undefined reference to
> `__sync_bool_compare_and_swap_4' for some Leon configurations with
> gfortran
> 
> 
> 
> On 27/02/17 15:15, jan.som...@dlr.de wrote:
> >> -----Ursprüngliche Nachricht-----
> >> >Von: Sebastian Huber [mailto:sebastian.hu...@embedded-brains.de]
> >> >Gesendet: Montag, 27. Februar 2017 15:11
> >> >An: Sommer, Jan;devel@rtems.org
> >> >Betreff: Re: AW: AW: Undefined reference to
> >> >`__sync_bool_compare_and_swap_4' for some Leon configurations with
> >> >gfortran
> >> >
> >> >On 27/02/17 15:08,jan.som...@dlr.de  wrote:
> >>> > >Ok, thanks for the clarification.
> >>> > >I will try to create a patch for gcc and put rtems CC for the 
> >>> > >discussion.
> >> >
> >> >Another option would be to provide the __sync_() stuff also via libatomic.
> >> >
> > True. I will ask on the gcc mailinglist what they would prefer.
> >
> 
> This __sync_() stuff seems to be used in several places in GCC. So, changing
> libbacktrace is probably not enough. We need a general solution for the
> __sync_() builtins on RTEMS. I don't think GCC can be changed to emit
> __atomic_() calls for the __sync_() builtins (I would still try to ask). The 
> libgcc or
> libatomic is probably a good place to add them for RTEMS as functions
> implemented via __atomic_() builtins.
> 

I updated the __sync-check of libbacktrace and now the undefined references are 
gone and my test program compiles.
If there are no objections I would try to push something like the attached 
patch upstream. Do you have any suggestions to which branches?
I thought about trunk and the gcc-6 branch or do we need further backports for 
older RTEMS versions?

Best regards,

   Jan

> --
> 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.hu...@embedded-brains.de
> PGP     : Public key available on request.
> 
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

Attachment: fix-leon2-libbacktrace.patch
Description: fix-leon2-libbacktrace.patch

_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to