[PATCH v2 0/3] Support --enable-newlib-reent-thread-local Newlib configuration option
Sebastian Huber
sebastian.huber at embedded-brains.de
Thu Jul 21 07:09:19 UTC 2022
This patch set adds support for the --enable-newlib-reent-thread-local
(_REENT_THREAD_LOCAL_STORAGE) Newlib configuration option.
By default, Newlib uses a huge object of type struct _reent to store
thread-specific data. This object is returned by __getreent() if the
__DYNAMIC_REENT__ Newlib configuration option is defined.
The reentrancy structure contains for example errno and the standard input,
output, and error file streams. This means that if an application only uses
errno it has a dependency on the file stream support even if it does not use
it. This is an issue for lower end targets and applications which need to
qualify the software according to safety standards (for example ECSS-E-ST-40C,
ECSS-Q-ST-80C, IEC 61508, ISO 26262, DO-178, DO-330, DO-333).
If the new _REENT_THREAD_LOCAL configuration option is enabled, then struct
_reent is replaced by dedicated thread-local objects for each struct _reent
member. The thread-local objects are defined in translation units which use
the corresponding object.
v2:
* Remove i386, microblaze, and m68k from default enabled list.
* Support --with-newlib-tls and --without-newlib-tls.
Sebastian Huber (3):
6/7: Update Newlib
newlib: Support --with/without-newlib-tls
6/7: Use TLS in Newlib for some targets by default
rtems/config/6/rtems-aarch64.bset | 1 +
rtems/config/6/rtems-arm.bset | 1 +
rtems/config/6/rtems-nios2.bset | 1 +
rtems/config/6/rtems-powerpc.bset | 1 +
rtems/config/6/rtems-riscv.bset | 1 +
rtems/config/6/rtems-sparc.bset | 1 +
rtems/config/7/rtems-aarch64.bset | 1 +
rtems/config/7/rtems-arm.bset | 1 +
rtems/config/7/rtems-nios2.bset | 1 +
rtems/config/7/rtems-powerpc.bset | 1 +
rtems/config/7/rtems-riscv.bset | 1 +
rtems/config/7/rtems-sparc.bset | 1 +
.../config/tools/rtems-gcc-10-newlib-head.cfg | 4 +--
.../tools/rtems-gcc-10.4-newlib-head.cfg | 27 +++++++++++++++++++
.../config/tools/rtems-gcc-12-newlib-head.cfg | 5 ++--
.../tools/rtems-gcc-head-newlib-head.cfg | 4 +--
source-builder/config/checks.cfg | 9 +++++++
source-builder/config/gcc-common-1.cfg | 1 +
18 files changed, 55 insertions(+), 7 deletions(-)
create mode 100644 rtems/config/tools/rtems-gcc-10.4-newlib-head.cfg
--
2.35.3
More information about the devel
mailing list