From f703e6aa089c8a4490c86501e466e523b206522d Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 14 Aug 2014 08:33:00 +0000 Subject: [PATCH] * libc/stdio/findfp.c (std): Don't inline when optimizing for code size. --- newlib/ChangeLog | 4 ++++ newlib/libc/stdio/findfp.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 7e21d9925..54edfae6c 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,7 @@ +2014-08-14 Bin Cheng + + * libc/stdio/findfp.c (std): Don't inline when optimizing for code size. + 2014-08-04 Jon TURNEY * libc/include/math.h: Also define M_PI etc. if _XOPEN_SOURCE is diff --git a/newlib/libc/stdio/findfp.c b/newlib/libc/stdio/findfp.c index f5a35a162..9ee43b53d 100644 --- a/newlib/libc/stdio/findfp.c +++ b/newlib/libc/stdio/findfp.c @@ -35,7 +35,11 @@ const struct __sFILE_fake __sf_fake_stderr = {_NULL, 0, 0, 0, 0, {_NULL, 0}, 0, _NULL}; #endif +#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) +_NOINLINE_STATIC _VOID +#else static _VOID +#endif _DEFUN(std, (ptr, flags, file, data), FILE *ptr _AND int flags _AND