2021-04-27 18:33:31 +02:00
|
|
|
if tup.getconfig("NO_GCC") ~= "" then return end
|
2021-06-10 16:40:17 +02:00
|
|
|
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../../../../" or tup.getconfig("HELPERDIR")
|
2021-04-27 18:33:31 +02:00
|
|
|
tup.include(HELPERDIR .. "/use_gcc.lua")
|
|
|
|
|
2021-06-09 05:17:46 +02:00
|
|
|
CFLAGS = " -c -w -nostdinc -DGNUC -D_BUILD_LIBC -Os -fno-common -fno-builtin -fno-leading-underscore -fno-pie"
|
2021-04-27 18:33:31 +02:00
|
|
|
INCLUDES = " -I../include"
|
|
|
|
|
|
|
|
tup.rule("../linuxtools/src/ExportGen.c", "gcc %f -o %o" , "../linuxtools/ExportGen")
|
|
|
|
tup.rule("../linuxtools/src/LoaderGen.c", "gcc %f -o %o" , "../linuxtools/LoaderGen")
|
|
|
|
|
|
|
|
tup.rule({"symbols.txt",extra_inputs = {"../linuxtools/ExportGen"}}, "../linuxtools/ExportGen %f %o" , "exports/exports.c")
|
|
|
|
|
2021-04-27 19:40:25 +02:00
|
|
|
tup.rule({"libc.c",extra_inputs = {"exports/exports.c"}} , "kos32-gcc" .. CFLAGS .. INCLUDES .. " -o %o %f " .. tup.getconfig("KPACK_CMD"), "libc.obj")
|