1. Edit procedure check exception 12 (overflow stack)
[kolibrios.git] / programs / use_newlib.lua
blobb48b7fcaabdc0d71037912973748893b0dcc4a8d
1 NEWLIB_BASE = tup.getcwd() .. "/../contrib/sdk/sources/newlib"
2 NEWLIB_LIB = tup.getcwd() .. "/../contrib/sdk/lib"
4 TOOLCHAIN_LIBPATH = tup.getconfig("TOOLCHAIN_LIBPATH")
5 -- if not given explicitly in config, try to guess
6 if TOOLCHAIN_LIBPATH == "" then
7 if tup.getconfig("TUP_PLATFORM") == "win32"
8 then TOOLCHAIN_LIBPATH="C:\\MinGW\\msys\\1.0\\home\\autobuild\\tools\\win32\\mingw32\\lib"
9 else TOOLCHAIN_LIBPATH="/home/autobuild/tools/win32/mingw32/lib"
10 end
11 end
13 INCLUDES = INCLUDES .. " -I" .. NEWLIB_BASE .. "/libc/include"
14 LDFLAGS = LDFLAGS .. " -T$(NEWLIB_BASE)/app-dynamic.lds -L$(NEWLIB_LIB) --image-base 0"
15 tup.append_table(LIBDEPS, {NEWLIB_LIB .. "/<libc.dll.a>"})
16 LIBS = LIBS .. "-lgcc -lc.dll"