diff --git a/programs/develop/ktcc/trunk/source/Tupfile.lua b/programs/develop/ktcc/trunk/source/Tupfile.lua index 424e669551..2fec825db8 100644 --- a/programs/develop/ktcc/trunk/source/Tupfile.lua +++ b/programs/develop/ktcc/trunk/source/Tupfile.lua @@ -6,3 +6,7 @@ CFLAGS = "-U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32" compile_gcc{"tcc.c"} compile_gcc{"libtcc.c"} link_gcc("tcc") + +CFLAGS = " -static -m32 -DTCC_TARGET_MEOS_LINUX " +tup.rule({"tcc.c", "libtcc.c"}, "gcc" .. CFLAGS .. "%f -o %o" , "kos32-tcc") +tup.rule({"tcc.c", "libtcc.c"}, "i686-w64-mingw32-gcc" .. CFLAGS .. "%f -o %o" , "kos32-tcc.exe") diff --git a/programs/develop/ktcc/trunk/source/libtcc.c b/programs/develop/ktcc/trunk/source/libtcc.c index 54850452f8..bdb0b24a10 100644 --- a/programs/develop/ktcc/trunk/source/libtcc.c +++ b/programs/develop/ktcc/trunk/source/libtcc.c @@ -1174,6 +1174,10 @@ LIBTCCAPI TCCState *tcc_new(void) # ifdef TCC_TARGET_X86_64 tcc_define_symbol(s, "_WIN64", NULL); # endif +#elif defined(TCC_TARGET_MEOS) || defined(TCC_TARGET_MEOS_LINUX) + tcc_define_symbol(s, "KOLIBRI", NULL); + tcc_define_symbol(s, "_KOLIBRI", NULL); + tcc_define_symbol(s, "_KOLIBRI_",NULL); #else tcc_define_symbol(s, "__unix__", NULL); tcc_define_symbol(s, "__unix", NULL); @@ -1196,7 +1200,7 @@ LIBTCCAPI TCCState *tcc_new(void) tcc_define_symbol(s, "__NetBSD__", str( __NetBSD__)); # undef str # endif - + /* TinyCC & gcc defines */ #if defined TCC_TARGET_PE && defined TCC_TARGET_X86_64 tcc_define_symbol(s, "__SIZE_TYPE__", "unsigned long long");