What about this patch?
Index: libc/stdio/vfprintf.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdio/vfprintf.c,v
retrieving revision 1.82
diff -u -p -r1.82 vfprintf.c
--- libc/stdio/vfprintf.c 8 Aug 2012 11:04:17 -0000 1.82
+++ libc/stdio/vfprintf.c 11 Oct 2012 17:28:13 -0000
@@ -333,8 +333,17 @@ int __sprint_r (struct _reent *, FILE *,
* Helper function for `fprintf to unbuffered unix file': creates a
* temporary buffer. We only work on write-only files; this avoids
* worries about ungetc buffers and so forth.
+ *
+ * Make sure to avoid inlining when optimizing for size.
*/
-static int
+#ifndef __OPTIMIZE_SIZE__
+static
+#else
+#if defined (__GNUC__) && __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
+__attribute__ ((__noinline__)) static
+#endif
+#endif /* __OPTIMIZE_SIZE__ */
+int
_DEFUN(__sbprintf, (rptr, fp, fmt, ap),
struct _reent *rptr _AND
register FILE *fp _AND