forked from pfalcon/esp-open-sdk
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path9001-newlib-disable-rom-funcs.patch
170 lines (151 loc) · 5.36 KB
/
9001-newlib-disable-rom-funcs.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
diff -ru a/newlib/libc/machine/xtensa/memcpy.S b/newlib/libc/machine/xtensa/memcpy.S
--- a/newlib/libc/machine/xtensa/memcpy.S 2015-08-25 09:37:13.871717025 +0800
+++ b/newlib/libc/machine/xtensa/memcpy.S 2015-08-25 10:00:03.000000000 +0800
@@ -1,3 +1,5 @@
+/* esp8266 has this function in rom */
+#if 1
/* ANSI C standard library function memcpy.
Copyright (c) 2002-2008 Tensilica Inc.
@@ -287,3 +289,4 @@
.end schedule
.size memcpy, . - memcpy
+#endif
diff -ru a/newlib/libc/machine/xtensa/memset.S b/newlib/libc/machine/xtensa/memset.S
--- a/newlib/libc/machine/xtensa/memset.S 2015-08-25 09:37:13.855716648 +0800
+++ b/newlib/libc/machine/xtensa/memset.S 2015-08-25 09:59:51.000000000 +0800
@@ -1,3 +1,5 @@
+/* esp8266 has this function in rom */
+#if 0
/* ANSI C standard library function memset.
Copyright (c) 2001-2008 Tensilica Inc.
@@ -168,3 +170,4 @@
.end schedule
.size memset, . - memset
+#endif
diff -ru a/newlib/libc/machine/xtensa/strcmp.S b/newlib/libc/machine/xtensa/strcmp.S
--- a/newlib/libc/machine/xtensa/strcmp.S 2015-08-25 09:37:13.871717025 +0800
+++ b/newlib/libc/machine/xtensa/strcmp.S 2015-08-25 09:58:38.000000000 +0800
@@ -1,3 +1,5 @@
+/* esp8266 has this function in rom */
+#if 0
/* ANSI C standard library function strcmp.
Copyright (c) 2001-20012 Tensilica Inc.
@@ -776,3 +778,4 @@
#endif /* FLIX3*/
.size strcmp, . - strcmp
+#endif
diff -ru a/newlib/libc/machine/xtensa/strcpy.S b/newlib/libc/machine/xtensa/strcpy.S
--- a/newlib/libc/machine/xtensa/strcpy.S 2015-08-25 09:37:13.855716648 +0800
+++ b/newlib/libc/machine/xtensa/strcpy.S 2015-08-25 09:59:08.000000000 +0800
@@ -1,3 +1,5 @@
+/* esp8266 has this function in rom */
+#if 0
/* ANSI C standard library function strcpy.
Copyright (c) 2001-2008 Tensilica Inc.
@@ -233,3 +235,4 @@
.end schedule
.size strcpy, . - strcpy
+#endif
diff -ru a/newlib/libc/machine/xtensa/strlen.S b/newlib/libc/machine/xtensa/strlen.S
--- a/newlib/libc/machine/xtensa/strlen.S 2015-08-25 09:37:13.871717025 +0800
+++ b/newlib/libc/machine/xtensa/strlen.S 2015-08-25 09:59:22.000000000 +0800
@@ -1,3 +1,5 @@
+/* esp8266 has this function in rom */
+#if 0
/* ANSI C standard library function strlen.
Copyright (c) 2001-2008 Tensilica Inc.
@@ -113,3 +115,4 @@
.end schedule
.size strlen, . - strlen
+#endif
diff -ru a/newlib/libc/machine/xtensa/strncpy.S b/newlib/libc/machine/xtensa/strncpy.S
--- a/newlib/libc/machine/xtensa/strncpy.S 2015-08-25 09:37:13.859716742 +0800
+++ b/newlib/libc/machine/xtensa/strncpy.S 2015-08-25 09:59:37.000000000 +0800
@@ -1,3 +1,5 @@
+/* esp8266 has this function in rom */
+#if 0
/* ANSI C standard library function strncpy.
Copyright (c) 2001-2008 Tensilica Inc.
@@ -256,3 +258,4 @@
.end schedule
.size strncpy, . - strncpy
+#endif
diff -ru a/newlib/libc/string/bzero.c b/newlib/libc/string/bzero.c
--- a/newlib/libc/string/bzero.c 2015-08-25 09:37:10.851645991 +0800
+++ b/newlib/libc/string/bzero.c 2015-08-25 09:56:18.000000000 +0800
@@ -32,6 +32,8 @@
#include <strings.h>
+/* esp8266 has this function in rom */
+#if 0
_VOID
_DEFUN (bzero, (b, length),
void *b _AND
@@ -41,3 +43,4 @@
while (length--)
*ptr++ = 0;
}
+#endif
diff -ru a/newlib/libc/string/memcmp.c b/newlib/libc/string/memcmp.c
--- a/newlib/libc/string/memcmp.c 2015-08-25 09:37:10.859646179 +0800
+++ b/newlib/libc/string/memcmp.c 2015-08-25 09:57:13.000000000 +0800
@@ -49,6 +49,8 @@
/* Threshhold for punting to the byte copier. */
#define TOO_SMALL(LEN) ((LEN) < LBLOCKSIZE)
+/* esp8266 has this function in rom */
+#if 0
int
_DEFUN (memcmp, (m1, m2, n),
_CONST _PTR m1 _AND
@@ -110,4 +112,5 @@
return 0;
#endif /* not PREFER_SIZE_OVER_SPEED */
}
+#endif
diff -ru a/newlib/libc/string/memmove.c b/newlib/libc/string/memmove.c
--- a/newlib/libc/string/memmove.c 2015-08-25 09:37:10.855646086 +0800
+++ b/newlib/libc/string/memmove.c 2015-08-25 09:56:46.000000000 +0800
@@ -53,6 +53,8 @@
/* Threshhold for punting to the byte copier. */
#define TOO_SMALL(LEN) ((LEN) < BIGBLOCKSIZE)
+/* esp8266 has this function in rom */
+#if 0
/*SUPPRESS 20*/
_PTR
_DEFUN (memmove, (dst_void, src_void, length),
@@ -140,3 +142,4 @@
return dst_void;
#endif /* not PREFER_SIZE_OVER_SPEED */
}
+#endif
diff -ru a/newlib/libc/string/strncmp.c b/newlib/libc/string/strncmp.c
--- a/newlib/libc/string/strncmp.c 2015-08-25 09:37:10.851645991 +0800
+++ b/newlib/libc/string/strncmp.c 2015-08-25 09:55:31.000000000 +0800
@@ -58,6 +58,8 @@
#error long int is not a 32bit or 64bit byte
#endif
+/* esp8266 has this function in rom */
+#if 0
int
_DEFUN (strncmp, (s1, s2, n),
_CONST char *s1 _AND
@@ -120,3 +122,4 @@
return (*(unsigned char *) s1) - (*(unsigned char *) s2);
#endif /* not PREFER_SIZE_OVER_SPEED */
}
+#endif
diff -ru a/newlib/libc/string/strstr.c b/newlib/libc/string/strstr.c
--- a/newlib/libc/string/strstr.c 2015-08-25 09:37:10.859646179 +0800
+++ b/newlib/libc/string/strstr.c 2015-08-25 09:55:56.000000000 +0800
@@ -44,6 +44,8 @@
# include "str-two-way.h"
#endif
+/* esp8266 has this function in rom */
+#if 0
char *
_DEFUN (strstr, (searchee, lookfor),
_CONST char *searchee _AND
@@ -119,3 +121,4 @@
(const unsigned char *) lookfor, needle_len);
#endif /* compilation for speed */
}
+#endif