@@ -12,7 +12,17 @@ var Picolibc = Library{
12
12
name : "picolibc" ,
13
13
cflags : func () []string {
14
14
picolibcDir := filepath .Join (goenv .Get ("TINYGOROOT" ), "lib/picolibc/newlib/libc" )
15
- return []string {"-Werror" , "-Wall" , "-std=gnu11" , "-D_COMPILING_NEWLIB" , "-nostdlibinc" , "-Xclang" , "-internal-isystem" , "-Xclang" , picolibcDir + "/include" , "-I" + picolibcDir + "/tinystdio" , "-I" + goenv .Get ("TINYGOROOT" ) + "/lib/picolibc-include" }
15
+ return []string {
16
+ "-Werror" ,
17
+ "-Wall" ,
18
+ "-std=gnu11" ,
19
+ "-D_COMPILING_NEWLIB" ,
20
+ "-DTINY_STDIO" ,
21
+ "-nostdlibinc" ,
22
+ "-Xclang" , "-internal-isystem" , "-Xclang" , picolibcDir + "/include" ,
23
+ "-I" + picolibcDir + "/tinystdio" ,
24
+ "-I" + goenv .Get ("TINYGOROOT" ) + "/lib/picolibc-include" ,
25
+ }
16
26
},
17
27
sourceDir : "lib/picolibc/newlib/libc" ,
18
28
sources : func (target string ) []string {
@@ -21,6 +31,105 @@ var Picolibc = Library{
21
31
}
22
32
23
33
var picolibcSources = []string {
34
+ "../../../picolibc-stdio.c" ,
35
+
36
+ "tinystdio/asprintf.c" ,
37
+ "tinystdio/atod_engine.c" ,
38
+ "tinystdio/atod_ryu.c" ,
39
+ "tinystdio/atof_engine.c" ,
40
+ "tinystdio/atof_ryu.c" ,
41
+ //"tinystdio/atold_engine.c", // have_long_double and not long_double_equals_double
42
+ "tinystdio/clearerr.c" ,
43
+ "tinystdio/compare_exchange.c" ,
44
+ "tinystdio/dtoa_data.c" ,
45
+ "tinystdio/dtoa_engine.c" ,
46
+ "tinystdio/dtoa_ryu.c" ,
47
+ "tinystdio/ecvtbuf.c" ,
48
+ "tinystdio/ecvt.c" ,
49
+ "tinystdio/ecvt_data.c" ,
50
+ "tinystdio/ecvtfbuf.c" ,
51
+ "tinystdio/ecvtf.c" ,
52
+ "tinystdio/ecvtf_data.c" ,
53
+ "tinystdio/exchange.c" ,
54
+ //"tinystdio/fclose.c", // posix-io
55
+ "tinystdio/fcvtbuf.c" ,
56
+ "tinystdio/fcvt.c" ,
57
+ "tinystdio/fcvtfbuf.c" ,
58
+ "tinystdio/fcvtf.c" ,
59
+ "tinystdio/fdevopen.c" ,
60
+ //"tinystdio/fdopen.c", // posix-io
61
+ "tinystdio/feof.c" ,
62
+ "tinystdio/ferror.c" ,
63
+ "tinystdio/fflush.c" ,
64
+ "tinystdio/fgetc.c" ,
65
+ "tinystdio/fgets.c" ,
66
+ "tinystdio/fileno.c" ,
67
+ "tinystdio/filestrget.c" ,
68
+ "tinystdio/filestrputalloc.c" ,
69
+ "tinystdio/filestrput.c" ,
70
+ //"tinystdio/fopen.c", // posix-io
71
+ "tinystdio/fprintf.c" ,
72
+ "tinystdio/fputc.c" ,
73
+ "tinystdio/fputs.c" ,
74
+ "tinystdio/fread.c" ,
75
+ "tinystdio/fscanf.c" ,
76
+ "tinystdio/fseek.c" ,
77
+ "tinystdio/ftell.c" ,
78
+ "tinystdio/ftoa_data.c" ,
79
+ "tinystdio/ftoa_engine.c" ,
80
+ "tinystdio/ftoa_ryu.c" ,
81
+ "tinystdio/fwrite.c" ,
82
+ "tinystdio/gcvtbuf.c" ,
83
+ "tinystdio/gcvt.c" ,
84
+ "tinystdio/gcvtfbuf.c" ,
85
+ "tinystdio/gcvtf.c" ,
86
+ "tinystdio/getchar.c" ,
87
+ "tinystdio/gets.c" ,
88
+ "tinystdio/matchcaseprefix.c" ,
89
+ "tinystdio/perror.c" ,
90
+ //"tinystdio/posixiob.c", // posix-io
91
+ //"tinystdio/posixio.c", // posix-io
92
+ "tinystdio/printf.c" ,
93
+ "tinystdio/putchar.c" ,
94
+ "tinystdio/puts.c" ,
95
+ "tinystdio/ryu_divpow2.c" ,
96
+ "tinystdio/ryu_log10.c" ,
97
+ "tinystdio/ryu_log2pow5.c" ,
98
+ "tinystdio/ryu_pow5bits.c" ,
99
+ "tinystdio/ryu_table.c" ,
100
+ "tinystdio/ryu_umul128.c" ,
101
+ "tinystdio/scanf.c" ,
102
+ "tinystdio/setbuf.c" ,
103
+ "tinystdio/setvbuf.c" ,
104
+ //"tinystdio/sflags.c", // posix-io
105
+ "tinystdio/snprintf.c" ,
106
+ "tinystdio/snprintfd.c" ,
107
+ "tinystdio/snprintff.c" ,
108
+ "tinystdio/sprintf.c" ,
109
+ "tinystdio/sprintfd.c" ,
110
+ "tinystdio/sprintff.c" ,
111
+ "tinystdio/sscanf.c" ,
112
+ "tinystdio/strfromd.c" ,
113
+ "tinystdio/strfromf.c" ,
114
+ "tinystdio/strtod.c" ,
115
+ "tinystdio/strtod_l.c" ,
116
+ "tinystdio/strtof.c" ,
117
+ //"tinystdio/strtold.c", // have_long_double and not long_double_equals_double
118
+ //"tinystdio/strtold_l.c", // have_long_double and not long_double_equals_double
119
+ "tinystdio/ungetc.c" ,
120
+ "tinystdio/vasprintf.c" ,
121
+ "tinystdio/vfiprintf.c" ,
122
+ "tinystdio/vfiscanf.c" ,
123
+ "tinystdio/vfprintf.c" ,
124
+ "tinystdio/vfprintff.c" ,
125
+ "tinystdio/vfscanf.c" ,
126
+ "tinystdio/vfscanff.c" ,
127
+ "tinystdio/vprintf.c" ,
128
+ "tinystdio/vscanf.c" ,
129
+ "tinystdio/vsnprintf.c" ,
130
+ "tinystdio/vsprintf.c" ,
131
+ "tinystdio/vsscanf.c" ,
132
+
24
133
"string/bcmp.c" ,
25
134
"string/bcopy.c" ,
26
135
"string/bzero.c" ,
0 commit comments