This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem with --enable-target-optspace


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 e.g -DREENTRANT_SYSCALLS_PROVIDED).

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.
CFLAGS_FOR_TARGET = -g -Os
CXXFLAGS_FOR_TARGET = -g -Os


For me it seems that there is missing $(CFLAGS) entry - it should be like that:
CFLAGS_FOR_TARGET = -g -Os $(CFLAGS)



Is it expected behaviour or I am doing something stupid?



Artur,


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

INCLUDES=$(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)

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/configure.host

-- 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,


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]