<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Fri, Sep 14, 2018 at 12:57 AM Sebastian Huber <<a href="mailto:sebastian.huber@embedded-brains.de">sebastian.huber@embedded-brains.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 14/09/2018 04:27, Joel Sherrill wrote:<br>
><br>
><br>
> On Thu, Sep 13, 2018, 9:25 PM Chris Johns <<a href="mailto:chrisj@rtems.org" target="_blank">chrisj@rtems.org</a> <br>
> <mailto:<a href="mailto:chrisj@rtems.org" target="_blank">chrisj@rtems.org</a>>> wrote:<br>
><br>
> On 14/09/2018 10:13, Joel Sherrill wrote:<br>
> > On Thu, Sep 13, 2018, 5:40 PM Chris Johns <<a href="mailto:chrisj@rtems.org" target="_blank">chrisj@rtems.org</a><br>
> <mailto:<a href="mailto:chrisj@rtems.org" target="_blank">chrisj@rtems.org</a>><br>
> > <mailto:<a href="mailto:chrisj@rtems.org" target="_blank">chrisj@rtems.org</a> <mailto:<a href="mailto:chrisj@rtems.org" target="_blank">chrisj@rtems.org</a>>>> wrote:<br>
> > On 14/09/2018 02:30, Joel Sherrill wrote:<br>
> > > On Thu, Sep 13, 2018, 10:34 AM Sebastian Huber<br>
> > > <<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a><br>
> <mailto:<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a>><br>
> > <mailto:<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a><br>
> <mailto:<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a>>><br>
> > <mailto:<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a><br>
> <mailto:<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a>><br>
> > <mailto:<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a><br>
> <mailto:<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a>>>>><br>
> > > wrote:<br>
> > > ----- Am 13. Sep 2018 um 14:07 schrieb joel<br>
> <a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a> <mailto:<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>><br>
> > <mailto:<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a> <mailto:<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>>><br>
> > > <mailto:<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a> <mailto:<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>><br>
> <mailto:<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a> <mailto:<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>>>>:<br>
> > ><br>
> > > > On Thu, Sep 13, 2018, 3:28 AM Sebastian Huber <<br>
> > > > <a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a><br>
> <mailto:<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a>><br>
> > <mailto:<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a><br>
> <mailto:<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a>>><br>
> > > <mailto:<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a><br>
> <mailto:<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a>><br>
> > <mailto:<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a><br>
> <mailto:<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a>>>>> wrote:<br>
> > > ><br>
> > > >> Hello,<br>
> > > >><br>
> > > >> I test currently the tqm8xx BSP which worked fine<br>
> until RTEMS 5. The<br>
> > > >> problem is that this BSP uses strtoul() to get some<br>
> system<br>
> > configuration<br>
> > > >> parameters from the boot loader. The Newlib used by<br>
> RTEMS 5 has now<br>
> > > >> support for C locales in strtoul(). The C locale<br>
> support needs an<br>
> > > >> executing thread with a valid Newlib reentrancy<br>
> structure. This is<br>
> > > >> definitely not the case during bsp_start().<br>
> > > >><br>
> > > ><br>
> > > > Why do we now longer have a global reentrancy<br>
> structure to fall back on?<br>
> > ><br>
> > > I think having a global reentrancy as a fall back just<br>
> for the lowest<br>
> > level<br>
> > > system start without an idle thread is a bit of overkill.<br>
> > ><br>
> > > The heavy weight C local support which was recently<br>
> introduced in<br>
> > Newlib is<br>
> > > not really the right thing for the embedded systems I<br>
> know. There were<br>
> > > several complaints about this on the Newlib mailing<br>
> list as well. The<br>
> > root<br>
> > > cause for this is the C standard. So, basically the C<br>
> standard<br>
> > strtoul() is<br>
> > > unsuitable for embedded systems. The FreeBSD<br>
> (sys/kern/strtoul.c) and<br>
> > Linux<br>
> > > (lib/kstrtox.c) kernel have their own implementations.<br>
> > ><br>
> > ><br>
> > > FWIW the FACE Technical Standard does not include wide<br>
> characters in ANY<br>
> > profile<br>
> > > as of Edition 3.0. None of the RTOS vendors knew of any<br>
> avionics users. It<br>
> > > wasn't viewed as a necessary feature. We could consider<br>
> disabling it by<br>
> > default.<br>
> > ><br>
> ><br>
> > Is this something we could ot would want to control with<br>
> newlib via a config<br>
> > option?<br>
> ><br>
> ><br>
> > We don't turn on locale for h8, m32c and maybe not epiphany. I<br>
> am pretty <a href="http://sure.it" rel="noreferrer" target="_blank">sure.it</a> <<a href="http://sure.it" rel="noreferrer" target="_blank">http://sure.it</a>><br>
> > <<a href="http://sure.it" rel="noreferrer" target="_blank">http://sure.it</a>> is an option. And should be a documented RSB<br>
> option to turn it<br>
> > back on. Should be a size savings for most users.<br>
><br>
> We turn on or off as an option?<br>
><br>
><br>
> Based on Sebastian's observation, I think off.<br>
><br>
> Does this impact wide characters and multibyte?<br>
><br>
> We will need to document the impact. I suspect it removes some POSIX <br>
> support in a base build.<br>
<br>
This problem with the C locale support used in strtoul() has absolutely <br>
nothing to do with the wide character or iconv() support.<br>
<br>
Currently it is not possible to disable the C locale support in Newlib. <br>
Would such an option be the preferred way instead of a custom strtoul() <br>
etc. API and implementation?<br></blockquote><div><br></div><div>I think so. It would result in smaller footprint which is desirable for an</div><div>unlikely to be used feature.</div><div><br></div><div>I would like to know the impact of only having a single default locale though. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
-- <br>
Sebastian Huber, embedded brains GmbH<br>
<br>
Address : Dornierstr. 4, D-82178 Puchheim, Germany<br>
Phone : +49 89 189 47 41-16<br>
Fax : +49 89 189 47 41-09<br>
E-Mail : <a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a><br>
PGP : Public key available on request.<br>
<br>
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.<br>
<br>
</blockquote></div></div>