summaryrefslogtreecommitdiff
path: root/third_party/newlib
diff options
context:
space:
mode:
authorOxore <oxore@protonmail.com>2023-03-09 02:13:58 +0300
committerOxore <oxore@protonmail.com>2023-03-09 02:13:58 +0300
commite5d10780eff394af075c1e394605fb5c915b3688 (patch)
treedced9eb6ea331f776ab3531a716508db9909ec8c /third_party/newlib
parent34746d3783af1ae601487c88f0a7e44f81842618 (diff)
Fix compilation with optimization on Gentoo
Diffstat (limited to 'third_party/newlib')
-rw-r--r--third_party/newlib/string/local.h6
-rw-r--r--third_party/newlib/string/memcmp.c4
-rw-r--r--third_party/newlib/string/memcpy.c4
-rw-r--r--third_party/newlib/string/memmove.c4
-rw-r--r--third_party/newlib/string/memset.c4
5 files changed, 17 insertions, 5 deletions
diff --git a/third_party/newlib/string/local.h b/third_party/newlib/string/local.h
index a96bdf1..3c35e1a 100644
--- a/third_party/newlib/string/local.h
+++ b/third_party/newlib/string/local.h
@@ -4,9 +4,5 @@
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 \
+#define __inhibit_loop_to_libcall \
__attribute__ ((__optimize__ ("-fno-tree-loop-distribute-patterns")))
-#else
-# define __inhibit_loop_to_libcall
-#endif
diff --git a/third_party/newlib/string/memcmp.c b/third_party/newlib/string/memcmp.c
index 342fb9f..4d47656 100644
--- a/third_party/newlib/string/memcmp.c
+++ b/third_party/newlib/string/memcmp.c
@@ -42,6 +42,10 @@ QUICKREF
/* Threshhold for punting to the byte copier. */
#define TOO_SMALL(LEN) ((LEN) < LBLOCKSIZE)
+#if defined(memcmp)
+#undef memcmp
+#endif
+
int
memcmp (const void *m1,
const void *m2,
diff --git a/third_party/newlib/string/memcpy.c b/third_party/newlib/string/memcpy.c
index 52f716b..fe8467c 100644
--- a/third_party/newlib/string/memcpy.c
+++ b/third_party/newlib/string/memcpy.c
@@ -44,6 +44,10 @@ QUICKREF
/* Threshhold for punting to the byte copier. */
#define TOO_SMALL(LEN) ((LEN) < BIGBLOCKSIZE)
+#if defined(memcpy)
+#undef memcpy
+#endif
+
void *
__inhibit_loop_to_libcall
memcpy (void *__restrict dst0,
diff --git a/third_party/newlib/string/memmove.c b/third_party/newlib/string/memmove.c
index da5dfdb..fc6acf1 100644
--- a/third_party/newlib/string/memmove.c
+++ b/third_party/newlib/string/memmove.c
@@ -47,6 +47,10 @@ QUICKREF
/* Threshhold for punting to the byte copier. */
#define TOO_SMALL(LEN) ((LEN) < BIGBLOCKSIZE)
+#if defined(memmove)
+#undef memmove
+#endif
+
/*SUPPRESS 20*/
void *
__inhibit_loop_to_libcall
diff --git a/third_party/newlib/string/memset.c b/third_party/newlib/string/memset.c
index e8e667a..8814b76 100644
--- a/third_party/newlib/string/memset.c
+++ b/third_party/newlib/string/memset.c
@@ -33,6 +33,10 @@ QUICKREF
#define UNALIGNED(X) ((long)X & (LBLOCKSIZE - 1))
#define TOO_SMALL(LEN) ((LEN) < LBLOCKSIZE)
+#if defined(memset)
+#undef memset
+#endif
+
void *
__inhibit_loop_to_libcall
memset (void *m,