newlib: update tupfile

git-svn-id: svn://kolibrios.org@6621 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge) 2016-10-27 23:14:09 +00:00
parent 3e9fa64849
commit 7d75fe92c0

View File

@ -23,38 +23,122 @@ end
LIBPATH = "-L$(SDK_DIR)/lib"
STATIC_SRCS = {"crt/start.S", "crt/crt1.c", "crt/crt2.c", "crt/exit.S"}
LIBDLL_SRCS = {"crt/dllstart.c", "crt/exit.S", "crt/pseudo-reloc.c", "crt/setjmp.S"}
LIBCDLL_SRCS = {"crt/crt2.c", "crt/pseudo-reloc.c", "crt/exit.S", "crt/setjmp.S"}
LIBCDLL_SRCS = {
"crt/crtdll.c",
"crt/crt2.c",
"crt/pseudo-reloc.c",
"crt/exit.S",
"pe/loader.c"
}
CORE_SRCS = {
"argz/buf_findstr.c", "argz/envz_get.c",
"crt/console.asm", "crt/thread.S", "crt/cpu_features.c", "crt/tls.c",
"ctype/ctype_.c", "ctype/isascii.c", "ctype/isblank.c", "ctype/isalnum.c",
"ctype/isalpha.c", "ctype/iscntrl.c", "ctype/isdigit.c", "ctype/islower.c",
"ctype/isupper.c", "ctype/isprint.c", "ctype/ispunct.c", "ctype/isspace.c",
"ctype/iswctype.c", "ctype/iswalnum.c", "ctype/iswalpha.c", "ctype/iswblank.c",
"ctype/iswcntrl.c", "ctype/iswdigit.c", "ctype/iswgraph.c", "ctype/iswlower.c",
"ctype/iswprint.c", "ctype/iswpunct.c", "ctype/iswspace.c", "ctype/iswupper.c",
"ctype/iswxdigit.c", "ctype/isxdigit.c", "ctype/toascii.c", "ctype/tolower.c",
"ctype/toupper.c", "ctype/towctrans.c", "ctype/towlower.c", "ctype/towupper.c",
"ctype/wctrans.c", "ctype/wctype.c",
"argz/buf_findstr.c",
"argz/envz_get.c",
"crt/console.asm",
"crt/thread.S",
"crt/setjmp.S",
"crt/cpu_features.c",
"crt/tls.c",
"ctype/ctype_.c",
"ctype/isascii.c",
"ctype/isblank.c",
"ctype/isalnum.c",
"ctype/isalpha.c",
"ctype/iscntrl.c",
"ctype/isdigit.c",
"ctype/islower.c",
"ctype/isupper.c",
"ctype/isprint.c",
"ctype/ispunct.c",
"ctype/isspace.c",
"ctype/iswctype.c",
"ctype/iswalnum.c",
"ctype/iswalpha.c",
"ctype/iswblank.c",
"ctype/iswcntrl.c",
"ctype/iswdigit.c",
"ctype/iswgraph.c",
"ctype/iswlower.c",
"ctype/iswprint.c",
"ctype/iswpunct.c",
"ctype/iswspace.c",
"ctype/iswupper.c",
"ctype/iswxdigit.c",
"ctype/isxdigit.c",
"ctype/toascii.c",
"ctype/tolower.c",
"ctype/toupper.c",
"ctype/towctrans.c",
"ctype/towlower.c",
"ctype/towupper.c",
"ctype/wctrans.c",
"ctype/wctype.c",
"errno/errno.c",
"locale/locale.c", "locale/lctype.c", "locale/ldpart.c",
"reent/closer.c", "reent/fstatr.c", "reent/getreent.c", "reent/gettimeofdayr.c",
"reent/impure.c", "reent/init_reent.c", "reent/isattyr.c", "reent/linkr.c",
"reent/lseekr.c", "reent/mutex.c", "reent/openr.c", "reent/readr.c",
"reent/statr.c", "reent/timesr.c", "reent/unlinkr.c",
"locale/locale.c",
"locale/lctype.c",
"locale/ldpart.c",
"reent/closer.c",
"reent/fstatr.c",
"reent/getreent.c",
"reent/gettimeofdayr.c",
"reent/impure.c",
"reent/init_reent.c",
"reent/isattyr.c",
"reent/linkr.c",
"reent/lseekr.c",
"reent/mutex.c",
"reent/openr.c",
"reent/readr.c",
"reent/renamer.c",
"reent/statr.c",
"reent/timesr.c",
"reent/unlinkr.c",
"reent/writer.c",
"search/qsort.c", "search/bsearch.c",
"search/qsort.c",
"search/bsearch.c",
"signal/signal.c",
"sys/access.c", "sys/clock_gettime.c", "sys/close.c", "sys/conio.c", "sys/create.c",
"sys/errno.c", "sys/finfo.c", "sys/fsize.c", "sys/fstat.c", "sys/gettod.c", "sys/io.c",
"sys/ioread.c", "sys/iowrite.c", "sys/isatty.c", "sys/lseek.c", "sys/open.c",
"sys/read.c", "sys/_rename.c", "sys/stat.c", "sys/unlink.c", "sys/write.c",
"sys/io_alloc.S", "time/asctime.c", "time/asctime_r.c", "time/clock.c", "time/ctime.c",
"time/ctime_r.c", "time/difftime.c", "time/gettzinfo.c", "time/gmtime.c",
"time/gmtime_r.c", "time/mktime.c", "time/month_lengths.c", "time/lcltime.c",
"time/lcltime_r.c", "time/strftime.c", "time/time.c", "time/tzcalc_limits.c",
"time/timelocal.c", "time/tzlock.c", "time/tzset.c", "time/tzset_r.c", "time/tzvars.c"
"sys/access.c",
"sys/clock_gettime.c",
"sys/close.c",
"sys/conio.c",
"sys/create.c",
"sys/errno.c",
"sys/finfo.c",
"sys/fsize.c",
"sys/fstat.c",
"sys/gettod.c",
"sys/io.c",
"sys/ioread.c",
"sys/iowrite.c",
"sys/isatty.c",
"sys/lseek.c",
"sys/open.c",
"sys/read.c",
"sys/_rename.c",
"sys/stat.c",
"sys/unlink.c",
"sys/write.c",
"sys/io_alloc.S",
"time/asctime.c",
"time/asctime_r.c",
"time/clock.c",
"time/ctime.c",
"time/ctime_r.c",
"time/difftime.c",
"time/gettzinfo.c",
"time/gmtime.c",
"time/gmtime_r.c",
"time/mktime.c",
"time/month_lengths.c",
"time/lcltime.c",
"time/lcltime_r.c",
"time/strftime.c",
"time/time.c",
"time/tzcalc_limits.c",
"time/timelocal.c",
"time/tzlock.c",
"time/tzset.c",
"time/tzset_r.c",
"time/tzvars.c"
}
STDLIB_SRCS = {
"__atexit.c",
@ -66,6 +150,8 @@ STDLIB_SRCS = {
"atof.c",
"atoi.c",
"atol.c",
"btowc.c",
"calloc.c",
"cxa_atexit.c",
"cxa_finalize.c",
"div.c",
@ -81,18 +167,28 @@ STDLIB_SRCS = {
"getenv.c",
"getenv_r.c",
"itoa.c",
"ldiv.c",
"labs.c",
"mprec.c",
"mbtowc.c",
"mbtowc_r.c",
"mbrtowc.c",
"mlock.c",
"calloc.c",
"ldtoa.c",
"malloc.c",
"mallocr.c",
"mblen.c",
"mblen_r.c",
"mbrlen.c",
"mbrtowc.c",
"mbsinit.c",
"mbsnrtowcs.c",
"mbsrtowcs.c",
"mbstowcs.c",
"mbstowcs_r.c",
"mbtowc.c",
"mbtowc_r.c",
"mlock.c",
"mprec.c",
"rand.c",
"rand_r.c",
"rand48.c",
"random.c",
"realloc.c",
"seed48.c",
"srand48.c",
@ -109,6 +205,20 @@ STDLIB_SRCS = {
"system.c",
"utoa.c",
"wcrtomb.c",
"wcsnrtombs.c",
"wcsrtombs.c",
"wcstod.c",
"wcstol.c",
"wcstold.c",
"wcstoll.c",
"wcstoll_r.c",
"wcstombs.c",
"wcstombs_r.c",
"wcstoul.c",
"wcstoull.c",
"wcstoull_r.c",
"wctob.c",
"wctomb.c",
"wctomb_r.c"
}
STRING_SRCS = {
@ -206,6 +316,7 @@ STDIO_SRCS = {
"asnprintf.c",
"asprintf.c",
"clearerr.c",
"clearerr_u.c",
"diprintf.c",
"dprintf.c",
"fclose.c",
@ -222,6 +333,10 @@ STDIO_SRCS = {
"fgetpos.c",
"fgets.c",
"fgets_u.c",
"fgetwc.c",
"fgetwc_u.c",
"fgetws.c",
"fgetws_u.c",
"fileno.c",
"fileno_u.c",
"findfp.c",
@ -238,7 +353,11 @@ STDIO_SRCS = {
"fputs.c",
"fputs_u.c",
"fputwc.c",
"fputwc_u.c",
"fputws.c",
"fputws_u.c"
"fsetpos.c",
"funopen.c",
"fread.c",
"fread_u.c",
"freopen.c",
@ -251,8 +370,10 @@ STDIO_SRCS = {
"fvwrite.c",
"fwalk.c",
"fwide.c",
"fwprintf.c",
"fwrite.c",
"fwrite_u.c",
"fwscanf.c",
"getc.c",
"getc_u.c",
"getchar.c",
@ -260,6 +381,11 @@ STDIO_SRCS = {
"getdelim.c",
"getline.c",
"gets.c",
"getw.c",
"getwc.c",
"getwc_u.c",
"getwchar.c",
"getwchar_u.c",
"iprintf.c",
"iscanf.c",
"makebuf.c",
@ -273,6 +399,11 @@ STDIO_SRCS = {
"putchar.c",
"putchar_u.c",
"puts.c",
"putw.c",
"putwc.c",
"putwc_u.c",
"putwchar.c",
"putwchar_u.c",
"refill.c",
"remove.c",
"rename.c",
@ -292,15 +423,19 @@ STDIO_SRCS = {
"sscanf.c",
"stdio.c",
"stdio_ext.c",
"swprintf.c",
"swscanf.c",
"tmpfile.c",
"tmpnam.c",
"ungetc.c",
"ungetwc.c",
"vasiprintf.c",
"vasniprintf.c",
"vasnprintf.c",
"vasprintf.c",
"vdiprintf.c",
"vdprintf.c",
"vfwscanf.c",
"viprintf.c",
"viscanf.c",
"vprintf.c",
@ -311,8 +446,14 @@ STDIO_SRCS = {
"vsniprintf.c",
"vsnprintf.c",
"vsscanf.c",
"wsetup.c",
"wbuf.c"
"vswprintf.c",
"vswscanf.c",
"vwprintf.c",
"vwscanf.c",
"wbuf.c",
"wprintf.c",
"wscanf.c",
"wsetup.c"
}
@ -403,6 +544,17 @@ for i,v in ipairs(vfprintf_extra_objs) do
LIB_OBJS += tup.rule("stdio/vfprintf.c", "kos32-gcc $(CFLAGS) $(DEFINES) $(INCLUDES) -fshort-enums " .. v[1] .. " -c %f -o %o", v[2])
end
vfwprintf_extra_objs = {
{"", "stdio/vfwprintf.o"},
{"-DINTEGER_ONLY", "stdio/vfiwprintf.o"},
{"-DSTRING_ONLY", "stdio/svfwprintf.o"},
{"-DINTEGER_ONLY -DSTRING_ONLY", "stdio/svfiwprintf.o"},
}
for i,v in ipairs(vfwprintf_extra_objs) do
LIB_OBJS += tup.rule("stdio/vfwprintf.c", "kos32-gcc $(CFLAGS) $(DEFINES) $(INCLUDES) -fshort-enums " .. v[1] .. " -c %f -o %o", v[2])
end
vfscanf_extra_objs = {
{"", "stdio/vfscanf.o"},
{"-DINTEGER_ONLY", "stdio/vfiscanf.o"},
@ -413,6 +565,17 @@ for i,v in ipairs(vfscanf_extra_objs) do
LIB_OBJS += tup.rule("stdio/vfscanf.c", "kos32-gcc $(CFLAGS) $(DEFINES) $(INCLUDES) " .. v[1] .. " -c %f -o %o", v[2])
end
vfwscanf_extra_objs = {
{"-DINTEGER_ONLY", "stdio/vfiwscanf.o"},
{"-DSTRING_ONLY", "stdio/svfwscanf.o"},
{"-DINTEGER_ONLY -DSTRING_ONLY", "stdio/svfiwscanf.o"},
}
for i,v in ipairs(vfscanf_extra_objs) do
LIB_OBJS += tup.rule("stdio/vfwscanf.c", "kos32-gcc $(CFLAGS) $(DEFINES) $(INCLUDES) " .. v[1] .. " -c %f -o %o", v[2])
end
tup.rule(LIB_OBJS, "kos32-ld " .. LDFLAGS .. " " .. LIBPATH .. " -o %o %f -lgcc --version-script libc.ver " .. tup.getconfig("KPACK_CMD"),
{SDK_DIR .. "/bin/libc.dll", extra_outputs = {SDK_DIR .. "/lib/libc.dll.a", SDK_DIR .. "/lib/<libc.dll.a>"}})
tup.rule(LIBDLL_OBJS, "kos32-ar rcs %o %f", {SDK_DIR .. "/lib/libdll.a", extra_outputs = {SDK_DIR .. "/lib/<libdll.a>"}})