This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Is __getreent() / __DYNAMIC_REENT__ enabled in arm-none-eabi tool chain?
- From: Hua Yanghao <huayanghao at gmail dot com>
- To: newlib at sourceware dot org
- Date: Tue, 14 Nov 2017 12:47:08 +0100
- Subject: Is __getreent() / __DYNAMIC_REENT__ enabled in arm-none-eabi tool chain?
- Authentication-results: sourceware.org; auth=none
Dear newlib users/developers,
I have been using newlib for a while for a baremetal project and now I
am trying to enable newlib to be thread-safe on a bare-metal SoC
running 4 ARMv7-A cores.
I looked around and seems the only possible way is to have dynamic
reent enabled, such that I can provide a __getreent() function for the
newlib to use at run time (the _impure_ptr does not work for SMP in
this case).
However it seems to me that the arm-none-eabi toolchain I am using
(downloaded from ARM website,
https://developer.arm.com/open-source/gnu-toolchain/gnu-rm ) does not
take my provided __getreent() function. I am able to provide the
malloc lock/unlock function and malloc is working fine on SMP. I am
wondering if I need to recompile the complete toolchain for
arm-none-eabi to enable __getreent() or there might be other easier
way I am not aware of.
Thanks a lot,
Yanghao Hua