diff options
Diffstat (limited to 'newlib/libc/string/local.h')
-rw-r--r-- | newlib/libc/string/local.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/newlib/libc/string/local.h b/newlib/libc/string/local.h index 5d17dccc4..dfe01d70b 100644 --- a/newlib/libc/string/local.h +++ b/newlib/libc/string/local.h @@ -7,3 +7,18 @@ int _EXFUN (__wcwidth, (wint_t)); /* Defined in locale/locale.c. Returns a value != 0 if the current language is assumed to use CJK fonts. */ int __locale_cjk_lang (); + +/* + Taken from glibc: + Add the compiler optimization to inhibit loop transformation to library + calls. This is used to avoid recursive calls in memset and memmove + default implementations. +*/ +#ifdef _HAVE_CC_INHIBIT_LOOP_TO_LIBCALL +# define __inhibit_loop_to_libcall \ + __attribute__ ((__optimize__ ("-fno-tree-loop-distribute-patterns"))) +#else +# define __inhibit_loop_to_libcall +#endif + + |