Heavy SysInit Dependency

Chris Johns chrisj at rtems.org
Thu May 20 05:08:55 UTC 2021


> On 20 May 2021, at 2:05 am, Sebastian Huber <sebastian.huber at embedded-brains.de> wrote:
> 
> On 19/05/2021 15:09, Joel Sherrill wrote:
>> On Wed, May 19, 2021 at 3:54 AM Sebastian Huber <sebastian.huber at embedded-brains.de <mailto:sebastian.huber at embedded-brains.de>> wrote:
>>    On 19/05/2021 10:23, Chris Johns wrote:
>>     >> On 19 May 2021, at 5:28 pm, Sebastian
>>    Huber<sebastian.huber at embedded-brains.de
>>    <mailto:sebastian.huber at embedded-brains.de>>  wrote:
>>     >>
>>     >> I am not sure how the dependency chain can be fixed with the
>>    current struct _reent approach of Newlib. A modern approach would be
>>    to replace this structure with individual thread-local objects. This
>>    would be technically feasible, however, a lot of work.
>>     > Do you mean the _reent structure is expanded out into separate
>>    TLS elements?
>>    Yes, something like:
>>    thread_local int errno;
>> On paper this would work but most architectures do not have TLS
>> support from RTEMS right now. On top of that, I honestly can't tell
>> in GCC how TLS is implemented on many architectures. If there is
>> a generic pattern, I'd be happy to be educated?
> 
> The most relevant architectures have TLS support, at least: arm, powerpc, sparc, nios2, m68k.

I am not comfortable with this wording. It implies there are archs we consider are not relevant and that should not be the case. The tiers attempt to explain the level of support archs have. :)

> The arm GCC target has a -mtp=soft option. This approach would work an any target. You just have to add the GCC/llvm support for this for all targets which need it.

Well it seems until this happens we need another solution or wait. 


Chris


More information about the devel mailing list