<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 28, 2017 at 8:27 AM,  <span dir="ltr"><<a href="mailto:Jan.Sommer@dlr.de" target="_blank">Jan.Sommer@dlr.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><br>
<br>
> -----Ursprüngliche Nachricht-----<br>
> Von: Sebastian Huber [mailto:<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedd<wbr>ed-brains.de</a>]<br>
</span>> Gesendet: Montag, 27. Februar 2017 15:25<br>
> An: Sommer, Jan; <a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
> Betreff: Re: AW: AW: AW: Undefined reference to<br>
<span>> `__sync_bool_compare_and_swap_<wbr>4' for some Leon configurations with<br>
> gfortran<br>
><br>
><br>
><br>
> On 27/02/17 15:15, <a href="mailto:Jan.Sommer@dlr.de" target="_blank">Jan.Sommer@dlr.de</a> wrote:<br>
> >> -----Ursprüngliche Nachricht-----<br>
> >> >Von: Sebastian Huber [mailto:<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedd<wbr>ed-brains.de</a>]<br>
> >> >Gesendet: Montag, 27. Februar 2017 15:11<br>
> >> >An: Sommer, <a href="mailto:Jan%3Bdevel@rtems.org" target="_blank">Jan;devel@rtems.org</a><br>
> >> >Betreff: Re: AW: AW: Undefined reference to<br>
> >> >`__sync_bool_compare_and_swap<wbr>_4' for some Leon configurations with<br>
> >> >gfortran<br>
> >> ><br>
> >> >On 27/02/17 15:08,<a href="mailto:Jan.Sommer@dlr.de" target="_blank">Jan.Sommer@dlr.de</a>  wrote:<br>
> >>> > >Ok, thanks for the clarification.<br>
> >>> > >I will try to create a patch for gcc and put rtems CC for the discussion.<br>
> >> ><br>
> >> >Another option would be to provide the __sync_() stuff also via libatomic.<br>
> >> ><br>
> > True. I will ask on the gcc mailinglist what they would prefer.<br>
> ><br>
><br>
> This __sync_() stuff seems to be used in several places in GCC. So, changing<br>
> libbacktrace is probably not enough. We need a general solution for the<br>
> __sync_() builtins on RTEMS. I don't think GCC can be changed to emit<br>
> __atomic_() calls for the __sync_() builtins (I would still try to ask). The libgcc or<br>
> libatomic is probably a good place to add them for RTEMS as functions<br>
> implemented via __atomic_() builtins.<br>
><br>
<br>
</span>I updated the __sync-check of libbacktrace and now thvee undefined references are gone and my test program compiles.<br>
If there are no objections I would try to push something like the attached patch upstream. Do you have any suggestions to which branches?<br>
I thought about trunk and the gcc-6 branch or do we need further backports for older RTEMS versions?<br></blockquote><div> </div><div>From a gcc perspective, it should be applied to all open branches that this</div><div>patch can apply easily to with highest priority on gcc-6-branch and newer.</div><div><br></div><div>I am on travel and can't speak to whether this impacts 4.11 tools or not. I</div><div>strongly suspect it does though and it would be desirable to fix this on</div><div>4.11 and master (e.g. 4.12).</div><div><br></div><div>--joel</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Best regards,<br>
<br>
   Jan<br>
<div class="m_5578142774100690683HOEnZb"><div class="m_5578142774100690683h5"><br>
> --<br>
> Sebastian Huber, embedded brains GmbH<br>
><br>
> Address : Dornierstr. 4, D-82178 Puchheim, Germany<br>
> Phone   : <a href="tel:%2B49%2089%20189%2047%2041-16" value="+4989189474116" target="_blank">+49 89 189 47 41-16</a><br>
> Fax     : <a href="tel:%2B49%2089%20189%2047%2041-09" value="+4989189474109" target="_blank">+49 89 189 47 41-09</a><br>
> E-Mail  : <a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brain<wbr>s.de</a><br>
> PGP     : Public key available on request.<br>
><br>
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.<br>
<br>
</div></div><br>______________________________<wbr>_________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman<wbr>/listinfo/devel</a><br></blockquote></div><br></div></div>