Problem with --enable-target-optspace

Jeff Johnston
Wed Aug 1 18:40:00 GMT 2007

Artur Lipowski wrote:
> Hi,
> When I specify mentioned option then there is no possibility to use 
> CFLAGS environment variable (to supply some tailoring definitions like 
> I found that when --enable-target-optspace option is used then there is 
> generated Makefile with following directives (it is taken from the file 
> newlib/mt-ospace):
> # Build libraries optimizing for space, not speed.
> For me it seems that there is missing  $(CFLAGS) entry - it should be 
> like that:
> Is it expected behaviour or I am doing something stupid?


   You can add flags by specifying TARGET_CFLAGS=xxxx on your make 
invocation.  The makefiles in the lower levels have:


For things such as -DREENTRANT_SYSCALLS_PROVIDED, unless you are doing 
an experiment, this should be something you put in your platform's 
newlib_cflags setting in newlib/

-- Jeff J.

> BTW> The same behaviour for the official version 1.15 and for the newest 
> CVS snapshot. Full command line command is:
> ../newlib/configure --target=arm-elf --prefix=/usr/local/arm 
> --enable-interwork --enable-multilib --enable-target-optspace 
> --disable-nls --with-gnu-as --with-gnu-ld 
> --disable-newlib-supplied-syscalls --enable-newlib-elix-level=1 
> --disable-newlib-io-float --disable-newlib-atexit-dynamic-alloc 
> --enable-newlib-reent-small
> Regards,

More information about the Newlib mailing list