newlib _REENT_SMALL
Jeff Johnston
jjohnstn@redhat.com
Mon Sep 22 16:51:00 GMT 2008
fpaolo63 wrote:
> Thks Jeff,
>
> I tried to configure
> ../../../newlib-1.15.0/configure --target=arm-elf --prefix=$MYPREFIX \
> --enable-interwork --enable-multilib --with-float=soft \
> --disable-newlib-supplied-syscalls \
> --enable-newlib-reent-small \
> --enable-newlib-multithread=yes
> but --enable-newlib-reent-small is not recognized.
> Have I to use 1.16.x instead of 1.15.0?
>
Yes, it is not part of 1.15. I recommend always using the current
repository when possible (remember that releases are just snapshots in
time).
> There is, also, a configure parameter for "SMALL_MEMORY" ?
>
No, but --enable-target-optspace will set the __OPTIMIZE_SIZE__ flag
which is used in some functions (e.g. strcpy.c).
-- Jeff J.
> paolo
>
>
> Jeff Johnston wrote:
>> fpaolo63 wrote:
>>> Hi all,
>>> I'm new on newlib.
>>>
>>> I just made running my lpc23xx GNU tools chain on UBUNTU.
>>> binutil 2.17, GCC 4.2.1, newlib 1.15, gdb 6.6
>>>
>>> I wrote my own syslib, and I run a rtos application.
>>> Now, I'd to reduce the memory footprint of the REENT support.
>>>
>>> I have rebuilt the newlib setting _REENT_SMALL
>>> (newlib_cflags="-DSMALL_MEMORY -D_REENT_SMALL").
>>> Application is working fine but "struct _reent" on my application is
>>> again ~1k.
>>>
>> If you are always going to use _REENT_SMALL, then do it in
>> libc/include/sys/config.h.
>> This means that nothing will accidentally get built without the flag
>> on and this
>> files gets included whenever a user includes a newlib header file
>> (i.e. application and
>> newlib are consistent).
>>
>> If you just want to try it out, specify --enable-newlib-reent-small
>> when you configure newlib.
>> This will set _REENT_SMALL in libc/include/sys/config.h for you.
>>
>> -- Jeff J.
>
More information about the Newlib
mailing list