[PATCH Newlib]Introducing new config option to disable optimization on unbuffered unix stream file

Bin Cheng bin.cheng@arm.com
Fri Jun 14 04:46:00 GMT 2013


Hi,

For now newlib vfprintf_r calls __sbprintf doing optimization on unbuffered
unix stream file. This brings about 120 bytes overhead for text and 1KB for
stack consumption for fprintf(stderr, ...)
This patch introduces option "--disable-newlib-unbuf-opt" to allow end user
to disable the optimization and it doesn't change the default behavior.

This patch also corrects a typo in configure for NEWLIB_NANO_MALLOC. Since
configuration is an auto regenerated file, I just include it in this patch.

Is it OK?
Thanks.
bin

2013-06-14  Bin Cheng  <bin.cheng@arm.com>
	* acconfig.h (_UNBUF_STREAM_OPT): Undef
	* newlib.hin (_UNBUF_STREAM_OPT): Undef
	* configure.in (--enable-newlib-unbuf-stream-opt): New option.
	* configure: Regenerated.
	* libc/stdio/vfprintf.c (_VFPRINTF_R): Don't do optimization on
	unbuffered stream files.
	* libc/stdio/vfwprintf.c (_VFWPRINTF_R): Likewise.
	* README: Add description about the option.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: unbuf-stream-opt-20130614.txt
URL: <http://sourceware.org/pipermail/newlib/attachments/20130614/ac294ab8/attachment.txt>


More information about the Newlib mailing list