summaryrefslogtreecommitdiff
path: root/third_party/newlib/string/local.h
diff options
context:
space:
mode:
authorOxore <oxore@protonmail.com>2023-03-07 16:05:46 +0300
committerOxore <oxore@protonmail.com>2023-03-07 17:58:42 +0300
commit5f7d4d6e9f47d328e7c4ef71030bdc9e34892798 (patch)
tree1f4dbecf6b27e268c0590404399c5d5fd91965d0 /third_party/newlib/string/local.h
parente4a9be2a4f68781d318770296a50f4823c419805 (diff)
Get rid of libc, take just parts of it
Diffstat (limited to 'third_party/newlib/string/local.h')
-rw-r--r--third_party/newlib/string/local.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/third_party/newlib/string/local.h b/third_party/newlib/string/local.h
new file mode 100644
index 0000000..a96bdf1
--- /dev/null
+++ b/third_party/newlib/string/local.h
@@ -0,0 +1,12 @@
+/*
+ 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