Files
kolibrios/programs/develop/ktcc/trunk/libc.obj/source/Tupfile.lua
Egor00f cb29ecffb7
All checks were successful
Build system / Check kernel codestyle (pull_request) Successful in 41s
Build system / Build (pull_request) Successful in 16m37s
libc.obj: fixes and optimizations for allocator && add new samples to sh build
fix: in `__mem_MERGE_MEM_NODES` `base->free = base->size`, its wrong.
forgot to set size for new block
optimization: add `__last_mem_node`. usually  its node with max free space among other nodes. firstly `malloc` try find space in it.
update(fix and optimizations) `realloc`.
now sdltest is working!
2026-02-04 12:42:00 +05:00

51 lines
1.1 KiB
Lua
Executable File

if tup.getconfig("NO_TCC") ~= "" then
return
end
CC = "kos32-tcc"
CFLAGS = " -r -nostdinc -nostdlib -DGNUC -D_BUILD_LIBC -Wall -Werror"
INCLUDES = " -I../include"
GAS_SRC = {
"setjmp/setjmp.s",
"setjmp/longjmp.s",
"math/round.s",
"math/atan.s",
"math/pow2.s",
"math/log10.s",
"math/exp.s",
"math/pow10.s",
"math/log.s",
"math/pow.s",
"math/ceil.s",
"math/cos.s",
"math/sin.s",
"math/asin.s",
"math/modf.s",
"math/floor.s",
"math/fabs.s",
"math/fmod.s",
"math/log2.s",
"math/acos.s",
"math/modfl.s",
"math/atan2.s",
"math/sqrt.s",
"math/tan.s",
"string/memset.s",
"string/memmove.s",
}
FASM_SRC = {
"crt/crt0.asm",
}
LIBC_OBJS = { "libc.c" }
tup.append_table(LIBC_OBJS, tup.foreach_rule(GAS_SRC, "as --32 %f -o %o", "%B.o"))
tup.rule(LIBC_OBJS, CC .. CFLAGS .. INCLUDES .. " %f -o %o " .. " && strip %o --strip-unneeded ", "libc.o")
tup.rule("libc.o", "objconv -fcoff32 %f %o " .. tup.getconfig("KPACK_CMD"), "%B.obj")
tup.rule(FASM_SRC, "fasm %f %o", "%B.o")