Rev 6622 | Rev 6624 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
5132 | clevermous | 1 | if tup.getconfig("NO_GCC") ~= "" or tup.getconfig("NO_FASM") ~= "" then return end |
2 | tup.include("../../../../../programs/use_gcc.lua") |
||
6539 | serge | 3 | CFLAGS = "-c -O2 -fno-builtin -fno-ident -fomit-frame-pointer -DMISSING_SYSCALL_NAMES" |
5132 | clevermous | 4 | LDFLAGS = "-shared -s -T libcdll.lds --out-implib $(SDK_DIR)/lib/libc.dll.a --image-base 0" |
5 | -- LDFLAGS = LDFLAGS .. " --output-def libc.orig.def" |
||
6 | |||
7 | SDK_DIR = "../../.." |
||
8 | |||
9 | LIBC_TOPDIR = "." |
||
10 | LIBC_INCLUDES = "include" |
||
11 | NAME = "libc" |
||
6540 | serge | 12 | DEFINES = "-U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -U_MSC_VER-D_IEEE_LIBM -DHAVE_RENAME -DBUILD_LIBC" |
5132 | clevermous | 13 | INCLUDES = "-Iinclude" |
14 | |||
15 | TOOLCHAIN_LIBPATH = tup.getconfig("TOOLCHAIN_LIBPATH") |
||
16 | -- if not given explicitly in config, try to guess |
||
17 | if TOOLCHAIN_LIBPATH == "" then |
||
18 | if tup.getconfig("TUP_PLATFORM") == "win32" |
||
19 | then TOOLCHAIN_LIBPATH="C:\\MinGW\\msys\\1.0\\home\\autobuild\\tools\\win32\\mingw32\\lib" |
||
20 | else TOOLCHAIN_LIBPATH="/home/autobuild/tools/win32/mingw32/lib" |
||
21 | end |
||
22 | end |
||
6547 | serge | 23 | LIBPATH = "-L$(SDK_DIR)/lib" |
6623 | serge | 24 | STATIC_SRCS = {"crt/start.S", "crt/crt2.c", "crt/exit.S"} |
6536 | serge | 25 | LIBDLL_SRCS = {"crt/dllstart.c", "crt/exit.S", "crt/pseudo-reloc.c", "crt/setjmp.S"} |
6621 | serge | 26 | LIBCDLL_SRCS = { |
27 | "crt/crt2.c", |
||
28 | "crt/pseudo-reloc.c", |
||
6623 | serge | 29 | "crt/exit.S" |
6621 | serge | 30 | } |
5132 | clevermous | 31 | CORE_SRCS = { |
6621 | serge | 32 | "argz/buf_findstr.c", |
33 | "argz/envz_get.c", |
||
34 | "crt/console.asm", |
||
35 | "crt/thread.S", |
||
36 | "crt/setjmp.S", |
||
37 | "crt/cpu_features.c", |
||
38 | "crt/tls.c", |
||
39 | "ctype/ctype_.c", |
||
40 | "ctype/isascii.c", |
||
41 | "ctype/isblank.c", |
||
42 | "ctype/isalnum.c", |
||
43 | "ctype/isalpha.c", |
||
44 | "ctype/iscntrl.c", |
||
45 | "ctype/isdigit.c", |
||
46 | "ctype/islower.c", |
||
47 | "ctype/isupper.c", |
||
48 | "ctype/isprint.c", |
||
49 | "ctype/ispunct.c", |
||
50 | "ctype/isspace.c", |
||
51 | "ctype/iswctype.c", |
||
52 | "ctype/iswalnum.c", |
||
53 | "ctype/iswalpha.c", |
||
54 | "ctype/iswblank.c", |
||
55 | "ctype/iswcntrl.c", |
||
56 | "ctype/iswdigit.c", |
||
57 | "ctype/iswgraph.c", |
||
58 | "ctype/iswlower.c", |
||
59 | "ctype/iswprint.c", |
||
60 | "ctype/iswpunct.c", |
||
61 | "ctype/iswspace.c", |
||
62 | "ctype/iswupper.c", |
||
63 | "ctype/iswxdigit.c", |
||
64 | "ctype/isxdigit.c", |
||
65 | "ctype/toascii.c", |
||
66 | "ctype/tolower.c", |
||
67 | "ctype/toupper.c", |
||
68 | "ctype/towctrans.c", |
||
69 | "ctype/towlower.c", |
||
70 | "ctype/towupper.c", |
||
71 | "ctype/wctrans.c", |
||
72 | "ctype/wctype.c", |
||
5132 | clevermous | 73 | "errno/errno.c", |
6621 | serge | 74 | "locale/locale.c", |
75 | "locale/lctype.c", |
||
76 | "locale/ldpart.c", |
||
77 | "reent/closer.c", |
||
78 | "reent/fstatr.c", |
||
79 | "reent/getreent.c", |
||
80 | "reent/gettimeofdayr.c", |
||
81 | "reent/impure.c", |
||
82 | "reent/init_reent.c", |
||
83 | "reent/isattyr.c", |
||
84 | "reent/linkr.c", |
||
85 | "reent/lseekr.c", |
||
86 | "reent/mutex.c", |
||
87 | "reent/openr.c", |
||
88 | "reent/readr.c", |
||
89 | "reent/renamer.c", |
||
90 | "reent/statr.c", |
||
91 | "reent/timesr.c", |
||
92 | "reent/unlinkr.c", |
||
5216 | serge | 93 | "reent/writer.c", |
6621 | serge | 94 | "search/qsort.c", |
95 | "search/bsearch.c", |
||
5132 | clevermous | 96 | "signal/signal.c", |
6621 | serge | 97 | "sys/access.c", |
98 | "sys/clock_gettime.c", |
||
99 | "sys/close.c", |
||
100 | "sys/conio.c", |
||
101 | "sys/create.c", |
||
102 | "sys/errno.c", |
||
103 | "sys/finfo.c", |
||
104 | "sys/fsize.c", |
||
105 | "sys/fstat.c", |
||
106 | "sys/gettod.c", |
||
107 | "sys/io.c", |
||
108 | "sys/ioread.c", |
||
109 | "sys/iowrite.c", |
||
110 | "sys/isatty.c", |
||
111 | "sys/lseek.c", |
||
112 | "sys/open.c", |
||
113 | "sys/read.c", |
||
114 | "sys/_rename.c", |
||
115 | "sys/stat.c", |
||
116 | "sys/unlink.c", |
||
117 | "sys/write.c", |
||
118 | "sys/io_alloc.S", |
||
119 | "time/asctime.c", |
||
120 | "time/asctime_r.c", |
||
121 | "time/clock.c", |
||
122 | "time/ctime.c", |
||
123 | "time/ctime_r.c", |
||
124 | "time/difftime.c", |
||
125 | "time/gettzinfo.c", |
||
126 | "time/gmtime.c", |
||
127 | "time/gmtime_r.c", |
||
128 | "time/mktime.c", |
||
129 | "time/month_lengths.c", |
||
130 | "time/lcltime.c", |
||
131 | "time/lcltime_r.c", |
||
132 | "time/strftime.c", |
||
133 | "time/time.c", |
||
134 | "time/tzcalc_limits.c", |
||
135 | "time/timelocal.c", |
||
136 | "time/tzlock.c", |
||
137 | "time/tzset.c", |
||
138 | "time/tzset_r.c", |
||
139 | "time/tzvars.c" |
||
5132 | clevermous | 140 | } |
141 | STDLIB_SRCS = { |
||
6536 | serge | 142 | "__atexit.c", |
143 | "__call_atexit.c", |
||
144 | "abort.c", |
||
145 | "abs.c", |
||
146 | "assert.c", |
||
147 | "atexit.c", |
||
148 | "atof.c", |
||
149 | "atoi.c", |
||
150 | "atol.c", |
||
6621 | serge | 151 | "btowc.c", |
152 | "calloc.c", |
||
6536 | serge | 153 | "cxa_atexit.c", |
154 | "cxa_finalize.c", |
||
155 | "div.c", |
||
156 | "dtoa.c", |
||
157 | "dtoastub.c", |
||
158 | "efgcvt.c", |
||
159 | "ecvtbuf.c", |
||
160 | "eprintf.c", |
||
161 | "erand48.c", |
||
162 | "exit.c", |
||
163 | "gdtoa-gethex.c", |
||
164 | "gdtoa-hexnan.c", |
||
165 | "getenv.c", |
||
166 | "getenv_r.c", |
||
167 | "itoa.c", |
||
6621 | serge | 168 | "ldiv.c", |
6537 | serge | 169 | "labs.c", |
6621 | serge | 170 | "ldtoa.c", |
171 | "malloc.c", |
||
172 | "mallocr.c", |
||
173 | "mblen.c", |
||
174 | "mblen_r.c", |
||
175 | "mbrlen.c", |
||
176 | "mbrtowc.c", |
||
177 | "mbsinit.c", |
||
178 | "mbsnrtowcs.c", |
||
179 | "mbsrtowcs.c", |
||
180 | "mbstowcs.c", |
||
181 | "mbstowcs_r.c", |
||
6536 | serge | 182 | "mbtowc.c", |
183 | "mbtowc_r.c", |
||
184 | "mlock.c", |
||
6621 | serge | 185 | "mprec.c", |
6536 | serge | 186 | "rand.c", |
187 | "rand_r.c", |
||
188 | "rand48.c", |
||
6621 | serge | 189 | "random.c", |
6536 | serge | 190 | "realloc.c", |
191 | "seed48.c", |
||
192 | "srand48.c", |
||
193 | "strtod.c", |
||
194 | "strtodg.c", |
||
195 | "strtol.c", |
||
196 | "strtold.c", |
||
197 | "strtoll.c", |
||
198 | "strtoll_r.c", |
||
199 | "strtorx.c", |
||
200 | "strtoul.c", |
||
201 | "strtoull.c", |
||
202 | "strtoull_r.c", |
||
203 | "system.c", |
||
204 | "utoa.c", |
||
205 | "wcrtomb.c", |
||
6621 | serge | 206 | "wcsnrtombs.c", |
207 | "wcsrtombs.c", |
||
208 | "wcstod.c", |
||
209 | "wcstol.c", |
||
210 | "wcstold.c", |
||
211 | "wcstoll.c", |
||
212 | "wcstoll_r.c", |
||
213 | "wcstombs.c", |
||
214 | "wcstombs_r.c", |
||
215 | "wcstoul.c", |
||
216 | "wcstoull.c", |
||
217 | "wcstoull_r.c", |
||
218 | "wctob.c", |
||
219 | "wctomb.c", |
||
6099 | serge | 220 | "wctomb_r.c" |
5132 | clevermous | 221 | } |
222 | STRING_SRCS = { |
||
6557 | serge | 223 | "bcmp.c", |
224 | "bcopy.c", |
||
225 | "bzero.c", |
||
226 | "explicit_bzero.c", |
||
227 | "gnu_basename.c", |
||
228 | "index.c", |
||
229 | "memccpy.c", |
||
230 | "memchr.c", |
||
231 | "memcmp.c", |
||
6536 | serge | 232 | "memcpy.c", |
6557 | serge | 233 | "memmem.c", |
6536 | serge | 234 | "memmove.c", |
6557 | serge | 235 | "mempcpy.c", |
236 | "memrchr.c", |
||
6536 | serge | 237 | "memset.c", |
6557 | serge | 238 | "rawmemchr.c", |
239 | "rindex.c", |
||
6536 | serge | 240 | "stpcpy.c", |
241 | "stpncpy.c", |
||
6557 | serge |