Newlib nano
Thu Jan 29 17:25:00 GMT 2015


We are using newlib at work, and are using different CPUs. We have one Arm9 with
lotsa RAM and some Cortex M3/4 with rather paltry amounts of RAM.
Im currently trying to fit a toolchain to serve both of them and thus want the
nano-variants optimized for space.

The issue I have is that some options affect the standard headers, notably
_REENT_GLOBAL_ATEXIT and _WANT_REENT_SMALL. Since there is only one Header for
both variants, this can result in problems if the reent struct is different than
the linked library.

1) Is there some guide on which switches are allowed to differ? I only did some
grep -R <Macro> to see if its used outside of newlib.h and found the two above
so far.
Atleast for the board support you would need to have the correct newlib.h

2) I think about providing both newlib.h files (renamed) and defining a macro
via the specs file to pick the right one via a stub. Im completely unused to
specs files so I would be gratefull if someone could comment if thats a good

Kind Regards,
Norbert Lange

More information about the Newlib mailing list